dbstart dbshut (半解决)

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 
做完连接后依然可以使数据库随系统启动.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11780477/viewspace-705085/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11780477/viewspace-705085/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值