Summary of Automatic startup of Oracle Database on Solaris: 1. Automatic startup of Solaris on Solaris all the feet under the etcrc. d directory will be automatically run at startup
Summary of automatic start of Oracle Database on Solaris: 1. Automatic Start of Solaris on Solaris all the feet in the/etc/rc. d directory will be automatically run at startup
On Solaris, the Automatic startup of Oracle Database is summarized as follows:
1. Automatic Start upon Solaris Startup
When Solaris is started, all scripts under the/etc/rc. d directory are automatically run. The larger the N value, the higher the execution level. The script starting with S runs automatically at startup, and the script starting with K runs automatically at shutdown.
Ii. Oracle Startup Script
You can write the startup script by yourself, or use the script that starts and closes the database that comes with Oracle.
Oracle Script: $ ORACLE_HOME/bin/Dbstart, $ ORA_HOME/bin/Dbshut
Note that the PFILE parameter in dbstart may be faulty and needs to be modified manually.
1. If the dbstart command is not responded to by running it under an oracle user/Var/opt/oracle/oratabOra:/export/home/oracle/product/9.2: N"To"Ora:/export/home/oracle/product/9.2: Y".
Iii. Oracle Automatic startup procedure (use the script provided by Oracle)
1. Modify the dbstart and dbshut scripts to ensure that the database can be started and closed during direct operation;
2. Create the dbstart and dbshut scripts and place them in the/etc/init. d directory. The contents of dbora are as follows:
#! /Bin/sh
ORA_HOME =/export/home/oracle/app/oracle/products/9.2.0
ORA_OWNER = oracle
If [! -F $ ORA_HOME/bin/dbstart]
Then
Echo "Oracle startup: cannot start"
Exit
Fi
Case "$1" in
'Start ')
Su-$ ORA_OWNER-c $ ORA_HOME/bin/dbstart &
/Etc/init. d/dblsnrctl. sh
;;
'Stop ')
Su-$ ORA_OWNER-c $ ORA_HOME/bin/dbshut &
;;
Esac
3. Create the script dblsnrctl. sh to start lsnrctl (the dbora script will call this script) to prevent dblsnrctl. sh from being in the/etc/init. d directory. The content of dblsnrctl. sh is as follows:
#! /Bin/sh
Su-oracle
Lsnrctl start
Exit
4. modify the permissions of the dbora script and the dblsnrctl. sh script to ensure that they can run:
# Chmod 755/etc/init. d/dbora
# Chmod 755/etc/init. d/dblsnrctl. sh
5. Set the startup link in/etc/rc2.d:
# Cd/etc/rc2.d
6. Set the closing link in/etc/rc0.d:
# Cd/etc/rc0.d