暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片
Oracle设置开机自启.docx
647
6页
7次
2023-05-26
5墨值下载
Oracle
设置开机自启
方法一(推荐)
1
shell
oracle
下)
Oracle
/data/oracle/product/11.2.0/bin/dbstart_orcl
$ORACLE_HOME/bin
容如下:
#!/bin/bash
export ORACLE_SID=orcl
sqlplus / as sysdba <<EOF
startup;
EOF
注:多个实例需要编辑多个脚本,指定对
ORACLE_SID
ORACLE_HOME
不同时也
指定
2
shell
oracle
下)
重新启动
Oracle
数据库的脚本为
/data/oracle/product/11.2.0/bin/dbrestart_orcl
,内
容如下:
#!/bin/bash
export ORACLE_SID=orcl
sqlplus / as sysdba <<EOF
shutdown immediate;
startup;
EOF
3
shell
oracle
下)
关闭
Oracle
数据库的脚本
/data/oracle/product/11.2.0/bin/dbshut_orcl
,内容如下
#!/bin/bash
export ORACLE_SID=orcl
sqlplus / as sysdba <<EOF
shutdown immediate;
EOF
注:以上三个脚本都要
x
权限
chmod +x *_orcl
编辑
oracle
实例的系统服务配置文件脚本(
root
用户下)
oracle
/usr/lib/systemd/system/orcl.service
,内容如下:
[Unit]
Description=Oracle RDBMS
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/su - oracle -c "/data/oracle/product/11.2.0/bin/dbstart_orcl
>> /tmp/oracle.log"
ExecReload=/usr/bin/su - oracle -c
"/data/oracle/product/11.2.0/bin/dbrestart_orcl >> /tmp/oracle.log"
ExecStop=/usr/bin/su - oracle -c
"/data/oracle/product/11.2.0/bin/dbshut_orcl \>\> /tmp/oracle.log"
RemainAfterExit=yes
[Install]
of 6
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文档被以下合辑收录

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