Single bash profile with multiple DB option

Shrikant's Blog

There are times when we have more than 1 database on a single servers. So setting OS profile for oracle environment becomes complicated. Like how to set SID or oracle home for all Databases.

A Solution can be is creating a separate OS user for different database or can go with below statement. Editing oracle .profile in /home/oracle.

Below showing 5 different SID with 4 different versions of database, 10.1.0.1, 10.2.0.4, 11.1.0.7, 11.2.0.2. We can see there are two database DB4 and DB5 with same oracle version 11.2.0.2, so even in this case we need to have 2 different option 4 and 5 as the SID are different.

cat .profile PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:. export PATH if [ -s "$MAIL" ]           # This is at Shell startup.  In normal then echo "$MAILMSG"        # operation, the Shell checks fi                          # periodically. echo " " echo " " echo "            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "                                   Database options"…

View original post 216 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s