Concurrent Query through Informix JDBC

Hi,
I am using Informix Jdbc in my JSP ( Driver Downloaded from IBM Site). In case of concurrent calls to that Jsp , I am getting mixed result in the client site. It's written in the Informix JDBC Spec that "The Same statement or resultset instance cannot be accessed concurrently accross the threads". But what is the alternative way? Anybody found any solution....Any help appriciated.

Hi k_dey,
I don't use Informix JDBC driver, but looking through the Informix JDBC Driver Programmer's Guide UNIX and Windows Environments, V2.21, it appears that statement caching is enabled by setting the STMT_CACHE environment variable to 1 (one). Unfortunately, I couldn't find anything in the guide on how to disable statement caching, so I searched the archives of the "comp.databases.informix" newsgroup (for the word 'STMT_CACHE') and it seems that if you set it to 0 (zero), it disables statement caching.
The guide says that you can set these environment variables through JDBC by either including NAME=VALUE pairs in the database connection URL, or supplying a "java.util.Properties" object as a parameter to the "getConnection()" method (in class "java.sql.DriverManager").
According to the guide, this is the format for the URL:
jdbc:informix-sqli://[{ip-address|host-name}:port-number][dbname]:
INFORMIXSERVER=server-name;[user=user;password=password]
[;name=value[;name=value]...]
So I guess you just need to write:
;STMT_CACHE=0instead of
;name=valueAnd here is some slightly modified code, also taken from the guide:
Properties pr = new Properties();
pr.put("STMT_CACHE","0");
conn = DriverManager.getConnection(newUrl, pr);The guide says that you must use only one of the above two methods, i.e. either set the environment variable in the URL, or use the "Properties" parameter.
Hope this helps.
Good Luck,
Avi.

