This discussion is archived
2 Replies Latest reply: Jan 21, 2013 11:25 AM by EdStevens RSS

ulimit for oracle user

EdStevens Guru
Currently Being Moderated
OL 5.6 x86-64, running under VirtualBox

Background
I've built quite a few sandbox servers under Vbox, and always loaded the necessary packages with a 'yum install oracle-validated'. Also using a standard template .bash_profile, that includes this information regarding ulimit
if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi
#
no problems with any of the above

Issue
Now I've decided to build a box that mimics one of my production servers as closely as I can get it. To that end, instead of installing 'oracle-validated', I went to the production box and captured the output of 'rpm -qa', then edited that output turn each line into a 'yum -y install ...' command, and executed the result on the vm.

Now, when I connect as 'oracle' I get
-bash: ulimit: max user processes: cannot modify limit: Operation not permitted
I'm not sure of what I could have done differently this time to result in this behavior.
  • 1. Re: ulimit for oracle user
    Dude! Guru
    Currently Being Moderated
    The ulimit facility provides hard and soft limits. With the ulimit command, you can change your soft limits, up to the maximum set by the hard limits.

    To see current hard and soft limits:
    ulimit -Ha
    ulimit -Sa

    Account specific limits are set in /etc/security/limits.conf. You will most likely need to increase the limits of the Oracle user. In particular add the following:

    oracle soft nofile 131072
    oracle hard nofile 131072
    oracle soft nproc 131072
    oracle hard nproc 131072
    oracle soft core unlimited
    oracle hard core unlimited
    oracle soft memlock 50000000
    oracle hard memlock 50000000


    The oracle-validated package does more than just triggering the installation of additional packages. It also sets various system kernel and oracle account parameters. For details:

    # wget http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/x86_64/oracle-validated-1.1.0-17.el5.x86_64.rpm
    # rpm2cpio oracle-validated-1.1.0-17.el5.x86_64.rpm | cpio -idmv

    Then analyze the files.
  • 2. Re: ulimit for oracle user
    EdStevens Guru
    Currently Being Moderated
    just what I needed. Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points