Re: How to logout in PRO*C?
From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1995/05/20
Message-ID: <3pjfb0$kgh_at_inet-nntp-gw-1.us.oracle.com>#1/1
> I have a server daemon on VMS that processes SQL requests from client
> programs. The program is written using PRO*C. If my connection to Oracle
> is broken (because Oracle was shut down, or my session was killed) it
> tries to log back in. Orace says it can't because it is already logged
> in.
>
> How do I log out of Oracle so I can re-establish my connection in PRO*C.
> There is an OCI call to log off, but it needs the address of the LDA.
>
> Is there a way to log off in PRO*C or is there a way to get the address
> of the LDA in PRO*C?
>
> Any help will be most appreciated.
>
> Steve Edwards
Date: 1995/05/20
Message-ID: <3pjfb0$kgh_at_inet-nntp-gw-1.us.oracle.com>#1/1
sedwards_at_crash.cts.com (Newline) wrote:
>
> I have a server daemon on VMS that processes SQL requests from client
> programs. The program is written using PRO*C. If my connection to Oracle
> is broken (because Oracle was shut down, or my session was killed) it
> tries to log back in. Orace says it can't because it is already logged
> in.
>
> How do I log out of Oracle so I can re-establish my connection in PRO*C.
> There is an OCI call to log off, but it needs the address of the LDA.
>
> Is there a way to log off in PRO*C or is there a way to get the address
> of the LDA in PRO*C?
>
> Any help will be most appreciated.
>
> Steve Edwards
Try....
/* Turn Off Error Handling */ EXEC SQL WHENEVER SQLERROR CONTINUE; /* 'Logs' you off, even if not connected cause of alter system kill etc */ EXEC SQL ROLLBACK WORK RELEASE; /* Turn Error Handling back on */ EXEC SQL WHENEVER SQLERROR DO sqlerror_hard(); /* Connect Again */ EXEC SQL CONNECT :oracleid; printf("\nConnected to ORACLE as user: %s\n\n", oracleid.arr);
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Received on Sat May 20 1995 - 00:00:00 CEST