solaris 10 E450
1.
bash-3.00$ ls /export/home/oracle/oracle/product/10.2.0/bin/ |grep dbs
dbshut
dbstart
bash-3.00$
2.
bash-3.00$ vi /export/home/oracle/oracle/product/10.2.0/bin/dbstart
(notice:
# To configure:
# 1) Set ORATAB:
# On Solaris
# ORATAB=/var/opt/oracle/oratab
# All other UNIX platforms
# ORATAB=/etc/oratab
#
# 2) Update $ORATAB/oratab with Database Instances that need to be started up.
# Entries are of the form.:
# $ORACLE_SID:$ORACLE_HOME::
# An example entry:
# main:/usr/lib/oracle/emagent_10g:Y
#
# 3) Set ORACLE_HOME_LISTNER
# Set this to enable auto startup for Oracle Net Listener.
# The script uses this find the binary to start Net Listener.
#
# Also, if the listener name is not the default name LISTENER, you must
# specify the listener name in the stop and start commands:
# $ORACLE_HOME/bin/lsnrctl {start|stop} listener_name
)
按照提示的修改吧
3.
bash-3.00$ vi /var/opt/oracle/oratab
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/export/home/oracle/oracle/product/10.2.0:Y
test:/export/home/oracle/oracle/product/10.2.0:Y
4.按2的步骤修改dbshut
bash-3.00$ vi /export/home/oracle/oracle/product/10.2.0/bin/dbshut
5.运行有dbstart与dbshut脚本,测试是否能够正常启库停库。
6.数据库系统启动脚本 dbora (注意:oracle的shell环境为ksh /etc/passwd)
#!/bin/ksh
ORACLE_HOME=/export/home/oracle/oracle/product/10.2.0
ORACLE_OWNER=oracle
if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "Oracle startup:cannot start"
exit
fi
case "$1" in
'start' )
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart"
;;
'stop' )
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut
;;
esac
7.将 dbora 脚本放到 /etc/init.d 目录下。由于目前本人还不清楚solaris 10的svc管理方式,暂时还无法做到oracle数据库随系统启动. (待续)
8.solaris 10 有svc 管理启动项。呵呵,
[email=root@E450]root@E450[/email] # ln -s /etc/init.d/dbora /etc/rc3.d/S88dbora
做完连接后依然可以使数据库随系统启动.
1.
bash-3.00$ ls /export/home/oracle/oracle/product/10.2.0/bin/ |grep dbs
dbshut
dbstart
bash-3.00$
2.
bash-3.00$ vi /export/home/oracle/oracle/product/10.2.0/bin/dbstart
(notice:
# To configure:
# 1) Set ORATAB:
# On Solaris
# ORATAB=/var/opt/oracle/oratab
# All other UNIX platforms
# ORATAB=/etc/oratab
#
# 2) Update $ORATAB/oratab with Database Instances that need to be started up.
# Entries are of the form.:
# $ORACLE_SID:$ORACLE_HOME::
# An example entry:
# main:/usr/lib/oracle/emagent_10g:Y
#
# 3) Set ORACLE_HOME_LISTNER
# Set this to enable auto startup for Oracle Net Listener.
# The script uses this find the binary to start Net Listener.
#
# Also, if the listener name is not the default name LISTENER, you must
# specify the listener name in the stop and start commands:
# $ORACLE_HOME/bin/lsnrctl {start|stop} listener_name
)
按照提示的修改吧
3.
bash-3.00$ vi /var/opt/oracle/oratab
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/export/home/oracle/oracle/product/10.2.0:Y
test:/export/home/oracle/oracle/product/10.2.0:Y
4.按2的步骤修改dbshut
bash-3.00$ vi /export/home/oracle/oracle/product/10.2.0/bin/dbshut
5.运行有dbstart与dbshut脚本,测试是否能够正常启库停库。
6.数据库系统启动脚本 dbora (注意:oracle的shell环境为ksh /etc/passwd)
#!/bin/ksh
ORACLE_HOME=/export/home/oracle/oracle/product/10.2.0
ORACLE_OWNER=oracle
if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "Oracle startup:cannot start"
exit
fi
case "$1" in
'start' )
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart"
;;
'stop' )
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut
;;
esac
7.将 dbora 脚本放到 /etc/init.d 目录下。由于目前本人还不清楚solaris 10的svc管理方式,暂时还无法做到oracle数据库随系统启动. (待续)
8.solaris 10 有svc 管理启动项。呵呵,
[email=root@E450]root@E450[/email] # ln -s /etc/init.d/dbora /etc/rc3.d/S88dbora
做完连接后依然可以使数据库随系统启动.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11780477/viewspace-705085/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11780477/viewspace-705085/