Re: ProC and multiple logons

From: Scott Urman <surman_at_oracle.com>
Date: 6 Jan 1995 15:51:00 GMT
Message-ID: <3ejot4$ajo_at_dcsun4.us.oracle.com>


In article <tyagi-0401951624440001_at_srishti.cns.vt.edu>, tyagi_at_srishti.cns.vt.edu (Dhawal Tyagi) writes:
|> Hi,
|> I'm writing C program, in which I first logon to the database with say
|> userid A/B, then I fork a child process in which when I try to logon
|> with userid C/D, I get an error " ORA-01075: you are currently logged on"
|> Now I understand that in the same process I can't logon more than once
|> but is this applicable to child processes also ?
|> Previously I was doing this in two different threads, but was getting
|> the same thing, so I switched to fork(), but sigh...
|>
|> System Sun SPARC 10, Solaris 2.3, Oracle 7.1.3 , ProC 2.0.3
|>
|> Regards
|> Dhawal
|>
|> --
|> Programmer/Analyst
|> Communications Networks Services
|> (703) 231-7973
|> include <stddisclaimer.h>

In general, it is a bad idea to fork() while you are connected. You end up with two user processes, and one shadow process. So both user processes share the same connection - when one disconnects, the other one does too. More seriously, if the parent is executing an SQL statement and gets swapped out, then the child comes in and executes its own SQL statement, you get really confused and end up with ORA-3106 and ORA-3113 errors. I wouldn't recommend forking while connected. Disconnect, fork(), then have the parent and child connect separately. Received on Fri Jan 06 1995 - 16:51:00 CET

Original text of this message