Jdbc query hangs

Hi,
I'm very new to Oracle, so forgive me if this is a rather stupid question:
I've written a little test application (cut and paste form the jdbc developers guide) that just connects to the university database and performs the same query 500 times in a row. After a number of queries the application freezes for exactly 60 seconds before continuing the loop, without throwing any kind of exception. this usually happens about 3 times during the loop.
What am I doing wrong?
I'm using jdk1.4.1 with ojdbc14.jar and the database is version 8.1.7.
Kind regards,
Jurgen

Hi,
I'm very new to Oracle, so forgive me if this is a rather stupid question:
I've written a little test application (cut and paste form the jdbc developers guide) that just connects to the university database and performs the same query 500 times in a row. After a number of queries the application freezes for exactly 60 seconds before continuing the loop, without throwing any kind of exception. this usually happens about 3 times during the loop.
What am I doing wrong?
I'm using jdk1.4.1 with ojdbc14.jar and the database is version 8.1.7.
Kind regards,
Jurgen

Similar Messages

  • JDBC query hangs server

    I have a very weird case when a particular JDBC query kills weblogic server. Attached
    is a thread dump. What's weird is:
    1. There is only one client on the system, and I sware the client sends only one
    request. At the same time there are 12 threads trying to execute the same query.
    2. The query is at the start of thread dump and it takes ~9sec to execute on our
    DB from SQL+. It returns ~300 records. If I change parameters it will be executed
    fine. Each time a client wants to execute a query before it is executed it is
    dumped to log, and there is only one query per all threads in the dump.
    3. Looking into DB log there is no sight of the query that is dumped into log
    file. DB does not have a clue... Both DB and WLS are waiting for each other...
    Environment:
    6.1sp2 on solaris
    Oracle 8.1.7
    JDBC driver from Oracle 9i
    [x.txt]

    There were two problems: request got hanging in the database (original) with proxy
    timing out and making situation worse (sending more requests). 9.2.0.1 did not
    have the original problem (statement did not hang), but the price was too high
    (data corruption) :( Also the problem was very touchy - we got only two environments
    which were duplicating it. This last mail was more on the whining side - hope
    that someone seen something similar and can say a-ha! So I guess I'm back in slow
    and painful try to reproduce and then fix mode... Most likely it all will end
    up with SQL tuning, not app level solution...
    "Slava Imeshev" <[email protected]> wrote:
    Mike,
    AFAIR the poblem was not in the driver but in the load balancer
    resubmitting requests. Could you please try to use 9.0.1 driver.
    Regards,
    Slava Imeshev
    "mike" <[email protected]> wrote in message
    news:[email protected]...
    Unfortunately the story is not completely over.
    We found that the new driver in some cases garbles the data. That happenson updates
    when WLS is changing object and the first parameter in the updatestatement is
    string. Sounds weird, so here more details:
    - We found that some strings in the database are garbled.
    - JDBC trace brought us to update statements. It looks like for eachupdate container
    creates prepared statement and sets parameters on it.
    - If the first parameter is a string then it will be garbled (happenswith
    two
    independant objects).
    The problem is defenitely driver-specific. It does not show up withany
    driver
    but 9.2.0.1. All previous drivers work right, but 9.0.1 that we usedbefore had
    the problem described in the thread, and 8.x work at least 10 timesslower
    (no
    kidding).
    Test app which connects to the same oracle instance and executes thestatement
    from JDBC log works fine (sure it does). Adding nls_charset to classpathdoes
    not make any difference. Attempt to create statement from within WLSwas
    not taken.
    Solution was even more bizzare. Since it was happening only when thefirst
    attribute
    was string we shuffled attributes and the problem went away. But Ido not
    believe
    that is a solution - IMHO that just masks the problem.
    Any and all brignt and not-so-much ideas are welcome.

  • JDBC query hangs for 60 seconds

    Hi,
    I'm trying to perform a series of very simple queries on a 8.1.7 database with jdk1.4 and ojdbc14 drivers. Every now and then, a query just hangs for exactly 60 seconds before continuing, without throwing any kind of exception. This sometimes happens after a couple of hundred queries, but it can also be after 4 or five. I thought maybe the database runs out of cursors, but then I would get an exception right? After every query, I close the ResultSet and Statement, so it should work just fine. When I tested the same program on PostgreSQL 7.2, it worked perfectly. Is this a problem with the Oracle JDBC drivers, or am I missing something?
    Here's the code of my simple test app:
    import java.sql.*;
    import java.io.*;
    class JdbcTest {
    public static void main (String args []) throws Exception {
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@foo.bar.com:1521:BLABLA","test", "test");
         for (int i=0;i<500;i++) {
         Statement stmt = conn.createStatement ();
         ResultSet rset = stmt.executeQuery ("SELECT sitenr,omschrijving FROM site");
         while (rset.next ())
              System.out.println (rset.getString (1) + ": " + rset.getString(2));
         rset.close();
         stmt.close();
    conn.close();
    }

    Here's the thread dump:
    "Signal Dispatcher" daemon prio=10 tid=0x009E8118 nid=0xdc4 waiting on condition
    [0..0]
    "Finalizer" daemon prio=9 tid=0x0003E6F0 nid=0xdd4 in Object.wait() [ab1f000..ab
    1fd88]
    at java.lang.Object.wait(Native Method)
    - waiting on <02F81698> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
    - locked <02F81698> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x0003D2C0 nid=0xdd8 in Object.wait() [aa
    df000..aadfd88]
    at java.lang.Object.wait(Native Method)
    - waiting on <02F81700> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:426)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:113)
    - locked <02F81700> (a java.lang.ref.Reference$Lock)
    "main" prio=5 tid=0x00034AB8 nid=0xdc8 runnable [7f000..7fc3c]
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at oracle.net.ns.Packet.receive(Unknown Source)
    at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:931)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
    at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:105)
    at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:586)
    - locked <02FCA940> (a oracle.jdbc.ttc7.TTC7Protocol)
    at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:385)
    at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConn
    ection.java:772)
    at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.
    java:712)
    - locked <02FCA890> (a oracle.jdbc.driver.OracleConnection)
    at JdbcTest.main(JdbcTest.java:11)
    "VM Thread" prio=5 tid=0x009E5030 nid=0xde0 runnable
    "VM Periodic Task Thread" prio=10 tid=0x009E6E00 nid=0xdd0 waiting on condition
    "Suspend Checker Thread" prio=10 tid=0x009E7750 nid=0xdcc runnable

  • Running Web Layout Of JDBC Query in Oracle Report Builder 11g.

    javax.servlet.jsp.JspException: REP-4100: An attempt to execute data source failed. JDBCPDS-62008:A SQL error occurred: {0}. S1000 [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
    javax.servlet.jsp.JspException: REP-4100: An attempt to execute data source failed.
    JDBCPDS-62008:A SQL error occurred: {0}.
    S1000 [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
         at oracle.reports.jsp.ForEachTag.doStartTag(ForEachTag.java:407)
         at jsp_servlet.__module1000802592._jspService(__module1000802592.java:191)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:417)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    For the more clarification, I have used JDBC Query as Data source type and Database connected via ODBC Driver in System DSN. The Driver selected from the drop-downs are jdbc-odbc.
    Kindly explain the mistake I m doing.

  • How to use a jdbc query result to redirect to a variable html page

    uh, my problem is that i'm making a servlet which should redirect to a variable html page based on jdbc query (I'm really sorry if this is not the correct forum to post it, but since it's jdbc i thought it was).
    Anyway, the problem is that when a string say, "mystring" is equal to the value in a column, say "column1" of the database then page should redirect to "mystring.html".
    Is this possible, if so then how?
    and if not then is there any other way to solve my problem?
    please, help!!
    thanks in advance.

    uh, since i've already asked man, please gimme an answer if you know, it'll be appreciated.
    OK, HERE'RE THE DETAILS:(as you requested them)
    i have an html page where there's a textfield say "t1", the value of that text field is sent to the servlet which compares the value of the field with the value in Database, say "db1" in column say "column1".
    if there's a value in the column matching the value inputted in the textfield, then i need the servlet to redirect to an html page of the same name as inputted in the textfield. Hope that helps you understand.....
    thanks in advance.......

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • JDBC query theme in a JSP page

    Hi, everyone
    I tried to write JDBC query theme in a JSP page at MapViewer, but it did not work.
    The following is the codes.
    1.JDBC theme in a map request in XML
    <theme name="jdbc_theme_contour">
    <jdbc_query
    datasource="spatial10g"
    jdbc_srid="8703"
    spatial_column="geom"
    render_style="C.RED">
    Select geom from contour where time='01-JUL-07'
    </jdbc_query>
    </theme>
    2. JDBC theme in a JSP request.
    "<theme name=\"jdbc_theme_contour\" >\n" +
    " <jdbc_query \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " spatial_column=\" geom \"\n" +
    " render_style=\"C.RED\" >\n" +
    " SELECT geom from contour where time='01-JUL-07' \n" +
    " </jdbc_query> \n" +
    " </theme> \n" +
    I do not know whether the second form is right or not. I did not display the JDBC query in MapViewer. Does anyone know the second form is right? or Maybe give me a right form in a JSP request. (contour is a table , geom is the column of geometry attribute in contour)
    Gengsheng

    Hi
    Here is the map request in JSP
    // Construct a map request
    mapRequest = "xml_request=" +
    "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" +
    "<map_request \n" +
    // " title=\"" + title + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " basemap=\"" + basemap + "\"\n" +
    " width=\"" + width + "\"\n" +
    " height=\"" + height + "\"\n" +
    " bgcolor=\"#FFFFFF\" >\n" +
    " format=\"PNG_URL\" >\n" +
    " <center size=\"" + size + "\">\n" +
    " <geoFeature>\n" +
    " <geometricProperty typeName=\"center\">\n" +
    " <Point>\n" +
    " <coordinates>\n" +
    " " + cx + ", " + cy + "\n" +
    " </coordinates>\n" +
    " </Point>\n" +
    " </geometricProperty>\n" +
    " </geoFeature>\n" +
    " </center>\n" +
    "<themes> \n" +
    (flood.equals("true")?
    ("<theme name=\"jdbc_theme_contour\" >\n" +
    " <jdbc_query \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " spatial_column=\"GEOM\"\n" +
    " render_style=\"C.RED\" >\n" +
    " SELECT * from contour where time='01-JUL-07' \n" +
    " </jdbc_query> \n" +
         " </theme> \n") : "") +
         (waterdepth.equals("true")?
         (" <theme name=\"FLOOD.LINKS\" >\n" +
         " </theme> \n") : "") +
         " <theme name=\"net_theme\" user_clickable=\"false\"> \n" +
    " <jdbc_network_query \n" +
    " network_name=\"" + networkName + "\"\n" +
    " network_level=\"1\" \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    (showlinks.equals("true")?
    (" link_style=\"L.CRM_SROADS\"\n") : "") +
    (showlinks.equals("true") && showdir.equals("true")?
    (" direction_style=\"M.IMAGE105_BW\"\n" +
    " direction_position=\"0.75\"\n" +
    " direction_markersize=\"" + dirsize + "\"\n") : "") +
    (showlinks.equals("true") && showlklabels.equals("true")?
    (" link_labelstyle=\"" + lklbstyle + "\"\n" +
    " link_labelcolumn=\"link_id\"\n") : "") +
    (shownodes.equals("true") ?
    (" node_style=\"M.CITY HALL 4\"\n" +
    " node_markersize=\"" + nodesize + "\"\n") : "") +
    (shownodes.equals("true") && showndlabels.equals("true")?
    (" node_labelstyle=\"" + ndlbstyle + "\"\n" +
    " node_labelcolumn=\"" + ndlbcolumn + "\"\n") : "") +
    (showpath.equals("true") ?
    (" path_ids=\"" + pathid + "\"\n" +
    " path_styles=\"L.PH\"\n") : "") +
    " asis=\"false\"></jdbc_network_query> \n" +
    " </theme> \n" +
    (runanalysis.equals("true") &&
    (algorithm.equals("DIJKSTRA") || algorithm.equals("ASEARCH")) ?
    (" <theme name=\"spath_theme\" user_clickable=\"false\"> \n" +
    " <jdbc_network_query \n" +
    " network_name=\"" + networkName + "\"\n" +
    " network_level=\"1\" \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " analysis_algorithm=\"" + algorithm + "\"\n" +
    " shortestpath_style=\"L.DPH\"\n" +
    " shortestpath_startnode=\"" + startnode + "\"\n" +
    " shortestpath_endnode=\"" + endnode + "\"\n" +
    " shortestpath_startstyle=\"M.STAR\"\n" +
    " shortestpath_endstyle=\"M.CIRCLE\"\n" +
    " asis=\"false\"></jdbc_network_query> \n" +
    " </theme> \n") : "") +
    "</themes>\n" +
    "</map_request>\n";
    in this request, other themes and JDBC network query theme work except the JDBC query theme. I guess the style or format in the following are not right.
    " spatial_column=\" geom \"\n" +
    " SELECT geom from contour where time='01-JUL-07' \n" +
    Anyway, I hope you can give me instructions.
    Gengsheng

  • JDBC query in the course of a separate EJB transaction

    Hi all,
    I am implementing a web application that let user upload file and send it to the backend for processing,which involves EJB level transaction(many read+write operations),say transaction L .The processing time may last for 10 minutes. Meanwhile the user can view the history of the files he uploaded and CURRENT STATUS of the file he submitted for processing,we call it file upload history summary (they are from direct JDBC query to the upload history table,say table U in the database,since they are read only data).
    My problem is: the user can not see his LATEST file upload status UNTIL the backend processing transaction is completed,although the row for latest file he just submits in Table U was created during the course of the transaction L by an EntityBean UEJB.
    I am using Jboss server,do u guys have any idea so that I can see the new file status once it's created by the UEJB even before the transaction L is completed?Thanks

    You can achieve this by using JMS and MDB. Because once your file is uploaded, the server is busy in loading the data to the database. So it is not sending you back the response as you are doing a synchronous communication. You have to use Asynchronuous communication to achieve this. This way the client will not wait for the response and the transaction to finish.
    While uploading you a send the file as a message object using JMS and MDB. Let the MDB call the other EJB to load the data to the database. Then you can refresh the status browser automatically in certain periods to retrieve data using other EJB like simple access. The browser will automatically submit itself and get the data from EJB while the other EJB uploading the data to the database.
    Hope this helps. If you are still not clear write again. I will explain it again.
    Thanks
    Amit

  • Oracle 9.2.0.6; query hangs if partition doesn't exist

    Hallo all,
    this is the first time I post on this forum.
    I work in a group of PL\SQL developers in Italy. Few day ago we had a problem with a query and like to find out what the problem is.
    We have an Oracle DB version 9.2.0.6 (old I know) in a production environment. Linux OS.
    The query was made to extract data from a partitined table, on a partioned field, in our casa one Year. By mistake we have serced for the wrong year, 2013. There where no data for that year and therefor no partition.
    So, happened that the query hangs and after 24 hours was terminated.
    What we expected indeed was a zero records retirned in, at the most, few minutes, see that the table, in severa partition contains about 16 million records.
    The we tested the same query but in a different enviroment, Oracle 11gr2, same table structure, same partitioning, without partition 2013, and the query completed in less tha 1 minute with zero records in output.
    At this point we thought of a bug, but can't find any reference.
    Has anyone had a similar experience or can give some indication of possible bug report.
    Thanks for any help.

    Hi Rob,
    thank you for your answer.
    Sorry if this is not the best forum. I am not very practical.
    I try to answer to your questions.
    At a first time we thought the query did a full scan on the table. Yes. But even to full scan 16.000.000 records split in no more than 8 partition (at this time) shouldn't take up to 24 hours and never stop running. I think.
    We don't have a DBA role so we do not have full control over what is running. And take too long time to open a ticket and ask the DBA to check.
    What we did is testing the same query in a pre-prod environment, which is an Oracle 11gr2.
    I understand that it is not very usual to have a pre-production environment with a latest version of oracle but this is the way we have to work.
    Anyway, the test in pre-production worked very well. Without 2013 partition the return was very fast and we had zero records as expected.
    Then we found a workaround for production, ora 9. Call it work around maybe is too much ........
    We created the 2013 partition and run the query. The respons was then succesfull in about the same time than in pre-prod. Less than one minute and zero records.
    And this is fine for us.
    What we don't understand is why this different behavior with two different version of DB. Thats why we think it is due to a bug. We only want to find out whether it is this or if there is a different reason.
    Some other response or help would help.
    Thank you.

  • JDBC query against Sybase through jConnect5.5 in Oracle 9i Reports Builder

    Hi There,
    I am trying to connect to Sybase using JDBC query using jConnect55 driver.
    I am not able to do so. I get an error:
    ERR 62002: Failed to connect to the datasource JZ0D5 JZ0D5: Error loading protocol com.sybase.jdbc2//255.255.255.255//255.255.255.255
    Driver entry in my jdbcpds.conf file is
    <driver name ="jConnect55"
    subProtocol ="sybase"
    connectString ="mainProtocol:subProtocol://databaseName"
    class = "com.sybase.jdbc2.jdbc.SybDriver"
    connection = "oracle.reports.plugin.datasource.jdbcpds.JDBCConnectionHandling" loginTimeout = "0">
    <property name="DatabaseName" value="tempdb"/>
    </driver>
    The entry I make in jdbc query connection dialog box is as under:
    User Name:test
    password:secret
    Databse: 255.255.255.255:9999/tempdb
    Driver Type: jConnect55
    Can you point me where I am wrong?
    Thanks in advance
    Ketan Patel

    Hi Sachin,
    I too, got through the issue. Sorry am bit late in updating you. But still I would say it is not on consistent(my feedback as per I grabbed from the behavior. Say, I accepted the query in a particular order of WHERE clause, then If I change the order it will throw an error message saying "Incorrect syntax".)
    Anyway working fine. Thanks for your immediate response with useful hints.
    Rgds
    Anand
    Hi Anand,
    Yes, JDBCPDS accepts all Select queries which follows SQL Specification.
    It would be a valid query as per the database used.
    Please try again, Bind parameters can be placed in any or all of the conditions of SQL Query in JDBCPDS.
    I am able to use them in both the cases you told.
    With Regards
    Reports team

  • JDBC Query using PL/SQL

    I have gotten this to work in my Reports class but can not get this to work at my company. Basically I'm trying to use the JDBC query in Report Builder.
    Here is my Ref Cursor Code:
    CREATE OR REPLACE PACKAGE SCOTT.types is
    type sqlcur is REF cursor;
    end;
    Here is my Pl/SQL function:
    CREATE OR REPLACE FUNCTION SCOTT.test return Scott.types.sqlcur is
    c1 Scott.types.sqlcur;
    begin
    open c1 for select * from scott.emp;
    return c1;
    end;
    I can get this to work in SQL Plus by doing the following:
    var r refcursor
    exec :r := test;
    print r When I go into Reports Builder->JDBC query I connect to the SCOTT db using tiger as the password. I type in the function name TEST and get the error "wrong number or types of arguments in call TEST". I have tried "call TEST" but that doesnt work either. If I use "call TEST" I get an error saying it expected characters ":=(@" etc....
    I know my connection works because I can do a "select * from emp" and get results. Can anyone get this to work?
    I'm running Report Builder 9.0.2.0.3
    I have done multiple searches on this issue and most responses point someone to links that dont work or documentation. I have read them and my code above should work but doesnt........Please put some real examples or code that works with the "Scott" schema.
    Thanks

    hi Shawn
    When running jdbc quesry based on SP with Oracle DB, the first parameter of the store procedure should be of ref cursor type and it shall be a OUT parameter.
    For example:
    CREATE OR REPLACE PACKAGE jdbcpdspkg AS
    TYPE Empcur IS ref cursor ;
    procedure proc_with_param      (p_emp_cv out jdbcpdspkg .empcur, p1 in number, p2 in number , p3 in number, p4 in number , p5 in number) ;
    Thanks
    Rohit

  • Sql query hangs close to the end

    Hi:
    I am on 10.2.0.3.
    My rather simple query hangs for a few minutes close to the end. It's supposed to return 288 rows and it immediately returns 285, then hangs for 4-5 min, than returns the remaining 3 rows. Kind of similar behavior to using "First_rows" hint - which I'm not using...
    The table has about 100,000 rows.
    Some relevant info is below.
    Any ides appreciated.
    TIA
    PLAN_TABLE_OUTPUT
    Plan hash value: 2481764356
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 30 | 3 (0)| 00:00:01 |
    |* 1 | INDEX RANGE SCAN| PSACOMBO_DATA_TBL | 1 | 30 | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - access("SETID"='GLOBL' AND "PROCESS_GROUP"='100ACDTPRJ' AND
    "COMBINATION"='100ACDTPRJ' AND "VALID_CODE"='V')
    optimizer_dynamic_sampling integer 6
    optimizer_features_enable string 10.2.0.3
    optimizer_index_caching integer 25
    optimizer_index_cost_adj integer 75
    optimizer_mode string ALL_ROWS
    optimizer_secure_view_merging boolean TRUE
    unnestsubquery boolean FALSE

    You said the query is supposed to return 288 rows, but from the explain plan, Oracle "see" only 1 row to be returned. Are the stats up-to-date ? What's the actual query ?
    Please, on the forum side, use tags before and after your code to keep it readable (preserve blanks and tabs).
    Nicolas.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Query hangs on Value Help

    Hi,
    We have created a query in which we are using quantity conversion ( defined in RSUOM ) , the target quantity is to be taken from a variable. The quantity conversions is running fine but when we do a value help for the target quantity variable in Portal, the query hangs. We are not facing any such  issue in Bex Analyzer.
    Please share your ideas on what could be the possible reason for this.
    Thanks and Regards,
    Manish Sharma

    Hello Manish,
    This is clearly a Portal issue.
    Probably an issue with BI Java.
    I recommend you to update your BI Java components to latest patch recommended by Java SP_Patch Matrix.
    If you are using Netweaver 7.0, please check the link below:
    http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/6010addf-e096-2b10-8893-e98586d005f9 [original link is broken]
    If you are using Netweaver 7.0 EHP 1 (7.01), please the this link:
    http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/c098b21c-e56f-2d10-2aad-b13915b396a4 [original link is broken]
    Applying the patches recommended should solve the issue.
    Also, as a recommendation, run the BI Diagnostics - note 937697 - and correct the red alerts.
    Best Regards,
    Edward John

  • JDBC Query Single Row service Parse Query

    Using JDBC Query Single Row service on an Oracle database,
    I specify a SQL statement like this:
    select abc, to_char(aDate, 'MM/DD/YYYY') from xyz where def = 123
    then I click the "Parse Query" button to try to map the query results to my variables, but the mapping window gives me 3 fields instead of 2:
    1. abc
    2. to_char(aDate)
    3. 'MM/DD/YYYY'
    how do I let it understand that there are only 2 fields in the results so that I can map it properly?
    thanks

    Got a new minor issue unrelated to the above, but I don't want to flood this forum with another new topic, so I'll stick this new thing here.
    I have a very simple process that only contains this JDBC Query Single Row service.
    In this query single row service, at the bottom of the property sheet, there's a section where it says "number of rows retrieved"...
    now, if I map this 'number of rows' to a variable (I set the variable's type as "int"), when I call my process (as a web service), it returns me nothing... all the output parameters are empty.
    If I remove the mapping of "number of rows", that is, there's nothing in that bottom section. Then my process works correctly, all the output variables contain correct data from my database.
    Has anybody encountered this? what's your solution please?

  • WMI query hanging

    I have some code (VB Script) that is collecting CPU performance metrics from WMI.  The code works well on all of the servers (identical servers) but after a period of time (8 hours, 30 hours, other random times) on some of the servers the query hangs.
     After several hours (e.g. 8 hours) the query will work again on the server.  I have used WBEMTEST to query the CIMv2 namespace to perform the same query on the server where WMI is having a problem and it also hangs.
    The query eventually times out and does not return a value.
    I have asked the team to rebuild WMI and after they completed the rebuild, the problem still occurs.
    Since the code is only performing a read operation on WMI, I do not see how the query can cause the hang of WMI.
    Any ideas on what I should do next?
    Thanks

    Hi,
    Before going further, would you please let me know whether install all
    necessary Windows Updates on those servers?
    à
    but after a period of time (8 hours, 30 hours, other random times) on some of the servers the query hangs.
    When the
    hang issue occurred, please check if consume high RAM or CPU. Just a confirmation, thanks for your understanding.
    In addition, please use the WMI Diagnosis Utility and check if can help you to analyze this issue. for more
    details, please refer to following articles.
    WMI Diagnosis Utility
    WMIDiag 2.1 is here!
    If any update, please feel free to let me know.
    Hope this helps.
    Best regards,
    Justin Gu

Maybe you are looking for

  • Regarding smartforms very urgent

    Hi All, I have created a smartfrom.In that I have converted smartform output to html.Now I am sending this HTML output as an attachment to an email address but here I am unable to add graphic to the HTML ouput.How can I do this. Regards, shravan

  • How to store apps in sd card??

    hey.....anyone ....pls tell me how i can save my games and apps in sd card......because when i download from bb market all apps and game stores in phone memory.....so my phone memory is going to full.... so pls tell me how i can store game in sd card

  • Authentication failed network

    Hello friends, I have a customer who changed his core switch network by another model, Allied x900-24xs, after this change some workstations are experiencing the problem of authentication in the network, the problem happens randomly, with stations th

  • IPad VGA projected image offset and cut off

    I bought an iPad VGA cable last night and hooked it up to my Optoma PT-100 projector (cheap kiddie projector, 854x480 resolution). I tried slideshow and the pictures were horizontally stretched.  Bummer. Then I tried netflix and I noticed a far more

  • Sending photos by e-mail from IPhoto

    Sometimes Iphoto will not "recognize" the address I specify in the <TO:> From which program does Iphoto draw its database of addresses??