1. Change the last field for the database line to Y
2. Create the file /etc/init.d/dbora and add the following code in it
3. Change the group of the dbora file to dba, and set its permissions to 750
4. Create symbolic links to the dbora script in the appropriate run-level script directories
5. Restart srv1 and wait for a few minutes to allow the database to automatically start up.
That’s it.
vi /etc/oratab
orcl:/u01/app/oracle/product/19.3.0.0/dbhome_1:YBASH2. Create the file /etc/init.d/dbora and add the following code in it
vi /etc/init.d/dbora
#! /bin/sh
# description: Oracle auto start-stop script.
ORA_HOME=/u01/app/oracle/product/19.3.0.0/dbhome_1
ORA_OWNER=oracle
case "$1" in
'start')
# Start the Oracle databases:
# Remove "&" if you don't want startup as a background process.
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" &
touch /var/lock/subsys/dbora
;;
'stop')
# Stop the Oracle databases:
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" &
rm -f /var/lock/subsys/dbora
;;
esacBASH3. Change the group of the dbora file to dba, and set its permissions to 750
chgrp dba /etc/init.d/dbora
chmod 750 /etc/init.d/dboraBASHln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dboraBASHps -ef | grep pmon
sqlplus / as sysdbaBASHIf you would have any questions or concerns, please leave your comments. I would be glad to explain in more details. Thank you so much for all your feedback and support!
Comments
0Please sign in to leave a comment.
No comments yet
Be the first to share your thoughts!