How to keep connection alive?

I wondering if there is any way to keep connection alive during some period of inactivity.
I have the SQL Developer 1.2.1 (it is not easy to update as I have no admin privileges on work computer) under Windows XP, connecting to Oracle9i Enterprise Edition Release 9.2.0.6.0.
The inconvenience is that the connection become dropped after some inactivity time.
What I have to do is to disconnect and connect again. But if I run any query in dropped connection condition it would take long time before it come back with a message that there is no connection.
I could not find any kind of 'stay connected' option. (Like it is in some other application with time set possibility to send a some request to a server just to stay connected (for exm: PuTTY))
To do it by myself it would be done by having some continuously looping script, that would run some simple select (say, sysdate) periodically, but I do not know if it possible to do it from SQL Developer.
If it done in PL-SQL, it will be processed in Oracle, not in SQL Developer; so, it is not useful.
Does anybody have or know any suggestion or advice to keep connection stay active?
Appreciate any help!
Alex
Message was edited by:
alex5161

The trouble is shared connections. While the dbms_lock.sleep is sleeping, the connection will be frozen.
Having said that, the real solution is to fix how sqldeveloper handles lost connections. Session timeouts are usually there for a reason and client software needs to learn to live with it.

Similar Messages

  • How to keep connection of network service in win8.1

    Dear sir / madam,
    i would like to ask how to keep connection of network service in win8.1, after i logout / switch user/ sleep.
    thanks

    Hi,
    Did you have any issue on your computer?
    The network is disconnection when you logged off the computer. This is expected behavior.
    The network is stayed connection when you switch the user.
    For sleep mode, check the following setting:
    right click the network device in Device Manager and go up to the top and hit
    Power Management. Then uncheck the box that says "Allow the computer to turn off this device to save power".
    Karen Hu
    TechNet Community Support

  • MacBook Pro and HP Premium 3-in-1 printer How to keep connected?

    I have a HP Photosmart Premium 3-in-1 wireless printer C310.  It is up and running and is connected to my MacBook Pro.  However, sometimes I can get the printer to actually print while other times all it says is cannot find printer.  It is really annoying - like it has a mind of it's own.  I have tried shutting down the Mac, the printer, and restarting everything to find that it still won't cooperate.  Can anyone help with this?

    How are you connecting the printer to the MacBook?
    What version of OSX are you using?
    I am a printer tech for HP.

  • How to keep socket alive

    Dear All Java Devotees....
    I was stucked upon the following socket programming challenge in my projects
    first of all I have one Server and one Client
    what I wanted initially was client registered to server
    when the client abruptly terminated, it wont have any effect at all to the server
    But in line with the Java Socket Programming Tutorial
    it seems that it cant be done so easily
    whenever I close down my client
    Server will catch java.net.SocketException: Connection reset
    so my question basically :
    Is it possible for the Server to keeps iterating in a loop
    while listening for a client to register
    but here is the catch, I dun want anything severe happen to the Server
    when somebody close down the Client abruptly
    If possible I would like the server to keep its normal program flow
    I mean sort of roll-back to the state before the exception occured
    My punchline is to "keep the server program flow"
    Any Idea/snippet will be greatly appreciated....
    best regards,
    Honggo

    Hi Joey
    sorry I've misled you
    I've managed to solve the problem though
    but now facing a new problem
    I will be grateful if u come across the same problem
    here is the scenario:
    1. client starts
    2. server stars
    3. client & server bound to socket
    4. client sending some information to server
    5. server stops
    I've followed your suggestion to use for loops and spawn a new thread for each accepted socket
    it's a very simple & helpful idea, but as I observer i hit some shortcomings. I wish you could enlighten me with snippet of code, perhaps :D
    after steps 5 which is when the server stops, client is unaware that server has already dead.
    i've tried every methods described in the API (e.g. isClosed, isConnected, etc) but client didnt catch exception when client is sending some infomation to the "deceased" server.
    So my question: How to detect whether or not the server is dead (in client).
    regards,
    Honggo

  • Keep connection alive?

    Hi.
    I am trying to make a http connection to a site and reuse the connection to fetch several pages.
    Here is the code I copied from java.sun.com and modified
    import java.net.*;
    import java.io.*;
    public class URLConnectionReader {
        public static void main(String[] args) throws Exception {
            URL url= new URL("http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html");
            URLConnection conn = url.openConnection();
            BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    conn.getInputStream()));
            String inputLine;
            while ((inputLine = in.readLine()) != null)
                System.out.println(inputLine);
            in.close();
                url  = new URL("http://java.sun.com/docs/books/tutorial/networking/sockets/index.html");
            conn = url.openConnection();
            in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            while ((inputLine = in.readLine()) != null)
                System.out.println(inputLine);
            in.close();
    }When I call url.openConnection() again, a new connection is open and assigned to conn.
    However, I don't want to have a new connection since the program will be slow if there are a lot of threads are running at the same time....also, there is some overhead time to create a new connection...
    Is there anyway to reuse the existing connection?
    Thanks.

    In 1.4.x (I didn't check the other versions), there is a system property called http.keepAlive (http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html). By default this property is set to true. This will keep the connection to the server open for a limited time (I think it is in the order of 5 seconds). All this is done underwater in the networking libraries,
    You could also checkout http://jakarta.apache.org/commons/httpclient/. It supports keepalive.
    Cheers,
    --Arnout                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to keep a R/3 session from R/3

    Hi,
    There is a R/3 transaction RF Monitor (TCode LRF1) that is used in WM to control all operations, users and TO's. When a user is connected to a normal GUI Session, user name appears in this transaction with the number of TO that is being procceced.
    However, when the user is not connected with a normal GUI session the USER name don't appear.
    I'm working with web services that connect to R/3 for a specif task. For this reason, the USER can't be seen in LRF1.
    Is there any way to keep an USER session in R/3 system?
    Today we are using a Visual Basic application that execute SAP logon command line in order to keep USERS active in the system. This application is running on server side. Now, they want some solution that can avoid the use of this visual Basic application.
    Any ideas?
    Thanks a lot for your help

    Hi Mylene,
    Thanks you for your answer. What i tried to explain is that we are connecting to R/3 by using web services. This connection is working fine and we are able to retrieve and update information from R/3.
    My problem is that there is an R/3 transaction that is used to monitor all operation in a warehouse; this transaction is LRF1. This transaction is very usefull when user access SAP R/3 transaction by using RF devices because the person who controls the operation can see who is working an OT and in which queue. However, when you access R/3 by a RF device is the same as you were connected to a normal SAP GUI session. The reason why user name appears in LRF1 transaction is because the user is actually connected to SAP R/3, when the user log off user name is not visible in LRF1 transaction.
    When you access R/3 by using web services, the time while a user is conected is so short that is almost imposible to see a user in LRF1 transaction. This is not a programming problem because the idea is not take too long time while processing task in web services.
    Someone proposed to used a visual basic program to keep connection alive in order to see user in LRF1 transaction. This program execute sap logon via command line. This program is not related to web services but is very usefull because all user appear in transaction LRF1 even thought user is not really connected to R/3. User want to modify this visual basic program, really he don't want to use this program anymore, he needs a new ABAP program that keep user connection alive that simulate the functionality of visual basic program.
    Thank you for your collaboration or ideas

  • How to keep homesharing active from iTunes on Lion OS?

    I have 4 Macs (w MBPs, 1 iMac, 1 Mac Mini) and 2 Apple TVs (latest). Only the Mac Mini is on Lion OS (10.7.4) since that is what it came with new. I use it to serve my media to the Apple TVs, but they can also get served from the other 3 Macs (all on Snow Leopard 10.6.8).  Only the Mac Mini on Lion drops homesharing when not in use - the other Macs on Snow Leopard keep homesharing alive. While it is actively streaming, the Mini does not drop the feed.  I have the Mac Mini set to never go to sleep or or to screen saver, so it should remain accessible via homesharing.  But if I don't use it for an hour or two, it drops out of homesharing - and it is the only Mac to do so.  I can get it back by quitting then restarting iTunes or by shutting down homesharing and restarting it while keeping iTunes open.  Of course, a restart of the mini would also bring back full functionality.  None of these are acceptable when you are sitting in another room trying to access media via Apple TV.  As a result of the above, I am assuming that the problem is isolated within Lion OS and how it supports iTunes.
    I have seen other discussions claiming Apple TV drops out, but my problem is definitely the Mac Mini on Lion since at the same time I can see it drops from the other Macs and not just from Apple TV - all homesharing devices lose sight of the Mini but keep seeing each other.
    I'd love to downgrade my Mini to Snow Leopard but apparently can't. I'd buy an older used Mini, but I need HDMI - so, I'm stuck until this is fixed. My other devices will definitely stay on Snow Leopard until I see this problem resolved by Apple.
    Any suggestions on how to keep homesharing alive with iTunes on Lion?

    Everything that is on your ipod should also be on your computer.  is it not?
    You can redownload some purchases:
    Downloading past purchases from the App Store, iBookstore, and ...

  • How to keep alive RS232 connection

    Hello everyone. I have a problem with RS232 communication. To activate the connection I have to send the string "RS232", then to keep it alive I have to send every second CR, but in the meantime, I must be able to send other character strings without delay on the same port (COM7). Can anyone help me?
    Thanks 
    Solved!
    Go to Solution.

    RS232 standard does not require by itself to be kept alive someway, so I suppose is your remote device that requires it.
    In every case, you could create a 1-sec timer and have its callback send CR periodically over the serial port.
    To avoid conflicts between this task and the rest of the application you could use a lock: basically, after creating the lock, each function that wants to access the serial port must call CmtGetLock (), operate on the port and call CmtReleaseLock () afterwards. If the lock is owned by another function, other functions trying to get access are frozen waiting for the lock, so you must be careful in designing com-related function so that they are fast. If you do not want to have some function be blocked while waiting for the lock you can use CmtTryToGetLock instead of CmtGetLock. A few informations on locks can be found in this tutorial as well as in this chapter of the Programmer reference.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Please Help - To keep LDAP connection alive

    Hi,
    I have used the below function to communicate with LDAP which I have taken and modified from one of the posts in this forum.
    My issue is, each time the function opens a connection, search and closing the connection and its seriously affects the performance.
    I hope we can resolve this by keeping the connection alive. As I am new to this concept, I am not sure how to do this.
    It would be great, if some one help me to keep the connection alive for the below function. Thanks in advance.
    create or replace FUNCTION <name> (loginname VARCHAR2)
    RETURN NUMBER
    IS
    -- Adjust as necessary.
    l_ldap_host VARCHAR2(256) := '';
    l_ldap_port VARCHAR2(256) := '';
    l_ldap_user VARCHAR2(256) := '';
    l_ldap_passwd VARCHAR2(256) := '';
    l_ldap_base VARCHAR2(256) := '';
    l_retval PLS_INTEGER;
    l_session DBMS_LDAP.session;
    l_attrs DBMS_LDAP.string_collection;
    l_message DBMS_LDAP.message;
    l_filter varchar2(35):='xxxx='|| loginname;
    l_count NUMBER:=0;
    BEGIN
    -- Choose to raise exceptions.
    DBMS_LDAP.USE_EXCEPTION := TRUE;
    -- Connect to the LDAP server.
    l_session := DBMS_LDAP.init(hostname => l_ldap_host,portnum => l_ldap_port);
    l_retval := DBMS_LDAP.simple_bind_s(ld => l_session,dn => l_ldap_user,passwd => l_ldap_passwd);
    -- Get attribute
    l_attrs(1) := 'xxxx';
    l_retval := DBMS_LDAP.search_s(ld => l_session, base => l_ldap_base, scope => DBMS_LDAP.SCOPE_SUBTREE, filter => l_filter, attrs => l_attrs, attronly => 0, res => l_message);
    l_count:=DBMS_LDAP.count_entries(ld => l_session, msg => l_message);
    -- Disconnect from the LDAP server
    l_retval := DBMS_LDAP.unbind_s(ld => l_session);
    return l_count;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error :'||SQLERRM);
    return 0;
    END <fun name>;
    Thanks,
    Praveen
    Edited by: 920577 on Mar 13, 2012 9:40 AM
    Edited by: 920577 on Mar 13, 2012 9:41 AM

    The basic template looks as follows:
    SQL> create or replace package Foo as
      2 
      3  procedure LdapLogoff;
      4  function GetData( empName varchar2 )  return number;
      5 
      6  end;
      7  /
    Package created.
    SQL>
    SQL> create or replace package body Foo as
      2 
      3  isLoggedOn boolean;
      4 
      5  procedure LdapLogon is
      6  begin
      7          DBMS_OUTPUT.put_line( '..running logon()' );
      8          isLoggedOn := true;
      9  end;
    10 
    11  procedure LdapLogoff is
    12  begin
    13          DBMS_OUTPUT.put_line( '..running logoff()' );
    14          isLoggedOn := false;
    15  end;
    16 
    17  function GetData( empName varchar2 ) return number is
    18  begin
    19          if not isLoggedOn then
    20                  LdapLogon();
    21          end if;
    22         
    23          DBMS_OUTPUT.put_line( '..running GetData() for '||empName );
    24          return(
    25                  round(DBMS_RANDOM.Value(1,100))
    26          );
    27  end;
    28 
    29 
    30  --// main()
    31  begin
    32          DBMS_OUTPUT.put_line( 'Package Foo loaded into memory' );
    33          isLoggedOn := false;
    34  end;
    35  /
    Package body created.
    SQL>
    SQL>
    SQL> select empno, ename, Foo.GetData(ename) as ID from emp order by empno;
         EMPNO ENAME              ID
          7369 SMITH              23
          7499 ALLEN              47
          7521 WARD               88
          7566 JONES              71
          7654 MARTIN             91
          7698 BLAKE              28
          7782 CLARK              92
          7788 SCOTT              91
          7839 KING               48
          7844 TURNER             89
          7876 ADAMS              64
          7900 JAMES              16
          7902 FORD               18
          7934 MILLER             35
    14 rows selected.
    Package Foo loaded into memory
    ..running logon()
    ..running GetData() for SMITH
    ..running GetData() for ALLEN
    ..running GetData() for WARD
    ..running GetData() for JONES
    ..running GetData() for MARTIN
    ..running GetData() for BLAKE
    ..running GetData() for CLARK
    ..running GetData() for SCOTT
    ..running GetData() for KING
    ..running GetData() for TURNER
    ..running GetData() for ADAMS
    ..running GetData() for JAMES
    ..running GetData() for FORD
    ..running GetData() for MILLER
    SQL>
    SQL> select empno, ename, Foo.GetData(ename) as ID from emp where rownum = 1;
         EMPNO ENAME              ID
          7369 SMITH               9
    ..running GetData() for SMITH
    SQL>
    // call Foo.Logoff manually when done, or leave it to
    // Oracle to close and release resources when the
    // session terminates

  • How to Keep Alive a specific HFM application

    My PRD landscape has 2-3 applications. Whenever any application loads for the first time in the memory, it takes quite some time before it is loaded. Once the application is loaded, the response times are pretty quick and acceptable.
    During specific parts of the day / month, a specific application becomes active. During this time, other applications may or may not be used, but one specific application is definitely used. I want to keep this application's cubes loaded in the RAM, so that response times are quick, whenever the user needs it - whether for the first time or otherwise.
    How to keep alive a specific application's cubes alive and loaded in RAM? I am not looking for general solution like setting the "FM Service" to Automatic (currently it is set Manual) - setting this to Automatic, will affect all applications. However, I am looking for a specific application at a specific period of time.
    I am ok with a custom solution if required. Let me know, what are my options.

    I think you are looking for an inappropriate solution to your problem. Most HFM applications take a few seconds to start up. If your application takes such a long time to start up you really need to examine the root cause. Start by removing the Sub NoInput and Sub Input routines in your rules to see if this is the reason the application takes so long to start.
    If the removal of those routines does not significantly change the startup time, look through the event logs for possible causes. It is possible you have a connection problem with the Oracle database for example, or you have an environment configuration problem where the HFM application servers have a very slow connection to the database server, or possibly the database server performs poorly.
    I strongly suggest you investigate these root casues first before trying to make HFM behave in a non-standard way. Certainly you can start the HFM Management Service, which will start all of your HFM applications and keep them all up and running. This approach does not allow the applications to shut down on their own though. Only use this if you have exchausted your investigations (as I suggsted above).
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How do I connect my i phone 5s to my home wifi? keeps saying unable to connect after I put in the password

    how do I connect my i phone 5s to my home wifi? keeps saying unable to connect

    Is anyone else able to use the internet around you, say a computer or another device? If they are unable it might be your modem. You can always try to reset your modem. Simply unplug it and plug it back in,

  • How to keep applet's JFrame alive as browser's closed or, goes to other URL

    My applet has a JFrame that pops up when the applet is downloaded. Right now, if the browser goes to a different page or, if it is closed, the frame disappears.
    I would like to know how to keep the frame alive.
    Thanks.

    These comments applies to using the Applet PlugIn.
    One annoying thing about using the PlugIn is that every time you browse from your applet's page and return, it is destroyed and reinstantiated and then init'ed instead of just stop and start applied on the same applet object. One solution to maintaining state across multiple instances is to use static data. Here is an example that does this with a JFrame, since that is what the poster mentioned, although I usually just do this for the UI on the web page itself.
    This doesn't keep the frame visible when off the web page, but that seems to go against basic applet behavior.
    --Nax
    public class Applet1 extends JApplet
    {     private static JTextArea ui = new JTextArea();
         public void init()
         {     JFrame f = new JFrame("example");
              JScrollPane sp = new JScrollPane(ui);
              f.getContentPane().add(sp);
              f.setSize(200,200);
              f.setVisible(true);
    }

  • Apple TV won't stay on file sharing, can anyone explain how to keep it connected ??

    Having problems keeping Applet TV connected for file sharing, Will disconnect in the middle of watching a movie. Can anyone help
    and tell me how to keep the two devises communicating??

    Is it just when streaming photos or using home-sharing in general? Check istumbler (netstumbler for windows) to check interference. Also check firewall and anti-virus (if applicable), restart router/make sure it's up to date.

  • ADK - Keeping EIS Connections Alive

    Hi,
              I am using the ADK that comes with WL 8.1 SP3. The challenge I am facing is to keep my connections alive while there is no activity (at the TCP/IP socket level) between the app server and the EIS.
              The EIS closes any sockets after 30 minutes of inactivity causing the connections to go into CLOSE_WAIT state.
              Is there any method I can use within the connector to keep pinging the server and make sure these connections have TCP/IP traffic?
              Has anyone used the <test-frequency-seconds> weblogic-ra.xml? What is its purpose? pinging?
              Appreciate your insight..

    Hi
              I have a requirement, which is some what similar to what is mentioned above.
              I too have to ping the interface at regular intervals to keep the connection alive. I also assumed that, we can use the test-frequency-seconds attribute. But for that to work, we have to implement the interface, http://java.sun.com/j2ee/1.4/docs/api/javax/resource/spi/ValidatingManagedConnectionFactory.html, which is there only from weblogic 9.
              But since our client is using weblogic 8.1, we are tied to that version.
              Can anyone please assist in solving this.

  • How can I get my iPhone to show up on the panel to the right iTunes? I keep connecting it but it does not work.

    How can I get my iPhone to show up on the panel to the right iTunes? I keep connecting it but it does not work.

    http://support.apple.com/kb/TS1538

Maybe you are looking for

  • Best way to do a lookup with multiple tables

    Hello, I am looking for an example or how to do a lookup through ESB XSL transformation. What I am wanting to accomplish is something like below: I am reading in a flat file and then want to use a field in that file to do a lookup in multiple tables.

  • Link to folder in a room - missing header area and navigation panel

    Hello Community, I have a problem, again. While creating favorites to specific folders I got a problem while using and "publishing" them. While using the "send to..." feature the recipient gets an eMail with the link to this folder. When clicking thi

  • Mailbox cannot be found

    I had a computer death on my TiBook. My Apple store diagnosed the motherboard, but the hard disc was still okay and removed. The contents of the hard disc were then put into a new G4 PowerBook as a second user. The e-mails looked to be all there in t

  • Repitition of text in Adobe form.

    Hi, I am using a text field in adobe form.The content of the text field is getting extended  to the second page.But in the second page the content instead of following from the first page, starts repeating from the beginning of the first page. For ex

  • Absorb LMS (Learning Management System), not working

    I'm launching an online learning course that is implemented by Absorb LMS. They seem to be using flash and JAVA for their online courses. I installed the latest flash and JAVA runtime, but I can't hear any sound just can see video in Safari. I have O