Similar Messages

  • WebLogic Informix JDBC driver query

    We are developing an application with WL6.1 Express. One of the databases
    we need to connect to is Informix 7.2. Since WL's jDriver can work with
    Informix, I'd assume we do not need to buy any additional drivers from IBM.
    1) Is my assumption correct?
    2) Not having worked with Informix before, what needs to be done on the
    Informix server to enable this connection?
    3) Is the WL jDriver for Informix reliable or are we better off buying the
    Informix JDBC driver?
    Appreciate any advice on the matter, thanks.

    Kai wrote:
    >
    We are developing an application with WL6.1 Express. One of the databases
    we need to connect to is Informix 7.2. Since WL's jDriver can work with
    Informix, I'd assume we do not need to buy any additional drivers from IBM.
    1) Is my assumption correct?yes.
    2) Not having worked with Informix before, what needs to be done on the
    Informix server to enable this connection?that should be documented in our stuff.
    3) Is the WL jDriver for Informix reliable or are we better off buying the
    Informix JDBC driver?The one from Informix is better. Last time I checked, Informix's driver was free.
    Unless it is expensive, I recommend it.
    Joe Weinstein
    >
    Appreciate any advice on the matter, thanks.--
    B.E.A. is now hiring! (12/14/01) If interested send a resume to [email protected]
    DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco, CA
    E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
    SOFTWARE ENGINEER (DBA) Liberty Corner, NJ
    SENIOR WEB DEVELOPER San Jose, CA
    SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTH CAROLINA San Jose, CA
    SR. PRODUCT MANAGER Bellevue, WA
    SR. WEB DESIGNER San Jose, CA
    Channel Marketing Manager - EMEA Region London, GBR
    DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
    SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
    E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
    QUALITY ASSURANCE ENGINEER Redmond, WA
    Services Development Manager (Business Development Manager - Services) Paris, FRA; Munich, DEU
    SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
    E-Marketing Programs Specialist EMEA London, GBR
    BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
    MANAGER, E-SALES Plano, TX

  • Union clause in Informix JDBC

    Hello for all
    I'm using informix JDBC driver and when I make a select with union it returns the error messages:
    java.sql.SQLException: Corresponding column types must be compatible for each UNION statement.
    java.sql.SQLException: Must have the same number of selected columns in each UNION element.
    Please, help me
    Thanks

    this is a problem in your SQL-statement:
    there should be equal number of columns and they should be all of the same type:
    select id, description, url from table1
    union
    select description from table2is wrong....
    select id, description, url from table1
    union
    select number,name, address from table2is right, because the number of columns is equal and the type is equal...
    Consider this: you are appending the output of one query with another.... it all should match in order for it to be 1 table....
    hth,
    SurfMan

  • UCCX 8 access db_cra from script add informix jdbc driver

    Hi,
    I want to use the db_cra database for the last agent routing from the call flow script.
    I will run a query which serach wihtin the last 24 hours which agent talked to the customer the last time.
    The problem is, that I'm not able to add the informix db into the uccx database subsystems.
    I can only select these driver classes:
    net.sourceforge.jtds.idbc.driver
    com.ibm.db2.jcc.DB2Driver
    oracle.jdbc.driver.OrcaleDriver
    com.sybase.jdbc2.jdbc.SybDriver
    But for the Informix Db I think I would need  the driver class:
    com.informix.jdbc.IfxDriver.
    Has anyone a idea how to add a driver class or how to access the db_cra from the script?
    I know that it is possible to use a differnt database (like MSSQL) and write each time a agent gets a call the data to this db and access this one for last agent routing functions. But I want to use the db_cra for this.
    thanks
    Markus

    Hi,
    there is no way to do it that way.
    You can't access the Informix DB directly from UCCX script.
    But you can use a SQL server as a middleware. So you have to setup a SQL server and add the Informix db as a linked server.
    Now you should be able to access the SQL server from the UCCX script.
    Kind regards
    Markus
    CONET Solutions GmbH
    Markus Schweitzer,
    Theodor-Heuss-Allee 19, 53773 Hennef
    Tel.: +49 2242 939-676, Fax: +49 2242 939-393
    Mobil: +49 173 5486337
    Internet: http://www.conet.de, mailto: [email protected]

  • Submitting XML Publisher Concurrent Program through PL/SQL

    Hi,
    I am trying to submit a XML Publisher concurrent program through PL/SQL API fnd_request.submit_request.
    The request gets fired and completes successfully but it doesn't pick up the default template attached to it. Its output is plain XML but expected output is PDF report.
    However when I submit this report from SRS, it picks up the default template and gives output in PDF.
    Please let me know what could be going wrong?
    Regards,
    Nitin

    Check out the FND_REQUEST.ADD_LAYOUT API. You need to call it before you submit your report.
    Cheers,
    Dave

  • Error while executing the stored procedure through sender JDBC adapter

    Hi All,
    I am getting below error while executing the stored procedure through sender JDBC adapter.
    Database-level error reported by JDBC driver while executing statement 'exec SapgetNextEntity 'SalesOrder''. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor.
    what is the problem? any idea to anyone...
    regards
    Ramesh

    hi Dharamveer,
    I am not getting below statement for your reply
    Try to use Refrence Cursor it will return u reference of resultset.
    I mention SP like this
    exec SapgetNextEntity 'SalesOrder'
    SapgetNextEntity -
    > SP Name
    SalesOrder----
    > Parameter I am passing...
    regards
    Ramesh

  • Submitting concurrent request through oa framework page

    want to submit a concurrent request through oa framework page and i wrote this code in controller
    try
    OAApplicationModule am = pageContext.getApplicationModule(webBean) ;
    OADBTransaction transaction = am.getOADBTransaction();
    Connection conn = transaction.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(conn);
    cr.setDeferred();
    Vector param = new Vector();
    param.add("21092008");
    int reqId = cr.submitRequest("XXC", "XXC_DATE_VALIDATION_TEST_1", "XXC DATE VALIDATION TEST 1", null, false, param);
    transaction.commit();
    System.out.println("Request ID >>> "+reqId);
    String id = "" + reqId + "";
    HashMap parameters = new HashMap();
    String url = "OA.jsp?akRegionCode=FNDCPREQUESTVIEWREGION&akRegionApplicationId=0";
    //parameters.put("akRegionApplicationId", "0");
    // parameters.put("akRegionCode", "FNDCPREQUESTVIEWPAGE");
    //parameters.put("akRegionCode", "FNDCPPROGRAMPAGE");
    parameters.put("requestMode", "DEFERRED");
    parameters.put("requestId", id);
    pageContext.setForwardURL(url,
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    parameters,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    catch (SetDeferredException e)
    throw new OAException("Munish SetDeferredException " + e.getMessage(),OAException.ERROR);
    catch (RequestSubmissionException e)
    throw new OAException("Munish RequestSubmissionException " + e.getMessage(),OAException.ERROR);
    catch (Exception e)
    throw new OAException("Munish Exception " + e.getMessage(),OAException.ERROR);
    but i dont know whether it is submitted or not
    when i find my request using request id through e bussiness suite i can see ant thing regarding this id
    and i m getting this error
    java.lang.NullPointerException
    at oracle.apps.fnd.cp.viewreq.webui.ViewRequestsPageCO.processRequest(ViewRequestsPageCO.java:213)
    could anyone help me please
    Thanks

    Check the "Adding Request Monitoring to Your Product" section from dev guide.
    --Shiv                                                                                                                                                                               

  • Error  while executing query through rsrt

    hello experts,
    I am facing following error while executing one HR query through rsrt.
    "System error in program SAPLRRI2 and form REP_ASSIGN_INITIAL_OPT-01- (see long text) "
    while executing query through rsrt it automatically goes to debug mode, coming out of debug mode i get the screan showing above error message.
    What would be an issue?
    Regards,
    Nirav
    Edited by: Nirav Shah on Apr 21, 2008 8:19 AM

    Hi ramesh,
    I havent kept any execlusion selection. Though i saw long text, it is like this:
    "Diagnosis
    This internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572.
      Notification Number BRAIN 299 "
    Regards,
    Nirav

  • SPARQL query through Jena adaptor not work when string literals used

    Hi,
    When I executed the following SPARQL query through Oracle Jena adaptor:
    SELECT ?personHasFirstName WHERE
    {?personHasFirstName foaf:firstName ?name . }
    I got the expected results.
    However it won't return anything when I narrowed the query to match a particular name like below:
    SELECT ?personHasFirstName WHERE
    {?personHasFirstName foaf:firstName \"Julie\" . }
    I also tried the Filter approach:
    SELECT ?personHasFirstName WHERE {?personHasFirstName foaf:firstName ?name . FILTER (?name =\"Julie\") }
    It still doesn't return any results.
    I saw from the release notes about the bug dealing with "\". My guess is that the above behavior is caused by that bug. What is the suggested way to walk-around this? Thanks,
    Weihua

    Could you please try this? It works as expected on my machine.
    GraphOracleSem graph = new GraphOracleSem( oracle, modelName);
    ModelOracleSem model = new ModelOracleSem(graph);
    Node sub = Node.createURI("http://test.com/employee123");
    Node pre = Node.createURI("http://xmlns.com/foaf/0.1/firstName");
    Node obj = Node.createLiteral("Julie");
    graph.add(Triple.create(sub, pre, obj));
    String queryString =
    " PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
    "SELECT ?person WHERE { ?person foaf:firstName \"Julie\" . } ";
    QueryExecution qexec = QueryExecutionFactory.create(
    QueryFactory.create(queryString), model);
    try {
    ResultSet results = qexec.execSelect();
    while (results.hasNext()) {
    QuerySolution soln = results.nextSolution();
    psOut.println("runQuery: soln " + soln);
    finally {
    if (qexec != null)
    qexec.close();
    output snippet:
    runQuery: soln ( ?person = <http://test.com/employee123> )

  • Getting SQL*Net more data from client waits when running a query through web based interface

    Hi, you all,
    We are having this weird behavior when running query through web based interface, we get a lot of "SQL*Net more data from client" waits, the OEM indicates that the current wait event is SQL*Net more data from client
    It's just a very simple query wich invokes a db link.
    When I execute the same query on any PL/SQL tool like toad or sql developer it works fine, but that query inside an application executed through a web based interface, it hangs for ever.
    Where can I start looking for the problem.
    We are working on a 3 Node RAC 11gr2, both databases are on the same RAC.
    Thanks.

    Hi ,
    we managed to reproduce the case in test environment, below are the steps:
    1)have 2 databases on different machines, will call the first one local, the other one remote.
    2)in the local database create:
    a - DBLink to remote database.
    b - read data from remote database(we simply used select count(*) from dummy_table )
    c - insert data into a table on the local database
    d - terminate the connection between the 2 databases (disconnect either machine from the network)
    e - commit on local database.
    what we noticed was the following:
    1)when the local database is disconnected from the network(the machine is not connected to any network at the moment): almost immediately throws an error, and issuing the following:
    select * from dba_2pc_pending;we found some data .
    2) when the remote database was disconnected(the local database is still connected to the network):
    after 7-8 seconds an error is thrown, and issuing the following:
    select * from dba_2pc_pending;did not return any data.
    since this is pretty similar to our case ,we concluded that it's a network issue.
    is this the correct behavior ?
    as a temporary solution till the network issue is fixed ,we did the following:
    1) changed the call of the remote procedure to calling a local procedure that calls the remote procedure.
    2) added pragma autonomous_transaction to the local procedure.
    3) at the end of the local procedure rollback the autonomous transaction.
    it seems that since the global transaction does not use the DBLink database does not issue a 2PC commit.
    this works in my cases since the DBLink is only issed to read data.

  • Transport of infoset Query through Report RSAQR3TR

    Dear Hcm Gurus
    I have created query through sq01 and change functional area sq02 as per requirement in this query
    i have created additional fields in infoset in which i also assigned abap field code on newly created  data fields
    i also assigned new data fields to relavent field group as well
    but when i export and import as per mentioned procedures , additional data field are not imported in target client
    i have follow steps as mentioned
    Step 1
    Run RSAQR3TR in 'old' system. Select EXPORT and specify the objects to be transported. (System includes these in an automatically created transport request)
    Step 2.
    Release this transport and request it be transported to 'new' system. (This results in the entries being populated in transport table AQTDB in 'new' system).
    Step 3.
    Run RSAQR3TR in 'new' system. Select IMPORT and tick the Overwrite checkbox. Specify the transport number in the field labelled 'dataset with imports'.
    Kindly guide me urgently that how additional fields are transported in target client
    Regards
    Barket Ali Zafar
    SAP HCM Consultant
    Siemens Pakistan
    +92-0300-5521524

    yes
    but my question is ? that additional data field defineds in functional area /infoset are not importing ?
    Kindly guide me urgently

  • "Error #2032" while trying to import BEx query through SAP Netweaver BW connection in Dasboard

    Hi Team,
    BO server version: 4.1 SP3 Edge edition
    Dasboard Version: 4.1 SP3
    BI Version: NW 7.4 SP7 (ABAP only)
    We are getting Error #2032 while trying to import BEx query through SAP
    Netweaver BW connection in dasboard Xcelsius.
    Please suggest to sovle this error.
    Regards,
    Vinay Shrimali

    There are several notes about this error - please see http://service.sap.com/sap/support/notes/1856691
    http://service.sap.com/sap/support/notes/1801130

  • Can I connect to Oracle server7.1  through Java-JDBC using the latest thin drivers???

    Hey Gurus,
    Please help me .
    MY Current requirement is to connect to multiple oracle 7.1( and other variants) servers running on different operating systems, through Java/JDBC.
    My FIrst question is, can i connect to older versions of database using latest drivers?
    I could connect to the server running on SCO-oracle 7.1 using SQLNet8.1.7 under windows. But the same is not happening when the client is on Linux.But I need to connect from linux
    It says ORA-03113 - End of communication channel.
    What may be th problem.
    If any one could show some pointers where I can get more information about this problem would be helpfull
    THanks
    Lokesh

    I tried the classpath suggestion above (not the one modifying the .xml file) , but it didnt work for me , I am using WLI 10.3.1 and trying to connect DB on 8.1.7 V . I downloaded the classes12.jar and the ojdbc14.jar file from the oracle and placed in lib and the even included the classpath , but i again got the same exception .
    All this while i was selecting the option Oracle Driver Thin from the DataBase Driver when creating the connection pool from console . I tried with "BEA Oracle Driver (Type 4)" and it worked for me .. Although the option "BEA Oracle Driver (Type 4)" lists only the DBs from 9.0.1 to 11 G , but in my case using this driver i am able to connect to Oracle DB 8.1.7 . So all you guys if it classpath doesnt fix the issue try out by selecting Driver , "BEA Oracle Driver (Type 4)" .
    Manoj , this will fix the Connection pool part of the ques, but for the java part Try to load the Driver class "weblogic.jdbc.oracle.OracleDriver" before connecting to DB with Class.forName.
    Thx
    Yatin Mehta

  • Junk characters displayed when viewing BEx query through WAD

    Hello,
    I am trying to display the results of a web report containing a BEx query through the "Execute in the Browser" option in WAD. But, junk Chinese characters keep showing up in the display. Also, if I try the same with one of the older web reports, they display fine. But, the moment I make a copy of these and execute without any modifications, the junk characters show up again.
    I tried executing through RSRT and there my report works perfectly. So, what could be going wrong or am I missing something?
    Thanks in advance!
    Menaz

    Thanks Emma.
    We figured it was related to the Unicode charset while I was going through the source code. I don't think there is any permanent fix yet. But, I followed the posting below and am trying to temporarily fix the error:
    Web Application Designer Appearing in Unicode (UTF-8)
    Thank you!

  • Execute Query through Variable

    I want to execute query through variable in Oracle Developer
    sql_text varchar(1000);
    sql_text:='select some query';
    How to execute this query text stored in sql_text variable?
    Regards,

    If your query returns only one row, you can use:
    EXECUTE IMMEDIATE sqltext INTO <list of into variables> USING <list of input bind variables>.
    If you query returns more than one row, you must open a cursor:
    - either with DBMS_SQL package
    - or declare a REF CURSOR and use OPEN ,FETCH, CLOSE:
    c REF CURSOR;
    OPEN c FOR sqltext;
    FETCH c INTO <list of into variables>;
    CLOSE c

Maybe you are looking for

  • Sound stream played too fast

    hello, i'm trying to stream audio byte[] data over multicast network (UDP). on the receiving end, the sample is played way too fast. CMIIW, this has nothing to do with networking stuff, but an audio playback problem. can someone give a hint? here's t

  • GRN reversal

    Dear Sir Inspetion is active for material type ROH.UD is made for inspection lot and stock is transferred to UR.After that due to some problem , we want to camcell the GRN.So again stock is taken back to QI by activating inspection type 08.Then also

  • SessionMap Class

    Hi All, When build the project of Change the WorkSpace Layout i found this error "Could not resolve <lc:SessionMap> to a component implementation."

  • Replacing a WRT150N with an E2500

    NOVICE QUESTION:  I want to replace a WRT150N with an E2500 and retain the setup/settings of the WRT150N.  Is that possible and can you give me the steps I need to take.  Thank you, in advance, for your response(s)!

  • Bridge import images - sort order

    This problem goes back at least to CS2: When using the Bridge "Get photos from camera" function to import from either a camera or CF card, Bridge INSISTS on sorting the input by date descending (newest first) and then filename (or timestamp, I can't