Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: If is a user process connected to the database?
Alex Vinokur wrote:
>
> Hi,
>
> 1. How can we know in Pro*C/C++
> if a user process is connected to the database?
> P.S. I have got
> ORA-01012: not logged on
>
> 2. Here is a piece from Oracle8 Documentation.
>
> //===============================
> //-------------------------------
> Oracle8 Error Messages
> Release 8.0.4
> A58312-01
>
> <quote>
> ORA-01012: not logged on
>
> <snip>
> after the instance it is connected to terminates,
> forcing the process to disconnect.
> <snip>
>
> </quote>
> //===============================
>
> What does it mean : ... connected to terminates?
> Why (and when) does it happen?
>
> //#########################################################
> //------------------- Environment -------------------------
>
> === Oracle 8.0.5
> === Pro*C/C++ : Release 8.0.5.0.0
> === SunOS 5.6
>
> //---------------------------------------------------------
>
> //#########################################################
It means that you are attempting to perform database operations (DML probably) when you are not in a logged in status.
When your program does the connect, does it check whether the connectionion was successful by examinging sqlca.sqlcode or having something like:
EXEC SQL WHENEVER SQLERROR GOTO XYZ; If you don't do either then you have no way of knowing why the connection failed.
............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ............................................................................... ...............................................................................Received on Tue Nov 23 1999 - 07:09:06 CST
![]() |
![]() |