How to reconnect to a database if connection is lost during execution

How to reconnect to a database if connection is lost during execution of the program.
Please help me.
thanks in advance.

First close the old connection with "connection.close();" Catch all exceptions in case close() fails. Then open a new connection just like you opened the original one.

Similar Messages

  • 5300 Dead after connection was lost during update

    5300 Dead after connection was lost during update. Won't turn on, power up-nothing. Help?

    It is now dead.
    Take to a nokia care point.
    Care points:
    UK
    http://www.nokia.co.uk/A4228006
    Europe:
    http://europe.nokia.com/A4388379
    Elsewhere:
    http://www.nokia.com and select your country.

  • Why does my itunes tell me my connection was lost during sync

    I am trying to sync and backup my iphone but my itunes keeps telling me the connection was lost why?

    Because you deleted, or renamed, or moved a file or folder involved with iTunes organization?
    Because your computer's directory is becoming corrupt and it is losing track of files?

  • How can find the reposite database name connection

    I have a obiee server installed, how can I find the reposite schema database coneection? -thanks

    Hi,
    You can create Repository Static Variable in rpd, and in Connection pool you can mention like VALUEOF(OLAP_DSN) and VALUEOF(OLAP_USER) in DSN and user name.Then create a report and change the function to use these variable.
    fyi..refer:
    http://oraclebi.blog.com/tip-of-the-day-checking-the-dsn-name-and-user-name-from-report-level/
    Thanks
    Deva

  • How to reconnect in case of a JMS connection lost

    If JMS connection is lost during the exceution of the program, how to reconnect to the destination.
    please help me.
    thanks in advance.

    BTW, SJS MQ (The MQ with the J2EE Reference Implementation) also supports that.
    If you are using a queue, you should not loose messages. This is what the JMS spec is all about. If you are using a topic (message broadcast) then you would need to set the client as a durable subscriber, this way, if the client is not connected, the messages are kept for him to come back.
    Another point, if the connection is lost because the message broker went down, then all messages that were not consumed on that destination are lost, if they were not persisted.
    If the messages are persisted then you should have all the messages still available when you restart the broker and reconnect to it. Now since brokers try to be smart about persisting and minimise the disk I/O, you need to learn how the persistence of your broker works, and make sure you configure it to the performance/reliability balance you require for your application.
    TE

  • How to make toplink reconnect to the Database in java SE

    I have use toplink JPA in java SE.
    I found a problem with using connection pool in toplink:
    If the network connection is disconnect and Even if it is reconnect right away.
    Then the connection to the Database can not be use;
    So I should restart my java SE application to reconnect to the Database.
    How can I make the toplink to reconnect to Database so I need not restart my java SE application
    My english is poor. am I clear?
    thanks for you help.
    merry christmas

    TopLink has an ExceptionHandler interface you can implement and register the instance. This allows you to capture the failure when the connection dies allowing you to re-connect it and possibly retry a read query.
    What edition and version of TopLink are you running?
    Doug

  • How to find the number of users  connected to database from OS level(Linux)

    Hi All,
    Could anyone know , how to find the number of users connected to database without connecting with sql*plus
    is there any command to find it?
    example we have 10 databases in one server, how to find the number of users connected to particular database without connecting to database(v$session)?
    oracle version:- 10g,11g
    Operating System:- OEL4/OEL5/AIX/Solaris
    any help will be appreciated.
    Thanks in advance.
    Thank you.
    Regards,
    Rajesh.

    Excellent.
    Tested, works as long as you set the ORACLE_SID first ( to change databases )
    ps -ef | grep $ORACLE_SID | grep "LOCAL=NO" | awk '{print $2}' | wc -l
    Thanks!
    select OSUSER
        from V$SESSION
    where AUDSID = SYS_CONTEXT('userenv','sessionid')
        and rownum=1;Best Regards
    mseberg

  • How to find the number of ODBC connections to Oracle Database

    Hi All,
    How to find the number of ODBC connections and all connections to the Database in last week. Are there any views to get this information?
    Thanks in advance,
    Mahi

    What Ed said is true that Oracle doesn't note which type of protocol is connecting to the database, however, you can see which program is accessing the database.
    For example: if you already know of a user using ODBC, you can verify as:
    select username, osuser, terminal, program from v$session where username = 'SCOTT'
    USERNAME                 OSUSER          TERMINAL   PROGRAM
    SCOTT                    IUSR_SRV231     SRV231     w3wp.exe
    SCOTT                    IUSR_SRV231     SRV231     w3wp.exe
    2 rows selected.Assuming that you can confirm the progam noted in the above (example) is the one using ODBC, then you can change the query such as:
    SQL> select username, osuser, terminal, program from v$session where program = 'w3wp.exe';
    USERNAME                 OSUSER          TERMINAL   PROGRAM
    SCOTT                    IUSR_SRV231     SRV231     w3wp.exe
    SCOTT                    IUSR_SRV231     SRV231     w3wp.exe
    2 rows selected.Just for kicks, I checked our listener.log file, but there was no reference of odbc in it either.
    Hope this helps...

  • How to share the same Database Connection when using several Task Flows ?

    Hi All,
    I’m using JDev 11.1.1.3.0.
    I’m developing ADF Fusion Applications (ABC BC, ADF Faces…)
    These applications are deployed on a Weblogic server.
    Each application has only one Application Module.
    All Application Modules have the same connection type defined: JDBC DataSource : jdbc/GCCDS
    It is working fine.
    I’ve also developed Task Flow Applications for small thinks that are reused in multiple main applications.
    Each Task Flow Application has also one Application Module with the same connections type as main applications.
    All these task flows are deployed to JAR file (ADF Library JAR File) and are reused on my main applications. (drag and drop from the Resource Palette to ADF Regions….).
    There are some parameters passed to Task Flows, so that they can filter data depending on which main applications they are called from.
    Everything is working perfectly.
    All my main applications are using more and more task flows. Which is nice for the reusability etc…?
    Only ONE PROBLEM: DATABASE CONNECTIONS.
    Every Task Flows service made a database connection. So one user may have 10 database connections for the same adf page. And when there are 100 users that are working at the same time, it becomes a problem.
    How to share the same database connections for the main applications and all task flows which are used in the main application?
    Best Regards
    Nicolas

    Hi John,
    When I open a ADF Library JAR file of one of my task flow. (gcc_tf_recentSites.jar)
    I can see TF_RecentSitesService.xml and TF_RecentSitesServiceImpl.class in gcc_tf_recentSites.jar\mu\gcc\tf\recentSites\model\service folder
    + bc4j.xcfg in gcc_tf_recentSites.jar\mu\gcc\tf\recentSites\model\service\common folder.
    bc4j.xcfg details are
    +<?xml version = '1.0' encoding = 'UTF-8'?>+
    +<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">+
    +<AppModuleConfigBag ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService">+
    +<AppModuleConfig DeployPlatform="LOCAL" jbo.project="mu.gcc.tf.recentSites.model.TF_RecentSites_Model" name="TF_RecentSitesServiceLocal" ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService">+
    +<Security AppModuleJndiName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService"/>+
    +<Custom JDBCDataSource="jdbc/GCCDS"/>+
    +</AppModuleConfig>+
    +<AppModuleConfig name="TF_RecentSitesServiceShared" ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService" DeployPlatform="LOCAL" JDBCName="gccdev" jbo.project="mu.gcc.tf.recentSites.model.TF_RecentSites_Model">+
    +<AM-Pooling jbo.ampool.maxpoolsize="1" jbo.ampool.isuseexclusive="false"/>+
    +<Security AppModuleJndiName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService"/>+
    +</AppModuleConfig>+
    +</AppModuleConfigBag>+
    +</BC4JConfig>+
    So, it seems that the Application Module is packaged with the task flow....
    Is it normal ?
    Regards
    Nicolas

  • How can I create a database connection to Cloudscape database in 9iJDeveloper?

    How can I create a database connection to Cloudscape database in
    9iJDeveloper?
    thanks.

    Hi,
    I assume you have a JDBC driver for Cloudscape.
    1. In the IDE System Navigator, expand the Connections Node.
    2. Right-click on the Database Connection and choose New
    Connection .. .
    3. Click pass the welcome screen.
    4. In Step 1, name your connection and choose "3rd party JDBC
    Driver"
    5. Follow the rest of the steps and provide username/password,
    class name and URL, test and you should be ready to go.
    Good luck.

  • How to config the oracle database connection pool in IAS

    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

    Jacky,
    You need do the following for oracle type4 driver:
    1) register the driver:
    $IAS_HOME/bin/jdbcsetup
    Driver Identifier: Oracle_Type4_816 (whatever name you like)
    Driver Classname: oracle.jdbc.driver.OracleDriver
    Driver Classpath: .../classes12.zip (install this this zip file somewhere
    and add this zip into the Classpath later).
    2) DataSource Setup:
    start iAS Administration Tool (iASAT)
    Choose Database, unfold iAS1 (your app server instance),
    choose External JDBC Datasource -> add: DataSource Registration
    JNDI Name: yourPoolName
    Driver Type: Oracle_Type4_816 (select what you just register)
    DataSource Url: jdbc:oracle:thin:@hostName:portName:dbName
    Username: your_user_name
    Password: your_passwd
    (Datasource Pool: using defaults for now): you can also customrize the
    parameters for the pool.
    3. Add classes12.zip into CLASSPATH.
    In your application, you can use JNDI lookup to get the DataSource from
    which you get the connection from the pool.
    Hope this helps.
    Good luck.
    Xuran
    "Jacky Yan" <[email protected]> wrote in message
    news:9m0tmp$[email protected]..
    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

  • OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?

    Is there an alternative way other than manually entering PHP code?

    Thanks, It works. Author of the article politely says what many of us have to say to Adobe when they make "improvements" - WTF, Adobe???
          From: Ben Pleysier <[email protected]>
    To: Jon Lane <[email protected]>
    Sent: Saturday, January 31, 2015 1:44 AM
    Subject:  OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?
    OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?
    created by Ben Pleysier in Dreamweaver support forum - View the full discussionWeb development tutorial
    Deprecated Server Behaviors for Dreamweaver Creative Cloud
    WebAssist A better, more secure and future proof way MySQLi Server Behaviors
    Dreamweaver extension
    WebAssist If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7148099#7148099 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7148099#7148099 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Dreamweaver support forum by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • How to find whether remote database is up or not (connected via dblink)

    Hi,
    I am using dblink to connect Biz database from Dev database.(Biz, Dev - database names)
    Running dbms job using the dblink from the Dev database to update data on Biz database...
    Problem is dbms job should run if and only if the Biz database is up for which i created the dblink...
    1) How to make sure or implement the check to find whether the Biz is database is up or not in Pl/sql or sql...
    2) How to reschedule the dbms jobs once the database is up
    pls suggest me how to find whether the database is up or not b4 running the dbms job?
    Using- Oracle 10g

    The only way to know whether the remote database is up (and whether the network between the two databases is up and whether the remote database's listener is up and whether the password configured in the database link is correct and whether the local TNS alias is correct, etc) would be to actually run a query against the remote database over the database link. In other words, the way to figure out whether the link is up is to let the job run and catch & handle exceptions when there are problems.
    By default, a job scheduled via DBMS_JOB will automatically reschedule itself if there is an unhandled exception by geometrically backing off (it waits 1 minute after the first failure, 2 minutes after the second, 4, 8, 16, 32 minutes, etc until it's marked as broken after 16 failures). You could, of course, catch appropriate exceptions and handle them in a reasonable fashion and manually reschedule jobs at intervals that make more sense for your particular job.
    Justin

  • How to reconnect without using the "keep alive" plug-in?

    How do we issue a reconnect in SQL Developer? Has anyone figured out how to reconnect without having to disconnect, then connect again?
    Since SQL Developer takes SQL*Plus commands, I figured I could use "connect user@instance", but that doesn't work.
    Help! Is there a request for enhancement for this one?
    We are on Oracle 11gR1 (11.1.0.7) and SQL Developer 3.0.0.4 Build MAIN-04.34.
    Thanks,
    Alex.

    In 3.1 EA3, the context menu for a connection now contains a Reconnect option, just below Disconnect. It should become enabled only when a shared connection established for a worksheet / object viewer is broken. It should work for both Oracle and supported non-Oracle connections. Upon reconnect, a dialog will appear warning the connection has been reset.
    Some limitations:
    1) There is no UI to reconnect a broken connection for an unshared worksheet.
    2) Components other than worksheets and object viewer tabs using a shared connection may not function properly after reconnect.
    3) An example of (2) is the Schema Browser. It is necessary to close and reopen it after the connection it shares has been reconnected.
    Reconnect has been tested on Windows and Linux, on Oracle and MySQL, by shutting down/restarting the database, by saving/restoring the machine state of a VM running the database, by physically disconnecting/reconnecting the machine running the database from the network, and by ALTER SYSTEM KILL SESSION. It has not been tested with any sort of firewall or database session timeout, however.
    We hope this minimal implementation will cover the majority of use cases.
    Regards,
    Gary
    SQL Developer Team

  • How can I use two database in Dataset in SSRS?

    Hi,
    I am using one query to generate my SSRS report. In that query I am using subquery. Now I am pulling data from multiple tales.
    DB used in sub query is different than the rest of the tables DB.(So total I am using 2 DB(Database))
    So I see that in SSRS, I can connect query(In DataSet Properties) to one DATA_SOURCE only, how can I use other database which is I used in sub-query?
    I have to move this SSRS into PROD and I can't hard code that sub-query's DB name in my query.
    Please give me suggestion. Thanks!!
    Vicky

    In SSRS 2008 R2 you can use the Lookup function (http://technet.microsoft.com/en-us/library/ee210531.aspx ) and LookupSet function (http://technet.microsoft.com/en-us/library/ee240819.aspx
    Depending on your security set up, you can reference a table in a second database on the same server using a three part name:  database.schema.table.  This is more likely to work for you if you wrap your SQL command in a stored procedure.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

Maybe you are looking for

  • Tabs are not responding in FF4. I cannot switch between tabs and the text of the tab is completely garbled.

    The text of the tabs run over each other and are completely unreadable. I cannot move the tabs or click between them. The only thing I can do is to close the tabs which kind of negates the point of having tabs.

  • Mouse click sounds

    I searched the topics and was unable to locate the answer. WHat I am looking for is this: Is there a way to switch the sound of a NEXT and/or BACK (or whatever button) from the click to a custom sound? I know I can go into the GALLERY / MOUSE / CLICK

  • Pb to reach ISE Guest portal due to DNS constraints

    I have set up a Guest Portal with WLC 5508 7.4 and ISE 1.1.1 ; everything is OK, except one thing : the  Guest VLAN, associated to the Guest SSID is, actually, a DMZ behind my  customer firewall and the DHCP parameters provided to the wireless Guest 

  • Problem with Maintenance Manager

    Hello, I have a Lenovo T61 6457-E3G wth Windows XP. The Windows is updated on the last available version, and so the lenovo sofware too.  Weeks ago, the problem started: When I shut down the computer the Lenovo task: "AWAYSCH" can't be closed by wind

  • Publication Issue

    Hi Experts, In Publication I am having Distribution channel and values are 10,11 and 16. For some dynamic users I have to send report for 3 distribution channels, for some users 10 and 11 only, for some users only 10 or 11 or 16. All this I want do i