SQL-only views hanging

I am using JDeveloper 9.0.3. I use the Application Module to work with the db-tables and views, and I am using the applicationmodule-pooling.
I have a nasty problem with some SQL-only views that hangs. If we drop the db-views used in the query and re-creates them then everything works fo a while ... but it hangs again. The views hangs in the vo.executeQuery(), I have looked at the sql and it looks fine, no problem using it in sql-plus.
Do anyone recognise this problem? If you do, do you have any suggestions what to do?

The problem disappeared when I stopped using the clearCache-method on my view-objects.
The method makes the connection to time out ...

Similar Messages

  • SQL-Only Many-to-Many View Links?

    Hi,
    ADF, BC4J, Jdeveloper 10.1.3
    I am working on a reporting system that contains a number of reports on tables that are linked with many-to-many relationships.
    So for example, I have a COMPANIES table that is linked through an intermediate table to a CENTRES table. COMPANIES is also linked in a similar way to VOLUNTEERS. All these links are many-to-many.
    From the companies report page, one can see the centres associated with that company, and vice versa. I would like these to be displayed as clickable links that take the user through to the report page for that table...
    What is the best way to do this?
    Because I am only reporting on these tables (no updates), I have created SQL-only view objects. I thought that View Links might be a good way of listing the associated rows and setting the appropriate row for the reports page when the user clicks a link, but I cant see a way of implementing a view link on a many-to-many relationship between sql-only views.
    Is this possible? Or am I approaching this in the wrong way?
    Any help greatly appreciated,
    Alex.

    Hi,
    ADF, BC4J, Jdeveloper 10.1.3
    I am working on a reporting system that contains a number of reports on tables that are linked with many-to-many relationships.
    So for example, I have a COMPANIES table that is linked through an intermediate table to a CENTRES table. COMPANIES is also linked in a similar way to VOLUNTEERS. All these links are many-to-many.
    From the companies report page, one can see the centres associated with that company, and vice versa. I would like these to be displayed as clickable links that take the user through to the report page for that table...
    What is the best way to do this?
    Because I am only reporting on these tables (no updates), I have created SQL-only view objects. I thought that View Links might be a good way of listing the associated rows and setting the appropriate row for the reports page when the user clicks a link, but I cant see a way of implementing a view link on a many-to-many relationship between sql-only views.
    Is this possible? Or am I approaching this in the wrong way?
    Any help greatly appreciated,
    Alex.

  • CurrencyString in JSP-page based on a sql-only ViewObject

    I have made a JSP-page based on a sql-only ViewObject against the hr employees table, and
    the currencyString on the page doesn't work! The <c:out value="${Row.currencyString}"/>
    makes a "*" on every row. How come that this only happens to sql-only ViewObjects? The sql
    in the view is simply "select * from employees", and I'm using the 10g production build 1605.

    You just have to make sure that the view object has a Key Attribute, then the indicator will show appropriately. The key is required so that currency can be tracked.
    This is documented in the help topic "About the Oracle ADF Bindings" in the section "About the Iterator Binding"

  • Read only view which has an ORDER BY clause

    Aim to create a read only view which has an ORDER BY clause
    Sample script
    CREATE TABLE tab1 (
    col1 VARCHAR2(3),
    col2 NUMBER
    INSERT INTO tab1(col1, col2) VALUES ('ccc', 30);
    INSERT INTO tab1(col1, col2) VALUES ('bbb', 20);
    INSERT INTO tab1(col1, col2) VALUES ('ddd', 40);
    INSERT INTO tab1(col1, col2) VALUES ('aaa', 10);
    COMMIT;
    -- To creat View
    CREATE OR REPLACE VIEW v_tab1
    AS
    SELECT
    col1,
    col2
    FROM
    tab1
    ORDER BY
    col1
    WITH READ ONLY;
    I get the following error
    WITH READ ONLY
    ERROR at line 10:
    ORA-00933: SQL command not properly ended
    When I comment out the ORDER BY clause, the view is created
    Pls let me know how I can create a read only view with ORDER BY clause

    Hi,
    take a look at the documentation for CREATE VIEW, there is a restriction:
    "You cannot specify the ORDER BY clause in the subquery if you also specify the subquery_restriction_clause."
    Wolfgang

  • Crystal XI R2 ActiveX Viewer Hang

    Hi all,
    I am hoping somebody may be able to help with a problem that has been driving me mad for a couple of weeks!
    We have a report which is very old and has not been modified since July this year. We have never had any problems with it until about two weeks ago when one user started having problems. It is a pretty basic report looking at one foxpro table (via ODBC) with some simple formulas and a couple of sub reports. No graphics, charts or complicated formatting.
    Our application generates the data fine but appears to hang when it tries to launch the viewer. It seems to hang in one of 2 places (although I cannot be 100% sure as I cannot recreate the issue on any development pc).  It either hangs when we try to make the viewer visible or when calling ViewReport in which case the viewer appears with a blank grey screen but the report is never presented. Sometimes in the second scenario the first page of the report will flash up and then disappear. No errors appear and if I then open the report directly in CR it displays perfectly.
    However it does not hang every time. It only seems to happen when running the data for one set of parameters (although even then it will occassionally work!). We have tried various things to resolve the issue, all of which appeared to fix it for a short time, but none have fixed it.
    Things we have tried are: -
    Disable anti virus
    Remove the default printer and add a new one
    Change screen resolution to a lower setting (this appeared to have the most reliable results?!)
    Saved the report with "No Printer" selected
    As mentioned above all of these attempts resulted in the report running fine a few times and then it starts failing again.
    The pc spec is good - Core 2 Duo 2.8GHz 2gb RAM running XP SP3 and is probably slightly higher specced than other pc's which are having no problem at all.
    If anybody has any suggestions as to what we can try next I would be very grateful. This pc belongs to one of our MD's and he is not happy as he uses this report 2-3 times daily!!
    Many thanks
    Rachel

    Hi Rachel,
    Great find with the temp folder. CR will request from the OS that it needs to generate a temp file, typically this is done if there is sorting or other second pass data processing going on and the data requires more space than is available in memory. Thus CR asks the OS to create the temp files. It's actually a process handled by Windows and through one of our files called CRHeapAlloc.dll. And as you have seen when the viewer closes the temp files are deleted so the process is working as designed. By the way, killing CRW32.exe or your application does not allow the Report Engine to clean those files up so in those cases you should delete them manually. One way is to create a Batch file on PC start up to delete the files from the temp folder.
    Not sure if this will work but try renaming CRHeapAlloc.dll to *.org, if it's needed the Installer will pop up and extract that file into the \bin folder again, or where ever it's installed to. CrHeapAlloc is a memory wrapper around Microsoft's Memory Manager to handle issues MS has and to allow CR to manage the memory more effectively. Sometimes though it's better to let Windows handle it, renaming the file does this.
    So when you see the Viewer hang what is your Executable doing as in is it maxing the CPU to 100% or does it simply stop responding? If it stops responding I believe what it is doing is some disk clean up or something of that nature is going on and CR is just waiting for the process to complete. Have you ever just let it go to see if you get control back in your app or the viewer?
    Which brings up the next question, are you using an OEM build of Windows? You can tell for example when the PC starts up you'll see a Splash screen like "Windows for DELL..." There have been known issue with OEM builds of Windows, the Automatic Windows Updates don't always work properly. I worked with Dell on once case and even though they said nothing was different other than the splash screen using Modules and Process Monitor definitely showed there were differences... and Auto-updates did not always do the same thing.
    See if this helps - 1477457 - How to enable/disable logging for the RDC?
    Sorry you have to search Kbase for it...
    What that will do is turn RDC logging on and it should/may show you what is happening when the temp files are being written.
    Now that I'm thinking about this also there was a known issue where the RDC was marking files to be deleted and Windows was then telling the Hard Drive to delete the file which is all fine. The problem is the Hard drive was so busy it never had time to actually delete the file, Windows then assumed the file name was available and tried to write to disk and thus it generated a File lock error... But we fixed that.
    Thanks again
    Don

  • SQL only ViewObject with WhereClause

    I have a sql only viewobject. My query that makes this viewobject contains a where clause to indicate a join. The viewobject works fine but I cannot do the setWhereClause(string) to add on criteria if I want to search the view. It looks like bc4j doesn't know there already is a where clause started in the query and so it tacks on a new WHERE clause which makes a bad query.
    Any suggestions on how to get around this?

    Darko, we try hard to offer much more functionality (and advanced functionality) than a simple JDBC prepared statement.
    I tried creating an expert mode SQL query:
    SELECT DISTINCT EMPNO, ENAME FROM EMP.
    Then at runtime I do:
    vo.setWhereClause("ENAME LIKE '%'||?||'%');
    vo.setWhereClauseParam(0,'A');.
    and this works fine. The trick is that since expert-mode view objects get wrapped as inline views (to allow runtime appending of WHERE clause, actually), you need to select any column in the select statement to which you want to later refer in a dynamically-appended where clause.
    If you want to prevent the inline-view wrapping, you can write the following code in your view object's ViewObjectImpl subclass to force the VO to NOT be treated as an expert-mode SQL VO.
      // Goes in your view object impl subclass
      public void create() {
         // Force this VO to NOT be treated as an expert-mode SQL, so that
         // its query does not get wrapped as an inline view.
         getViewDef().setFullSql(false);
      }I used this trick above to create an expert mode query like:
    SELECT DISTINCT deptno FROM empand then at runtime I add a dynamic where clause that refers to a column
    in EMP that is not in the select list like this:
        ViewObject vo = am.findViewObject("View1");
        vo.setWhereClause("ename like '%A%'");
        vo.executeQuery();
        System.out.println(vo.first().getAttribute(0));and this causes the query to come out as:
    SELECT DISTINCT deptno FROM emp WHERE ename like '%A%'.
    instead of:
    SELECT * FROM (SELECT DISTINCT deptno FROM emp) QRSLT WHERE ename like '%A%'which would cause an error due to the fact that ename is not in the select list of the original (wrapped, inline) query.

  • TM Contention and Read Only Views - Toad

    I have a case where a select against a view that has the read only option caused TM contention. I realize that the TM can be fixed by indexing the unindexed foreign key which I plan to do. The user only has select privilege so the locking must have come from select for update, but when I checked the query it was a select against a read only view from Toad. Has anyone seen the case where Toad does a select for update behind the scenes which causes locking issues. I am thinking this must be the case otherwise I do not know how a select against a readonly view could hold a lock.

    user12191713 wrote:
    I have a case where a select against a view that has the read only option caused TM contention. I realize that the TM can be fixed by indexing the unindexed foreign key which I plan to do. The user only has select privilege so the locking must have come from select for update, but when I checked the query it was a select against a read only view from Toad. Has anyone seen the case where Toad does a select for update behind the scenes which causes locking issues. I am thinking this must be the case otherwise I do not know how a select against a readonly view could hold a lock.using sqlplus post the same SQL & results
    Handle:     user12191713
    Status Level:     Newbie
    Registered:     Aug 4, 2011
    Total Posts:     40
    Total Questions:     25 (19 unresolved)
    I extend to you my condolences; since you rarely get your questions answered here.

  • DRM export from SQL Server view

    Hi
    We are using v11.1.2.1.
    Is it possible to import master data from a SQL Server view? We only seem to be able to extract from a table.
    Regards

    Yes You can but you have to write sql queries to export in section wise. I mean properties, property categories, node types, validations etc..

  • Partial read-only view object. How to make it work?

    Hello,
    is there a way to have a "partial" read-only view object, where some attributes are based on an EO and some others are extracted directly from a table with no corresponding EO?
    On this view-object it should be possible to perform row insertions from an af:table, in a way that, after validation (i.e. a row selection change), the values on the attributes not based on the EO do not get lost, even if they do not have any attributes based on an EO.
    On the other hand, if I use fake EO attributes ($none$) for those read-only attributes, their values will not gest lost after validation of the new interted rows, but in this case, when the table is first rendered on the page, the table shows empty values on those items, probably because the EO attributes are empty when the query is performed.
    Note that It seems I cannot use Transient attributes where their value is calculated with a SQL statement, since it would mean I would have to perform an heavy SQL statement for every transient attribute.
    Is there any other solution, I hope the problem is clear.

    That solution does not cover the case where an attributed of one entity used as reference is calculated from a SQL expression with parameters involving the remaining attributes of the same entity.
    For example consider a reference-only entity based on a table with one field T(COD). This entity has one more attribute other than COD itself, CALCULATED_VALUE.
    How can I bind the attribute CALCULATED_VALUE to a SQL expression which is a function of COD: MyDBPackage.GetValue(COD, :environment), where :environment is bind variable?
    The frameowork always give me JBO-exception , asking to specify IN or OUT for the variable.

  • I downloaded 11.1 but now can't access the store, can only view my library. I've reinstalled but still get a blank, white screen when I try to go to the itunes store. How can I get to the store for purchases?

    I downloaded 11.1 but now can't access the store, can only view my library. I've reinstalled but still get a blank, white screen when I try to go to the itunes store. How can I get to the store for purchases?

    In iTunes prefs>Store - is the Store check box unchecked?
    Did you repair pemissions with Disk Utility?
    MJ

  • Can only view Mail in full-screen mode

    After installing Yosemite, I can only view the main Mail window in Full Screen mode, unless I check "Classic View" in Preferences. Classic view does not help much, because it does not show the preview, which is essential to me. If I exit fullscreen mode, the minimized window appears for a split-second and then disappears down the left bottom corner of the screen and you cannot find it anywhere. The only way to see anything again is to go to Mail - View - Full Screen. Any help is much appreciated.

    Yes, I get the mail quit unexpectedly notification, together with a problem report, which is 808 lines but the pertinent part seems to be a CALayer position:
    Process:               Mail [476]
    Path:                  /Applications/Mail.app/Contents/MacOS/Mail
    Identifier:            com.apple.mail
    Version:               8.0 (1990.1)
    Build Info:            Mail-1990001000000000~3
    Code Type:             X86-64 (Native)
    Parent Process:        ??? [1]
    Responsible:           Mail [476]
    User ID:               501
    Date/Time:             2014-10-29 13:45:47.710 -0700
    OS Version:            Mac OS X 10.10 (14A389)
    Report Version:        11
    Anonymous UUID:        1FB6E94D-94CE-A889-F941-38C1A494F319
    Time Awake Since Boot: 1100 seconds
    Crashed Thread:        0  Dispatch queue: com.apple.main-thread
    Exception Type:        EXC_CRASH (SIGABRT)
    Exception Codes:       0x0000000000000000, 0x0000000000000000
    Application Specific Information:
    *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [720 nan]'
    abort() called
    terminating with uncaught exception of type NSException

  • IF statement syntax in SQL script view

    I need to include a "IF" condition in the "SELECT" section of my SQL script view.
    I tried the following syntax's but I get the error 'Incorrect SQL syntax near 'IF'
    1.  IF(Revenue <> '0' AND Quantity <> '0', Revenue/Quantity, '0') AS Gross Price
    2.  IF(Revenue != '0' AND Quantity != '0', Revenue/Quantity, '0') AS Gross Price
    3.  IF(Revenue <> '0' AND Quantity <> '0' THEN Revenue/Quantity ELSE  '0' END) AS Gross Price
    4.  IF(Revenue != '0' AND Quantity != '0' THEN Revenue/Quantity ELSE  '0' END) AS Gross Price
    My final SQL would read like follows:
    SELECT field1, field2, IF(......) AS field3
    FROM table1
    Can anybody please help with the correct IF statement syntax to be used in the SQL script based view?

    Hi Lakshmi,
    below is the syntax for IF statement.
    IF <bool_expr1> THEN
    <then_stmts1>
    ELSEIF <bool_expr2>
    THEN <then_stmts2>
    [ELSE <else_stmts3>]
    END IF
    eg :
    BEGIN
    DECLARE found INT := 1;
    SELECT count(*) INTO found FROM books WHERE isbn = :v_isbn;
    IF :found = 0 THEN
    INSERT INTO books VALUES (:v_isbn, 'In-Memory Data Management', 1, 1, '2011', 42.75, 'EUR');
    ELSE
    UPDATE books SET price = 42.75 WHERE isbn =:v_isbn;
    END IF;
    END;
    Sreehari

  • How to create a new user in OWB that can only view other user's mappings

    Hello Everyone,
    I am new to OWB and want to know if possible to create different users that can only view other user's mappings without making any changes. Do you know if possible each user can have his own password?
    Thank you for your help!
    Jennifer

    A good starting point would be this blog posting:
    https://blogs.oracle.com/warehousebuilder/entry/build_up_multi-role_development_environment_in_owb
    I seem to recall as well from the OWB Admin class that existing objects in the repository would need to have the security updated if the additional restricted roles are created after tables/mappings/etc. so that they reflect the new security model.
    Also, for individual logins to OWB, each developer would require a separate database login.

  • My HP Officejet 8500a All-In-One forwards faxes (as a tiff file) to my iphone.  Can only view/receive 1st page, embedded into email as a non-attachment.  Iphone receives email(s) pdf attachments well.  What can I do?

    My HP Officejet 8500a All-In-One forwards faxes (as a tiff file) to my iphone.  Can only view/receive 1st page, embedded into email as a non-attachment.  Iphone receives email(s) pdf attachments well.  What can I do?

    Try this app
    http://itunes.apple.com/us/app/fax-reader/id406902152?mt=8

  • I can only view one email at a time

    I can only view one email at a time when i open my email app

    Reopened this question in another forum, since I am not talking about an iPhone but a MacBook Pro:
    Using Mail, I have a very strange phanomenon: I can only open one email at a time. E.g. when writing a new email, I cannot open another email for reference. I need to close and save the new email as a draft before being able to open another one. Obviously, I am not reading two emails at a time, but I might be writing one and needing infos/text from another. It sounds stupid, but that's the way it is. :-/

Maybe you are looking for

  • Table question/problem

    This is an html table question, but since I am working with CF on this, I thought I would post here for help. I query and cfoutput the data in a table. The table has ten columns. The first five are alpha numeric and the last five are numeric. The out

  • Is there a Paste in Place option for iBooks Author?

    Is there a paste in place option for iBooks Author like there is in Adobe InDesign? Thanks.

  • IPhoto calendar ordering problems

    Hi all, I have been having serious problems ordering an iPhoto calendar. First, I ordered it on Monday using express shipping, such that it should have arrived by Friday, and instead on Friday I got a cryptic email saying "Apple is unable to process

  • Create a Master-Detail Records in target table

    hi, I have a source in a table that contains the infos of customers and for each customer record, we have three fields representing the customer ID (Identity card, SIN, passport ID) and I want to create 3 record in the target table for each customer,

  • PS CS6 Scripted Pattern Fill Problem

    Hi, Has any one seen this before? When i do a normal Fill with Pattern the pattern is the right colour, image (1) But if i select Scripted Patterns Image (2) it always comes out with random colours.