Automatic Oracle Startup and Shutdown for Linux
Automatic Oracle Startup and Shutdown for Linux
Step 1. Login as root Step 2. vi /etc/oratab/ #*:/home/oracle/ora01:N ORCL:/home/oracle/ora01:Y (NàY) Step 3. ls $ORACLE_HOME/dbs #check initORACLE_SID.ora file (If there is not the file, you must copy it from $ORACLE_HOME/admin/oracle/pfile/ The file name maybe like initORACLE_SID.ora%, so when you copy it, you must rename it.) Step 4. cp $ORACLE_HOME/admin/oracle/pfile/ initORACLE_SID.ora% $ORACLE_HOME/dbs Step 5. mv initORACLE_SID.ora% initORACLE_SID.ora Step 6. Vi $ORACLE_HOME/bin/dbstart|dbshut conn / as sysdba à conn sys/PWD as sysdba (There is an error that I can not resolve it, so I change the dbstart and dbshut script conn / as sysdba ERROR: ORA-01031: insufficient privileges) Step 7. Create the following file as #!/bin/sh # # /etc/rc.d/init.d/oracle # Description: Starts and stops the Oracle database and listeners # See how we were called. case "$1" in start) echo -n "Starting Oracle Databases: " echo "----------------------------------------------------" >> /var/log/oracle date "! %T %a %D : Starting Oracle Databases as part of system up." >> /var/log/oracle (check whether it works)
Step 9. reboot
本文出自 “Oracle技术” 博客,请务必保留此出处http://ncutyb123.blog.51cto.com/2513359/646720 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |