ConnectPool doesn't work as Oracle say

Hi,
Any one has ideas:
ConnectionPool *connPool = env->createConnectionPool
(poolUserName, poolPassword, connectString, 1, 5, 1);
Connection *conn1 = connPool->createConnection (username, passWord);
Connection *conn2 = connPool->createConnection (username, passWord);
Connection *conn3 = connPool->createConnection (username, passWord);
After this code was run, the connections I counted thru DBA Studio was still 1. It mean that ConnectionPool do not create conn2, conn3??
Help me please
Thanks

Real connections are created only when there is a round-trip requirement. In this case, you saw one connection because that is the minConn of the pool, and it gets created when the pool is created. The createConnection() calls create virtual connections and they get real connections mapped from the pool at the time of a round-trip and the unmapping happens as soon as the round-trip is done. If there is a need by multiple threads concurrently for doing round trips, then the pool size grows to serve all the threads concurrently.

Similar Messages

  • I just downloaded the updates and now my mail doesn't work. It says I now need a newer version of OS to allow I've to open my mail which I can't right now

    I just downloaded the updates and now my mail doesn't work. It says I now need a newer version of OS to allow I've to open my mail which I can't right now

    What version of the OS X are you running? Go to the Apple in the upper left corner and select About This Mac and report the Version back here.

  • HT201407 I bought my iphone 4 in the UK and I am trying to use a sim in the UAE and it doesn't work.  It says that the sim is not valid, how can I get this unlocked?

    I bought my iphone 4 in the UK and I am trying to use a sim in the UAE and it doesn't work.  It says that the sim is not valid, how can I get this unlocked?

    You are saying the phone is locked, but then you are saying there is no provider. The two situations cannot peacefully coexist. Contact Apple and they can tell you if the phone is locked and if locked to which provider the phone is locked. People on this board are not Apple employees and cannot get you that information.

  • HT4009 How do I get A refund on an IPAD app that doesn't work ? Vendor says I have to go to Apple.

    How do I get A refund on an IPAD app that doesn't work ? Vendor says I have to go to Apple.

    Go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • After downloading Yosemite, my Ps CS4 doesn't work. It says install legacy Java SE 6, but when i go ok, or, more info can not reach any point to have it!!!

    After downloading Yosemite, my Ps CS4 doesn't work. It says install legacy Java SE 6, but when i go ok, or, more info can not reach any point to have it!!! What will I do?

    I have similar issues and was referred to a knowledge base article support.apple.com/kb/DL1572  This seems to corrected the issue.

  • Xdofo:show-carry-forward number-separators doesn't work in Oracle EBS 11i

    I am displaying the ‘page total’ from within the footer of the xml-report by using the page total syntax ‘<xdofo:show-carry-forward name="pt" format="99G999G999D00"/>’.
    Here the issue is that for report displayed in Spanish we are unable to display the Page Total in the required number format ie. The decimal separator should be ‘,’ and the group separator is ‘.’, since the Page Total is auto calculated and we are not able to save this value to any variable.
    Currently Output is coming like: 12,052.00
    Required output: 12.052,00
    As well as I tried the below statement
    <xdofo:inline-total display-condition="exceptlast" name="pt"><xdofo:show-carry-forward name="pt" format="99G999G999D00" number-separators=",."/></xdofo:inline-total>
    But it doesn’t work in Oracle Applications 11i instance.
    Anyone having any idea?
    Regards,
    Madhurendra

    We had a similar issue and we got the solution.
    Try this
    Got the solution and this is very important one !!!
    <xdofo:inline-total display-condition="exceptlast" name="InvAmt"><xdofo:show-carry-forward name="InvAmt" format="99G999G999D00" number-separators=",."/></xdofo:inline-total>
    <xdofo:inline-total display-condition="exceptfirst" name="InvAmt"><xdofo:show-brought-forward name="InvAmt" format="99G999G999D00" number-separators=",."/></xdofo:inline-total>

  • TS3992 i got problem updating my iphone 3g. my phone doesn't work now. it says no service and can not be activated.beside that it says insert sim even it has sim. please help me.

    i got problem updating my iphone 3g. my phone doesn't work now. it says no service and can not be activated.beside that it says insert sim even it has sim. please help me.

    I have just created this account to tell you that nothing would change if you restored your phone.
    The first NO SIM nuisance happened just a week ago. Nothing had been done to the phone before that. I pressed HOME + POWER buttons to restart the phone and SIM card was successfully recognized as if nothing had happened. Then I had a lucky week, not reminded of this issue at all.
    Today, however, the same problem keeps annoying me. I've used the same method to heal the phone but all I have done seems more like a placebo. So I tried the ultimate solution, restroing it in iTunes.
    Ridicuously, the moment I finished basic setup on the newly restored phone, the same NO SIM CARD INSTALLED message poped up.
    So IMO, it's not what you should do to erase and restore your phone.
    Plus, I called my native carrier and they said no such problems have been submitted. And since my nano SIM card is quite new (three months old), I'm not going to replace it.
    I googled this problem and found something on a Hong Kong webpage. The author of that thread points out that there is a flaw in the SIM card tray that prevents the phone from successfully recognizing SIM cards.
    And I really hope Apple could probe into this issue and give official solutions other than restarting / restoring the phone like an idiot.

  • My ibook g4 won't start anymor from the harddisk. so I tried to reinstall the system from the orginial system cd. Doesn't work. It says the system cd is damaged. What should I do?

    my ibook g4 won't start anymor from the harddisk. so I tried to reinstall the system from the orginial system cd. Doesn't work. It says the system cd is damaged. What should I do?

    I would question that error message if the Mac OS X 10.5 DVD doesn't work, either.
    What error message(s) did you get with the Mac OS X 10.5 DVD? Is the Mac OS X 10.5 DVD the full retail install DVD, an upgrade DVD, or a DVD that came with another Mac?

  • HT4972 When I tried to update my iOS 4 ipad to iOS 6, it doesn't work but only say that the ipad software update server cannot be contacted. What should I do?

    When I tried to update my iOS 4 ipad to iOS 6, it doesn't work but only say that the ipad software update server cannot be contacted. What should I do?

    Hi Ruby,
    Thanks for visiting Apple Support Communities.
    You may find the troubleshooting steps in this article helpful for troubleshooting the connection issue you're seeing:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    Regards,
    Jeremy

  • My iPod 5th generation charger doesn't work but it says it's charging. When I use another person'a charger, the iPod charges fine. Has anyone had this problem?

    My iPod 5th generation, The charger doesn't work but it says it's charging. When I use another person's charger, the iPod charges fine. Has anyone had this problem?

    Yes, the Lightning cables do fail sometimes. They are covered by the same one-year warranty as the iPod
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • Subquery for inserting doesn't work in Oracle package

    I have experienced a very strange scenario while inserting data inside a Oracle package.
    I have two tables:
    - table "A"
    Columns: "ID", "Value1", "...."
    - table "A_Backup", which contains backup data for table A. It has one more column "BATCH_NUMBER" than table A
    Columns: "BATCH_NUMBER", "ID", "Value1", "...."
    I created following procedure in a package to backup data from table "A" to "A_Backup".
    procedure proc_backup (v_id in number) is
    declare
    v_batch_number varchar2(20);
    begin
    /** generate a batch number using system date */
    select 'BATCH' || to_char(sysdate, 'YYYYMMDDHH24MISS') into v_batch_number from dual;
    /** insert Batch_NUMBER + data from A into A_BACKUP */
    insert into A_BACKUP (select v_batch_number, id, value1, ... from A where A.id = v_id);
    end proc_backup;
    When I debug the procedure, it will not insert any data into A_BACKUP. Apparently, there are some data in table "A" meets criteria "A.id = v_id".
    The strange thing: If I create same procedure. But this time I didn't put procedure inside the package, insert query will work.
    Please help, I have spent a couple of days on this and never make it work. I also tried cursor, it doesn't work either. It seems Oracle package doesn't support "virtual table" (subquery in insert) or whatever you call it.

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    I don't see any package or test code that calls the procedure or error messages or results from any procedure calls.
    You say you have a problem with a package but don't post the package version of the code you are having a problem with.
    How is anyone supposed to find a problem in code that you don't post? And when you post use \ tags as discussed in the FAQ.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • PreparedStatement.setString doesn't work with Oracle 10g.

    Hi all,
    I newbie question regarding the method setString of class java.sql.PreparedStatement. My process require to pass throught a file and check agaisnt a Oracle table if the product id of the given record exist in the table .
    I use the SQL
    select matnr from zncorart_ap where zartleg = ? and zentrleg = ?
    to do that. When i try to replace the ? with the setString method it doesn't work and the query always return no row as ? is not a valid value.
    Thx for your help.
    // Here code snippet of the caller class
    public class Inventory2SAP {
    private ETLSQL productXRef;
    private ResultSet productXRefResult;
    private String inRecord;
    private String prdCat;
    protected void acquireResource() {
      try {       
    //  Instantiate product XRef object.
        productXRef = new ETLSQL();
        productXRef.loadDriver(ch.getProperties("Inventory2SAP.JDBCDriver"));
        productXRef.connectDB(true);
        prdXRefLookup = "select matnr from zncorart_ap where zartleg = ? and zentrleg = ?";
        productXRef.createPrepared(prdXRefLookup);
      catch (SQLException sqle) {
        sqle.printStackTrace();
        System.exit(-1);            
    // Loop this method until EOF        
    protected boolean transform() {
       try {
          productXRef.setString(1, inRecord.substring(0, 8));
          productXRef.setString(2, prdCat);       
          productXRefResult = productXRef.executePrepared();
          if (productXRefResult.next()) {
             System.out.println("Nerver branch here because setString doesn't work");
          else {
             System.out.println("Always row not found");
       catch (SQLException sqle) {
          sqle.printStackTrace();
          System.exit(-1);
    protected void releaseResource() {
       try {
          productXRef.disconnectDB();
       catch (SQLException sqle) {
          sqle.printStackTrace();
          System.exit(-1);
    public class ETLSQL {
        private static Connection con;
        private PreparedStatement pstm;
        private ResultSet rs;
        protected ETLSQL() {
        protected void loadDriver(String driverID) {
           try {
              if (driverID.equals("oracle")) {
                 Class.forName(ch.getProperties("OracleDriver")).newInstance();
           catch(ClassNotFoundException cnfe) {
              cnfe.printStackTrace();
              System.exit(-1);                  
          catch (InstantiationException ie) {
             ie.printStackTrace();
             System.exit(-1);  
          catch (IllegalAccessException iae) {
              iae.printStackTrace();
             System.exit(-1);               
    protected void connectDB(boolean isReadOnly) throws SQLException {
       if (driverID.equals("oracle")) {
          con = DriverManager.getConnection(ch.getProperties("OracleURL"),
          ch.getProperties("OracleUser"), ch.getProperties("OraclePassword"));         
        else {
           System.out.println("Can't connect to the Database");
           System.exit(-1);                
    protected void createPrepared(String SQLString) throws SQLException {
       pstm = con.prepareStatement(SQLString);
    protected void setString(int pos, String s) throws SQLException {
       pstm.setString(pos, s);
    protected ResultSet executePrepared() throws SQLException {
       rs  = pstm.executeQuery();
       return rs;
    protected void disconnectDB() throws SQLException {
       if (pstm != null) {
          pstm.close();     
       if (!con.isClosed()) {
          con.close();
    }

    Ever solve this problem? Seems I'm having the same problem. I'm at a bit of a loss.
    **** Specifically, I get this
    Jan 23, 2007 12:49:51 PM test.JdbcTestHarness doItGood
    INFO: ======= doItGood =======
    Jan 23, 2007 12:49:52 PM test.JdbcTestHarness doItGood
    INFO: It worked...my name is mvalerio
    Jan 23, 2007 12:49:52 PM test.JdbcTestHarness doItBad
    INFO: ======= doItBad =======
    Jan 23, 2007 12:49:52 PM test.JdbcTestHarness doItBad
    INFO: It didn't work my name is mud
    **** When I do this
    package test;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    public class JdbcTestHarness {
         private Logger logger = null;
         * @param args
         public static void main(String[] args) {
              JdbcTestHarness jdbcTest = new JdbcTestHarness();
              jdbcTest.doItGood();
              jdbcTest.doItBad();
         public JdbcTestHarness() {
              this.logger = Logger.getLogger("test");
         public void doItGood() {
              logger.log(Level.INFO, "======= doItGood =======");
              Connection conn = null;
              PreparedStatement stmt = null;
              ResultSet rs = null;
              try {
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   conn = DriverManager.getConnection(
                             "jdbc:oracle:thin:@db1-dev.lis.state.oh.us:2521:test",
                             "dir", "dir");
                   stmt = conn
                             .prepareStatement("select username,password,'true' from account where account.username = 'mvalerio'");
                   rs = stmt.executeQuery();
                   if (rs.next()) {
                        this.logger.log(Level.INFO, "It worked...my name is "
                                  + rs.getString(1));
                   } else {
                        this.logger.log(Level.INFO, "It didn't work my name is mud");
              } catch (ClassNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SQLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } finally {
                   if (conn != null) {
                        try {
                             conn.close();
                        } catch (SQLException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
         public void doItBad() {
              logger.log(Level.INFO, "======= doItBad =======");
              Connection conn = null;
              PreparedStatement stmt = null;
              ResultSet rs = null;
              try {
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   conn = DriverManager.getConnection(
                             "jdbc:oracle:thin:@db1-dev.lis.state.oh.us:2521:test",
                             "dir", "dir");
                   stmt = conn
                             .prepareStatement("select username,password from account where account.username = ? ");
                   stmt.setString(1, "mvalerio");
                   rs = stmt.executeQuery();
                   if (rs.next()) {
                        this.logger.log(Level.INFO, "It worked...my name is "
                                  + rs.getString(1));
                   } else {
                        this.logger.log(Level.INFO, "It didn't work my name is mud");
              } catch (ClassNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SQLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } finally {
                   if (conn != null) {
                        try {
                             conn.close();
                        } catch (SQLException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
    Any help would be appriciated.......

  • MERGE using nested table doesn't work on Oracle 9i

    Hi,
    Oracle 9i Enterprise Edition Release 9.2.0.4.0 on Red hat Linux
    SQL> create table PERSONS (
      2    ID  number(9)
      3   ,SURNAME  varchar2(50)
      4   ,constraint PERSONS_PK primary key (ID)
      5  );
    Table created.
    SQL> create or replace type T_NUMBER_ARRAY as table of number;
      2  /
    Type created.
    SQL> create or replace procedure P_MRGTS2 (P_ID  PERSONS.ID%type)
      2  is
      3    L_IDS  T_NUMBER_ARRAY;
      4  begin
      5    L_IDS := T_NUMBER_ARRAY(P_ID);
      6    merge into PERSONS P using (select * from table(L_IDS)) D on (
      7      P.ID = D.COLUMN_VALUE
      8    )
      9    when matched then update
    10      set SURNAME = 'Updated'
    11    when not matched then
    12      insert (
    13        ID
    14       ,SURNAME
    15      )
    16      values (
    17        D.COLUMN_VALUE
    18       ,'Inserted'
    19      );
    20  end;
    21  /
    Procedure created.
    SQL> exec P_MRGTS2(1)
    BEGIN P_MRGTS2(1,'Avi'); END;
    ERROR at line 1:
    ORA-22905: cannot access rows from a non-nested table item
    ORA-06512: at "OPS$AABRAMI.P_MRGTS2", line 9
    ORA-06512: at line 1However, the same code on Oracle 10g Release 10.2.0.1.0 on SUN Solaris 9 works.
    Is there any way to make it work on Oracle 9i?
    One way I found is the following:
    procedure P_MRGTST (P_ID  PERSONS.ID%type)
    is
      L_IDS  T_NUMBER_ARRAY;
    begin
      L_IDS := T_NUMBER_ARRAY(P_ID);
      forall I in L_IDS.first..L_IDS.last
        merge into PERSONS P using DUAL D on (
          P.ID = L_IDS(I)
        when matched then update
          set SURNAME = 'Updated'
        when not matched then
          insert (
            ID
           ,SURNAME
          values (
            L_IDS(I)
           ,'Inserted'
    end;On Oracle 10g there is negligible difference in time taken to execute both procedures, as displayed in SQL*Plus when issuing:
    set timing onIs there something that makes one of the procedures preferrable over the other?
    Thanks,
    Avi.

    Is there any way to make it work on Oracle 9i?
    michaels>  select * from v$version
    BANNER                                                         
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    PL/SQL Release 9.2.0.8.0 - Production                          
    CORE     9.2.0.8.0     Production                                      
    TNS for HPUX: Version 9.2.0.8.0 - Production                   
    NLSRTL Version 9.2.0.8.0 - Production                          
    michaels>  create table persons (
        id  number(9)
           ,surname  varchar2(50)
              ,constraint persons_pk primary key (id)    )
    Table created.
    michaels>  create or replace type t_number_array as table of number;
    Type created.
    michaels>  create or replace procedure p_mrgts2 (p_id persons.id%type)
    is
       l_ids   t_number_array;
    begin
       l_ids := t_number_array (p_id);
       merge into persons p
          using (select * from table (cast (l_ids as t_number_array))) d
          on (p.id = d.column_value)
          when matched then
             update set surname = 'Updated'
          when not matched then
             insert (id, surname) values (d.column_value, 'Inserted');
    end p_mrgts2;
    Procedure created.
    michaels>  exec p_mrgts2(1)
    PL/SQL procedure successfully completed.
    michaels>  select * from persons
            ID SURNAME                                          
             1 Inserted                                         
    1 row selected.

  • After upgrading to iOS 7.0 my iMessage doesn't work and it says it is "waiting for authorization". When I try to activate it, it won't connect.

    I upgraded to iOS 7.0 and now my iMessage doesn't work. My phone reads "waiting for activation" When I try signing in I get a message "Could not sign in. Please check your network connections and try again". My network connection is fine for all other applications. Any help?

    Hello Remundy,
    Thank you for the details of the issue you are experiencing with iMessage.  I recommend reviewing the following article:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • My Iphone 4s doesn't work in India. says no sim installed. what to do?

    I have bought Iphone 4s from Dubai and it was working fine there. But after i reached India the phone doesnot work.
    It says no sim installed.
    what needs to be done to make IPhone working?

    Sounds like your iPhone is locked to your home carrier.
    See if they offer unlocking and if you qualify. Otherwise,
    there is nothing you can do besides rent/but a cheap
    phone for your month in Argentina.

Maybe you are looking for