Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> pro*c - how to determine connection?

pro*c - how to determine connection?

From: Torsten Mueller <dev-null_at_shared-files.de>
Date: Fri, 17 Jun 2005 09:14:55 +0200
Message-ID: <u8y19laj4.fsf@fastmail.fm>


I cannot guarantee a stable connection of my application to the database over a long time (a week or longer). I'm told to implement a test to determine if the connection has broken. In this case I should try a reconnect.

My idea to solve this problem is a simple SELECT that must be successful. I use "SELECT 1 FROM DUAL". I thought if this fails there's no connection and I can try to (re)connect using username, password and host. But this (re)connect fails if this SELECT is executed without an initial connection. The error is

        "ORA-00001: violation against uniqueness, rule (%s.%s)"
        (sorry, this text is not original, mine is German).

My questions are: can I work around this? Or is there e better way to implement this test? Do I really have to test a connection or will it be reconnected itself if it has broken and should again be used?

T.M. Received on Fri Jun 17 2005 - 02:14:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US