Yesterday, I am attempted a creation of auto start/stop script for Oracle Database 11g R2 on Solaris 10 (SPARC).
As usual (I’ve created on Linux environment before), I’ve created the auto start script on /etc/init.d/.
Then created symbolic links on /etc/rc3.d to the script that I created on /etc/init.d (in this case I’ve created symbolic link named S99 and K01).
Next edited the oratab on /var/opt/oracle/oratab (change mysid:$ORACLE_HOME:N to mysid:$ORACLE_HOME:Y)
Then, reboot server.
But, Oracle database not started up automatically after reboot the Solaris Server, and there are error:
$ORACLE_HOME/bin/dbstart: test: argument expected
From the metalink (ID: 369923.1),
The dbstart/dbshut scripts require bash to work properly as it contains bash style commands.
The solution was to replace the #!/bin/sh with #!/bin/bash on the top of dbstart and dbshut script.
vi $ORACLE_HOME/bin/dbstart, put the #!/bin/bash on top of the script, save.
vi $ORACLE_HOME/bin/dbshut, put the #!/bin/bash on top of the script, then save.
reboot server, and now Oracle Database can startup automatically after reboot.
Notes:
Oracle Database version: 11.2.0.1.0
OS: Solaris 10 (SPARC)
Clustered db: No (single instance)
6:46 pm
It help me to solve my app installation, thanks for you.