Oracle RAC - .bash_profile of the user grid
Oracle RAC Solution · Config document · referenced from Database creation and user environments
if tests in this file compare against strings in typographic quotes (“grid”, “/bin/ksh”). They can never be true, so the ulimit lines never run. The file is shown as it was; do not copy that block.The login profile of the Grid Infrastructure owner grid. It sets the environment for the Grid home and the local ASM instance. Unlike the profile of oracle it has one home only and no switching aliases.
| Item | Value |
|---|---|
| Path | /home/grid/.bash_profile |
| Shown here | oradb01 |
| Deployed on | oradb01 and oradb02, two lines differ |
| Read by | every login shell of grid, for example su - grid |
| Owner and mode | not in the notes |
The file
# Settings specific to the user "grid" umask 022 # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs if [ $USER = “grid” ]; then if [ $SHELL = “/bin/ksh” ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi # Grid Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=oradb01.example.net; export ORACLE_HOSTNAME ORACLE_UNQNAME=clsdb; export ORACLE_UNQNAME ORACLE_BASE=/data/u01/app/grid; export ORACLE_BASE GRID_HOME=/data/u01/app/grid11204; export GRID_HOME ORACLE_HOME=$GRID_HOME; export ORACLE_HOME ORACLE_SID=+ASM1; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH BASE_PATH=/usr/sbin:$PATH:$HOME/bin; export BASE_PATH PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH alias sql='sqlplus / as sysasm'
For the second node the notes show only two lines, without saying that the rest is the same; I read it as the same file with these two lines changed:
| Host | Line | Value |
|---|---|---|
oradb01 | ORACLE_HOSTNAME | oradb01.example.net |
oradb02 | ORACLE_HOSTNAME | oradb02.example.net |
oradb01 | ORACLE_SID | +ASM1 |
oradb02 | ORACLE_SID | +ASM2 |
The typographic quotes
As in the profile of oracle, the quotes around grid and /bin/ksh are the curly characters “ and ”. The shell treats them as part of the word, the user name grid never equals “grid”, and the whole ulimit block is skipped without an error. The limits of grid come from limits.conf and from the working block in /etc/profile.local.
The other lines
| Line | What it does |
|---|---|
ORACLE_BASE=/data/u01/app/grid | The Oracle base of the Grid Infrastructure owner. The Grid home /data/u01/app/grid11204 lies beside it, not under it |
ORACLE_HOME=$GRID_HOME | The Grid home is the only home this user works with |
ORACLE_SID=+ASM1 | The local ASM instance |
ORACLE_UNQNAME=clsdb | The same line as in the profile of oracle. It names the database, which grid does not administer |
BASE_PATH | The same construction as in the profile of oracle; no other file of this user reads it again |
alias sql | sqlplus / as sysasm, operating system authentication through the group asmadmin |
Checked against Oracle AI Database 26ai
| As built | Today |
|---|---|
umask 022 in the profile of the software owner | Still required, in the same words in the 11.2 and the 26ai installation guides |
ulimit block in the profile | Not in the 11.2.0.4-era or the current guides. Limits are set in limits.conf only |
sqlplus / as sysasm | Still the way to administer ASM: members of the OSASM group connect to the ASM instance as SYSASM with operating system authentication |
grid in oinstall, asmadmin and asmdba, apart from the database owner | The same role separation is documented today |
The profile would do its job unchanged; the ulimit block can simply be deleted.