AIX KSH: 0403-029 There is not enough memory available now

Hi guys,

I hope you can help me out with this one.

I am getting an error in AIX when running my KSH script 0403-029 There is not enough memory available now.

It is getting this error at the point where I have a PL/SQL Script executed. After executing, I wanted to put it in the log file.

My guess is that the script returned pretty much a big amount of output lines from PL/SQL script and is not able to write into the file.

 
LOADREC='sql script...'
 
echo '$LOADREC' >> $LOGFILE
 

In Solaris, I have never experienced this.
I hope you can advise.
Thanks!

---------- Post updated at 09:12 PM ---------- Previous update was at 01:00 AM ----------

Apparently the AIX admin staff did something and now i am getting

Segmentation fault(coredump)

This is when i run sql plus and call a big sql script which processes a lot of things. :frowning: any help?

Hi.

I wonder why you are doing this:

LOADREC='sql script...'
 
echo '$LOADREC' >> $LOGFILE

Instead of this:

sql script... >> $LOGFILE

To say that "Apparently the AIX admin staff did something" doesn't really help us. Perhaps you had better start by asking them what they did.

Hi Scott,

sorry for being vague. The AIX admin increased the memory for the login that i was using.

I was using the code below to copy all the print lines from the sql script to the file

LOADREC='sql script...'
 
echo '$LOADREC' >> $LOGFILE

Will it be different if i do your way? Maybe I can give it a try.

If you do nothing else with the variable then the assigning of the command string to the variable is complete useless.
Scottn's way is a direct efficient way without any detour.

If you were going to execute the script and redirect the output to the log, this way is wrong anyway since you do not execute the script itself (just in case this was your intended goal).
Here again, do it like Scottn's says.

Hi all,

thanks for your inputs. i tried to do what Scott suggested but it is also the same error.
it seems that all dbms_output.put_line is consuming a large amount of memory in out AIX server since there are a lot of dbms_output.put_line in our SQL Script (mainly used for debugging).

commenting some of the output lines seems to omit the error but it seems to be a work around only.