Operating System - HP-UX
1751714 Members
5638 Online
108781 Solutions
New Discussion юеВ

Re: How to boot databases from multiple oracle installation

 
SOLVED
Go to solution
Liadi
Frequent Advisor

How to boot databases from multiple oracle installation

Hi all.
I got HPUX 11.00 and multiple oracle installations on it, each installation uses different user.
When I'm using dbstart script it start all of the databases on /etc/oratab that has Y mark on them, no matter with which installation they were installed.
Is there a solution?
Liad
6 REPLIES 6
Jeff Schussele
Honored Contributor

Re: How to boot databases from multiple oracle installation

Hi Liad,

Well, IF you've installed with different user names, you have no choice but to supply different oratab files to *each* user. But I'm not sure that's supported. If so it would have to be an env variable that would point to the diff oratab files, I'd suppose.

Rgds,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Stefan Farrelly
Honored Contributor
Solution

Re: How to boot databases from multiple oracle installation

You have to do what we did; make a copy of dbstart and dbshut and modify these copies to include/exclude which databases you actually want to start/stop. You can make a copy for each database you have if you want, call them dbstart. and dbshut. or create one called dbstart.singledb and dbshut.singledb which take an argument and only shut/start that one db, this is what we do.

We edit dbstart and modify this bit;

cat $ORATAB | while read LINE
do

TO:

#cat $ORATAB | while read LINE
#do
LINE=$(cat /etc/oratab|grep ${1}|tail -1)

So that the argument you supply ($1) is now the database to start (not every Y entry in /etc/oratab). You need to commend out the done statement further down also(as youve commented out the do).

Same for the dbshut script.

Now when you run it it only starts/stops the dbname you supplied, eg;

dbshut.singledb
sbstart.singledb
Im from Palmerston North, New Zealand, but somehow ended up in London...
Jakes Louw
Trusted Contributor

Re: How to boot databases from multiple oracle installation

An option would be to check the installation name within each /etc/passwd entry (in other words: the user-name), set it as ORACLE_SID, and then remove the entry from dbstart that loops through /etc/oratab?
Trying is the first step to failure - Homer Simpson
Liadi
Frequent Advisor

Re: How to boot databases from multiple oracle installation

Thank you all.
I now can run databases with multiple oracle installations, but only manually, it doesn't work on startup. I get this message from /etc/rc.log:
/sbin/rc3.d/S990dbora_qadab91[18]: su: not found.
"/sbin/rc3.d/S990dbora_qadab91 start" FAILED

dbora_qadab91 looks like:

#!/bin/sh
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/SAN_DISKS/qadab91
ORA_OWNER=oracle9s
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
start)
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "setenv ORACLE_HOME $ORA_HOME ; $ORA_HOME/bin/dbstart qadab91"
;;
stop)
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "setenv ORACLE_HOME $ORA_HOME ; $ORA_HOME/bin/dbshut qadab91"

;;
*)
echo $1
esac
Stefan Farrelly
Honored Contributor

Re: How to boot databases from multiple oracle installation

in your /sbin/init.d startup script (which is a link from /etc/rc3.d ensure the PATH variable is declared at the start and add to it; /usr/bin

This will then pick up the su command.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Liadi
Frequent Advisor

Re: How to boot databases from multiple oracle installation

Thank you very very much, it's working!!!

Stefan - you really helped me, thank you.