Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: help: Pro*C app hangs when server crashes
Actually, they are not hung. The issue is that you cannot reconnect to
the database without the environment variables. I ran into this issue
when developing a 24X7 application that was up longer than the
database it connected to.
check you OS/Unix manuals on the environment variable... It is a generally overlooked arguement that can be attached to the end of the command line.
eg main (argc, argv, environment )
Then to log in after the hang, you need these environment variables for a function which I currently forget. If I recall it was hiding in the proC manual. Look for reference to the environment and logging in.
Mike Krolewski.
foo phoo wrote:
> Hi. I'm developing Pro*C precompiler apps on Oracle 7.3, running on a
> Sun Enterprise 4000 under SunOS 5.6. To my surprise, if the Oracle
> server crashes (e.g. I deliberately do a "shutdown abort"), the embedded
> SQL statements in my app don't start failing (e.g. returning ORA-01012):
> they hang forever, so my app freezes and can't do any error recovery.
> Things get totally blocked up.
>
> If I communicate between two different UNIX hosts via SQL*Net, with the
> server on one and the app on the other, I *do* get nice error codes
> (e.g. "end of file on communication stream", "not connected"). But on a
> single host, communicating via shared memory, things just freeze.
>
> Is there some mode, flag, etc. that I need to set in order to get
> embedded SQL statments to start returning error codes if the Oracle
> server crashes? Any help would be helpful. Thanks!
>
> ZZZ
Received on Thu Jun 04 1998 - 02:31:16 CDT
![]() |
![]() |