ITPub博客

首页 > 数据库 > Oracle > oracle10g在solaris的自启动

oracle10g在solaris的自启动

原创 Oracle 作者:rainbowbridg 时间:2007-08-22 16:44:35 0 删除 编辑

cat /etc/init.d/oracle10g
#!/bin/sh

case "$1" in
start)

# start tsnlisnter
echo "start tsnlisnter"
su - oracle -c "lsnrctl start"

# start database
echo "Start Oracle database instance"
su - oracle -c "sqlplus /nolog @/oracle/product/10.2.0/rdbms/admin/dbstart"
#CONN / AS SYSDBA
#startup
#exit "|sqlplus /NOLOG"

# start enterprise manager
echo " Start Emterprise Manager"
su - oracle -c "emctl start dbconsole"

# start isqlplus
echo "Start isqlplus"
su - oracle -c "isqlplusctl start"

;;
stop)
# shutdown database
echo "Shutdown Oracle database instance"
su - oracle -c "sqlplus /nolog @/oracle/product/10.2.0/rdbms/admin/dbshut"
#CONN SYS/PASSWORD AS SYSDBA
#SHUTDOWN immediate
#exit "|sqlplus /NOLOG"

# stop tsnlisnter
echo "Stop tsnlisnter"
su - oracle -c "lsnrctl stop"

# stop enterprise manager
echo " Stop Emterprise Manager"
su - oracle -c "emctl stop dbconsole"

# stop isqlplus
echo "Stop isqlplus"
su - oracle -c "isqlplusctl stop"

;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0

cat dbstart.sql

conn / as sysdba
startup
exit

cat dbshut.sql

conn / as sysdba
shutdown immediate
exit

[@more@]

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

下一篇: vnc在solaris的安装
请登录后发表评论 登录
全部评论
  • 博文量
    237
  • 访问量
    1587699