Re: PRO*C : problem with large select

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Fri, 16 Jul 1999 08:43:00 -0400
Message-ID: <378F28D4.1A390D33_at_Unforgettable.com>


Some of this depends on what OS you are using, the version of the RDBMS that you are using (as well as any patches that are applied) and the version of Pro-C.

I've seen many different forms of this problem over the past couple years and I've never found a single solution that is a cure for all circumstances. However, here are a couple things that may alleviate your situation.

  1. When you are ready to exit, execute the following: EXEC SQL ROLLBACK RELEASE;
  2. Just before you exit from the program, perform signal(SIGSEGV,SIG_IGN). If you are using POSIX signal handling then you'll have to use sigaction(). I strongly suggest that you place this in an exit routine that you have registered with atexit() and that it be the final statement in that function. If you would like to see whether this is actually working then use a non-reentrant signal handler rather than setting SIG_IGN and have that signal handler send a custom message to stderr and then do an _exit() from there.
  3. Put a .sqlnet.ora in the $HOME directory of the account that runs the program and in this file have the following (I have seen cases where the value 1 works better then OFF, but that has been rare): TRACE_LEVEL_CLIENT=OFF TRACE_FILE_CLIENT=OFF TRACE_DIRECTORY_CLIENT=OFF
Note that there is a '.' in front of the name. The rules are this - when a client connects the system will read the system level sqlnet.ora from the $ORACLE_HOME/network/admin
directory and then look for a file named .sqlnet.ora in the home directory of the uid that is connecting. If you are connecting as a client app from a pc then sqlnet.ora must be in the current directory, but from the sounds of it you are running a host-based app.

Ken

fvieren_at_atos-group.com wrote:

> I have a Pro*C program that works properly with small amount of data
> < 300 000 lines.
>
> The purpose of this program is read a in file and execute a select for
> each line.
>
> But When i try to manage more than 300 000 lines, my program works OK
> (Work is done transacs are commited) but it ends with a core dump !
> and returns value 138.
>
> This treatment does as single select as line to extract. We do not use
> any stack or array for data.
>
> do you have any idea ?
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Fri Jul 16 1999 - 14:43:00 CEST

Original text of this message