How can I switch the connection pool dynamically during on load happens

HI,
I have two data bases which holds same data. i.e Prod_db, Prod_db1,
I want to switch the connection pool dynamically during load happens
Ex: During load happens i want to hit prod_db1, after load completes i want to hit prod_db. How to achieve this.

create dynamic repository variable for DSN using init block so that value is changes based on your timings and use this in connection pool.
If you use same user and passwords for both the databases that would be easy or else need to follow the same for uid and pwd.
That should work, if not update.
If helps pls mark correct/helpful

Similar Messages

  • How can I implement the connection pool in my java stored procedure

    my java stored procedures (in database 'B') have to connect to another oracle database ,let's say 'A'. And how can I implement the behavior like the so-called connection pool in my java stored procedure in 'B', as below.
    1. database B, has 2 java stored procedures sp1 and sp2
    2. both sp1 and sp2 connects to databse 'A'
    whatever I call the sp1 and sp2 and the database 'A' always only one connected session from sp1 and sp2 in database 'B'.
    THANKS A LOTS...

    my problem is I have a lots of java stored procedures need to cnnect to the remote oracle db, and I hope the remote db can only have a connected session from my java stored procedures in my local db. I try as below
    class sp{
    static Connection conn=null; //the remote db connection,
    public static void sp1(){...}//procedure 1, using conn
    public static void sp2(){...}//procedure 2, using conn,too
    I can 'see' the 'conn' variable if I invoke the sp1() and sp2() from the same client application(maybe sqlplus). But if I invoke the sp1() from client 'A' and invoke sp2() from client 'B' then the sp1() and sp2() can not see the 'conn' variable for each other. I think it's because the two clients cause oracle to create two instances of the class 'sp' and the sp1() and sp2() located in different instance seperately. Thus the sp1() and sp2() can not see 'conn' for each other. They can only see its own 'conn'.
    To connect to the remote db from the java stored procedure is easy but is it possible to connect to the remote db via database link from the java stored procedure at my local db ? If so, then I also archive my goal .
    BTW , thanks a lots...
    andrew :-)

  • How can I use the Connection Pool with DB2

    Hi All,
    I am facing the problem with the usage for the Connection Pool.
    I want to use DB2 via JNDI lookup.
    But when starting the Weblogic server, Error occured with the following message.
    <Error> <JDBC> <Cannot startup connection pool "MyJDBCPool" Cannot load driver class : com.ibm.db2.jdbc.app.DB2Driver>
    DB2 and Weblogic are on the same machine.
    In case of the use of remote DB2 database, I also encountered the same error.
    Configurations are as follows.
    <JDBCConnectionPool DriverName="com.ibm.db2.jdbc.app.DB2Driver"
    MaxCapacity="10" Name="MyJDBCPool"
    Password="{3DES}gCGsOfD9M6iwOtgL2v/NpA==" Targets="myserver"
    TestConnectionsOnReserve="false" TestTableName="test" URL="jdbc:db2://localhost:6789/yongjoo"/>
    <SNMPAgent Name="mydomain"/>
    <JDBCDataSource JNDIName="acsdb" Name="acsdb" PoolName="MyJDBCPool" Targets="myserver"/>
    Could you please give some information about this problem? I will appreciate your kindness.

    Hi Joe,
    Thanks your help.
    Perhaps It's my fault for Weblogic console's setting.
    After I reset the target server in console, Error message disappeared.
    But, when I call the TestCode, I encountered another error message. The error
    is NameNotFoundException.
    When lookingup the JNDI name, NameNotFoundException errer occured. I tried to
    change my setting and JNDI name, but the results are the same.
    Would you please give me some information about this one more time? I will be
    appreciated for your help.
    Follows are Config.xml
    <JDBCConnectionPool DriverName="com.ibm.db2.jdbc.app.DB2Driver" MaxCapacity="10"
    Name="MyJDBCPool" Password="{3DES}gCGsOfD9M6iwOtgL2v/NpA==" Targets="myserver"
    TestConnectionsOnReserve="false" TestTableName="test"
    URL="jdbc:db2://localhost:6789/yongjoo"/> <SNMPAgent Name="mydomain"/>
    <JDBCDataSource JNDIName="acsdb" Name="acsdb" PoolName="MyJDBCPool"
    Targets="myserver"/>
    and follows are TestCode,
    url = "t3://localhost:7001"; //default URL
    datasource = "jdbc/acsdb";
    Context ctx = null;
    Hashtable p = new Hashtable();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, url);
    try{
    ctx = new InitialContext(p);
    System.err.println("initialContext(p)"+ctx); <-- success
    ds = (DataSource)ctx.lookup("java:comp/env/jdbc/acsdb");
    }catch(NameNotFoundException ne){
    throw new ConnectionException(); .
    }catch(NamingException ne){
    throw new ConnectionException();

  • How can i use the connection pool in JDBC2.0

    Thanks

    Hi,
    You can use DbConnection broker which directly returns connection to DB
    Try http://www.javaexchange.com/
    In that you can specify max and min pool connection pool size
    see example below:
    DbConnectionBroker dbBroker = new DbConnectionBroker(strDBDriver, strDBURL,strDBUser, strDBPassword, iMinPoolSize,     iMaxPoolSize, strLogFile, dblTimeInMillisBetResets);

  • I tried to update the App that I purchased but the message told me that my Apple account is not valid for use outside of US and I must switch back to US store to able to do it. How can I switch the account from foreign countries back to US?

    I tried to update the App that I purchased but the message told me that my Apple account is not valid for use outside of US and I must switch back to US store to able to do it. How can I switch the account from foreign countries back to US?

    On your phone (from http://support.apple.com/kb/ht1311):
    Change your iTunes Store country
    Sign in to the account for the iTunes Store region you'd like to use. Tap Settings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region.
    Follow the onscreen process to change your region, agree to the terms and conditions for the region if necessary, and then change your billing information.

  • I am unintentionally come to delete the bluetooth connection to my heart rate monitor in my iPhone 4s. How can I restore the connection?

    I am unintentionally come to delete the bluetooth connection to my heart rate monitor in my iPhone 4s. How can I restore the connection?

    Thanks, but unfortunately for me the Polar H7 does not have any buttons or anything that can actively affect the pairing, it is manifest just a transmitter. Pairing can apparently only be done by finding the Polar H7 in the unit that you want to pair with (my 4s) and after my delete of the device, my iPhone 4s does not retrieve it as a Bluetooth device.

  • I cannot load my google calendar, how can i decrypt the connection in order to have access?

    The information about this website says that the page has been encrypted because there is no authorized owner. I need access to my google calendar from work.
    How can i decrypt the connection? Is there other way to fix the problem?

    Restart holding down the CMD+R keys, launch Disk Utility and erase the HD, quit DU, and restore the OS. On first boot, use the Setup Assistant to do the migration. Details in Pondini's Setup New Mac guide.

  • How can I switch the region code on MBP w/ DVD drive for the 5th and final time?

    How can I switch the region code on MBP w/ DVD drive for the 5th and final time? It brings up the window with that world map to do it, including the warning that "this is the 5th and final time I can do this", when inserting a DVD and opening "DVD Player", but it never executes my click on the "Change Drive Region" button prompt.
    VLC or Quicktime Player won't play it either, but won't bring up that window to change Region Code anyway....
    Otherwise, I'm not having any other issues with this MBP at all. Peak performance on all counts :-)
    I tried resetting SMC after chatting w/ Apple Support, but it didn't help.
    That was the link they provided. Resetting the System Management Controller (SMC) on your Mac
    Tried zapping PRAM as well.
    Thanks for any clues, Rene

    Region encoding is the mechanism that enables motion picture studios to control the worldwide release of their movies. It is required by the DVD Forum (http://www.dvdforum.org/forum.shtml) in all commercial hardware DVD players. Every DVD-Video disc contains one byte of data representing a region code, which limits where the disc can be played.
    http://support.apple.com/kb/HT2397
    Once you have set the region in DVD Player five times it cannot be changed. However see this also:
    http://support.apple.com/kb/TA25416?viewlocale=en_US&locale=en_US
    Instead, use VLC to view videos from different regions:
    http://www.videolan.org/vlc/download-macosx.html

  • My wireless printer keeps going offline--how can I "stabilize" the connection"

    my wireless printer keeps going offline--how can I "stabilize" the connection?
    This question was solved.
    View Solution.

    Hello gerrie,
    What i would do is Power cycle the printer and the router as well
    -basically having them turned off for about 10-15 seconds
    -and then powering back the router back on wait for all the lights to turn on completely
    -and after that is back up and running i would turn the printer back on and re-establish the connection between the printer and the Wireless network
    I am an HP employee.
    __ if this Solution has helped Please Mark as Resolved and feel free to Provide a Kudos__

  • How can i resolve the -1 error occuring during the iphone restoring process.

    how can i resolve the -1 error occuring during the iphone restoring process.

    hi ive also got the same probblem ive had it working last night but then after 2 hours of working it decided to put the phone back into recovery mode plus its an unknow error (36) Ive tried to connect to i tunes and it started to recovery and wipe the to put it back into factory settings then came up with the error 36  can any one help

  • After making a call I put my phone in my pocket and when I bring it out to make a call the player is on killing battery life. How can I shut the player off or prevent this from happening?

    after making a call I put my phone in my pocket and when I bring it out to make a call the player is on killing battery life. How can I shut the player off or prevent this from happening?

    Try to position your iphone that the screen is facing away from your skin.
    Make sure that the back part of your phone will be the one that will contact your skin inside your pocket
    Thats what i do:)

  • How can I Call the MainVI from its SubVI, and this happen recursively?

    Hi All,
    How can I Call the MainVI from its SubVI, and this happen recursively?
    Actually, LAbView 7.1 doesn't support recurssion?
    Plz help me out!

    Dear GerdW,
    Thanks a lot 2 all of u guys,for all the brilliant responses.
    Actually, my basic aim is to call the Main VI, containing a SubVI.....
    Now, I want to call my main VI from this SubVI...recursively!!!!!..but whenever I tried to put the MainVI in this SubVI..an error message pops out saying recursive calling is not possible.
    I also tried using "Call by reference" but tht also didn't worked...an d error is somewat like...VI is invalid..or type matching..or state matching error.
    Here, Im attaching the snapshot of the MainVI... Im calling the SUBvi from it... It is running GOOD n FINE...
    But prob arrives when I call the Main from the SUBvi, which looks like same as MainVI(with little differences).
    I hope, Im clear in my words n not being ambigous.
    Plz, correct me where ever  im wrong.
    Thank You.
    Mishra_RnD
    Attachments:
    ScrShot.JPG ‏272 KB

  • How can I know the connections are pooled?

    Hi. everyone.
    I am wondering how I can monitor the connections are pooled.
    I am using web-logic as a web server and oracle9ir2 as a
    database server.
    When I was deploying an application to the web-logic, I created a
    connection pool.
    And then, I run the application respectively(exactly two).
    However, there is only one session in the "V$SESSION" dictionary.
    I do not understand why there is only session in the V$SESSION, although
    I run two application respectively.
    In addition, how can I monitor the oracle conenctions are pooled?
    Does V$SESSION have nothing to do with oracle connection pool?
    Thanks in advance.
    Have a good day.
    Best Regards
    Ho.

    Dear Sabdar Syed.
    Thanks for your reply.
    Here is the result of v$license.
    SQL> select * from v$license;
    SESSIONS_MAX : 0
    SESSIONS_WARNING : 0
    SESSIONS_CURRENT : 6
    SESSIONS_HIGHWATER : 6
    USERS_MAX : 0
    What does it mean, sessions_max(0), sessions_current(6), users_max(0)
    I am still confused.
    Could you give me a more detailed explanations?
    Thanks in advance. Have a good day.
    Regards.
    Ho.

  • How can I get the connection code for the magic track pad?

    I want to use my magic trackpad and I scrapped the box with the connection code. How can I get it again? I don't need it for Mac, but yes for windows...

    user570667 wrote:
    Hi 2 all,
    How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
    Regards,
    ZulqarnainDid you see old threads for similar topic/discussion? -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Java+AND+Concurrent+AND+Source+AND+Code&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • HOW CAN I SWITCH THE APP STORE BACK TO USA STORE

    i'm try to download app on my phone and keep pop up message of your account is not valid for use in the chinese store, you must switch to the U.S store before purchasing. please help or let me know how can i switch it back thanks!!

    Click here and follow the instructions to change the iTunes Store country.
    (83295)

Maybe you are looking for