1835116 Members
4259 Online
110076 Solutions
New Discussion

Re: ERROR IN .PROFILE

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

ERROR IN .PROFILE

When I su to oracle I get the following error. The dba's want it fixed, I've tried but cant figure it out.
Here is the error:

.profile[63]: unlimited: The specified number is not valid for this command.


Here is the line of code in the .profile that calls oraenv.

# Locate "osh" and exec it if found
ULIMIT=`(ulimit) 2>/dev/null`

if [ $? = 0 -a "$ULIMIT" -lt 2113674 ] ; then


Any ideas, I am lost. This same code works on my other systems without the error.



UNIX IS GOOD
4 REPLIES 4
Christopher McCray_1
Honored Contributor

Re: ERROR IN .PROFILE

Hello,

vi the file , type :63, and show that line. It looks as though it is complaining about you setting of unlimited.

Thanks

Chris
It wasn't me!!!!
Hai Nguyen_1
Honored Contributor
Solution

Re: ERROR IN .PROFILE

Robert,

I tried ulimit as root in sh and csh shells which returned different output.

In sh shell
# ulimit
4194303

And in csh shell:
# ulimit
unlimited

Therefore, ulimit may not always return a number as you expected it to. You may want to add another flag to check whether ULIMIT is a number before comparing it in your if statement.

Hai
Mark Greene_1
Honored Contributor

Re: ERROR IN .PROFILE

>> profile[63]: unlimited: The specified number is not valid for this command. <<

If you are going to set the ulimit to unlimited, it needs to be in quotes:

ulimit "unlimited"

This, however, is a horrible thing to do and you risk filling-up file systems doing this. Bad things happen if you fill /tmp or /var/tmp with a core file. This also posses a security threat, as unencrypted passwords may be in the core file.

HTH
mark
the future will be a lot like now, only later
Jeff Schussele
Honored Contributor

Re: ERROR IN .PROFILE

Hi Robert,

Another thing to consider is that "normal" users cannot increase their ulimit.
No idea what follows then, but if you're trying to increase ulimit as the Oracle user it will fail to do so.
Only root has that ability & it's ulimit is unlimited by default anyway....

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!