Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbstart and dbshut wont work on boot

Status
Not open for further replies.

bookouri

IS-IT--Management
Feb 23, 2000
1,464
US
Im setting up a new database on a Sun box. I have my oratab, and I have created a dbstart and dbshut in init.d and created a link to rc0.d for K01dbshut and rc2.d for S99dbstart.

I have in dbstart
su - oracle -c "/u01/oracle/product/9.2.0/bin/dbstart"
su - oracle -c "/u01/oracle/product/9.2.0/bin/lsnrctl start"

and the appropriate reverse in dbshut

But... oracle will not start automatically when I reboot. I can reboot and then from a command line enter the su commands and everything works fine.. the only thing is that from a command line the system asks me for oracle's password. I assume that this is why the database doesnt start on reboot, but I thought, and all documentation I can find says that if you are logged in as root and su to another user you wont be asked for that users password to execute the commands.

can anyone point me in the right direction to get my database to auto start?

thanks
 
sorry, I made a mistake, when logged in as root the su command does not ask for a password. So the dbstart problem is not related to that...
 
Have you set the correct environment up in the scripts (oracle home, sid, paths, etc.)? and are you sure the database is going down when the system goes down?
 
post the messages you get when you run K01dbshut (i.e. spool what you do to a file). Also the permissions and links for /etc/rc0.d, /etc/init.d and /u01/oracle/product/9.2.0/bin/dbstart. There is really not enough info to give you more than broad guesses.
 
You might also want to compare the scripts you are using to the script that is in the ORacle documentation (a96167.pdf) which should be in your $ORACLE_HOME/doc directory on the Sun box. Open that file and search on dbshut a couple of time to get to the section on automating startup and shutdown.
 
Here are all the pieces of the puzzle... as root I can run /etc/init.d/dbstart and dbshut from the command line and they work fine.. its only on boot that they do not automatically run

in init.d
ls -al db*
-rwxr-xr-x 1 root other 134 dbshut
-rwxr-xr-x 1 root other 143 dbstart

in 9.2.0/bin
-rwxr-xr-x 1 oracle dba 2767 dbshut
-rwxr-xr-x 1 oracle dba 4469 dbstart

in rc0.d
lrwxrwxrwx 1 root other 18 K01dbshut -> /etc/init.d/dbshut

lrwxrwxrwx 1 root other 19 S99dbstart -> /etc/init.d/dbstart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top