首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

Oracle在Linux上面的自启动和自关闭脚本

2012-11-16 
Oracle在Linux下面的自启动和自关闭脚本##以下部分为自动启动ORACLEecho begin to start oracleexport O

Oracle在Linux下面的自启动和自关闭脚本
##以下部分为自动启动ORACLE
echo "begin to start oracle"
export ORACLE_HOME=/home/oracle/OraHome/9.2.0
export ORACLE_SID=orcl
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
cat <<EOF|su - oracle -c "$ORACLE_HOME/bin/sqlplus /nolog"
conn / as sysdba
startup
exit
EOF


##以下部分为自动停止
echo "begin to start oracle"
export ORACLE_HOME=/home/oracle/OraHome/9.2.0
export ORACLE_SID=orcl
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
cat <<EOF|su - oracle -c "$ORACLE_HOME/bin/sqlplus /nolog"
conn / as sysdba
shutdown immediate
exit
EOF

热点排行