RedHat(Linux) Oracle数据库设置开机自启动
1 首先修改/etc/oratab文件添加如下行:
ycr:/u01/app/oracle/product/12.1.0/dbhome_1:Y
关于/etc/oratab文件解释如下:
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
ycr:/u01/app/oracle/product/12.1.0/dbhome_1:Y
上面三个参数的意义分别为,实例名、ORACLE HOME、是否允许使用dbstart启动数据库
2 修改文件/etc/rc.d/rc.local,添加如下行:
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart"
关于rc.local解释如下:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart"
/etc/rc.d/rc.local做为初始化脚本中,的最后一个随开机启动。
RedHat(Linux) Oracle数据库设置开机自启动的更多相关文章
- linux下Oracle数据库实例开机自启动设置
linux下数据库实例开机自启动设置 1.改动/oratab [root@org54 ~]# vi/etc/oratab --把N改为Y,例如以下提示 # This file is used ...
- 配置Oracle数据库的开机自启动
每当数据库服务器重启后,都要重新启动数据库的监听和实例,特别是在服务器断电重启.例行维护性的场景下.能否像Windows服务器一样,让实例和监听随着服务的启动而启动呢?答案当然是肯定的,我们可以利用O ...
- Linux服务器,服务管理--systemctl命令详解,设置开机自启动
Linux服务器,服务管理--systemctl命令详解,设置开机自启动 syetemclt就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了. 摘要: syst ...
- CentOS 6下 Oracle11gR2 设置开机自启动
[1] 更改/etc/oratab # This file is used by ORACLE utilities. It is created by root.sh # and updated by ...
- 设置开机自启动VirtualBox虚拟机系统
如果常用VirtualBox虚拟机系统的话,设置个随开机启动也是很方便的.不需要打开VirtualBox窗口,直接就是系统启动了. 又继续上网搜索学习了.(设置开机自启动VirtualBox虚拟机系统 ...
- Linux中如何设置服务自启动?
转自:Linux中如何设置服务自启动? 有时候我们需要Linux系统在开机的时候自动加载某些脚本或系统服务,主要用三种方式进行这一操作: ln -s 在/etc/rc.d/rc ...
- Linux 系统设置sh文件开机自启动
工作中有一个linux下的服务需要启动,但是机器总是断电,导致需要反复启动,找了一下开机自启动的方法,解决了这个问题.Linux设置开机自启动非常简单,只要找到rc.local文件,将你需要自启动的文 ...
- Ubuntu14.04设置开机自启动脚本
方法一.编辑rc.loacl脚本 Ubuntu开机之后会执行/etc/rc.local文件中的脚本,所以我们可以直接在/etc/rc.local中添加启动脚本.在 exit 0 前面添加好脚本代码, ...
- linux下配置tomcat开机自启动
Linux下配置tomcat开机自启动 1.写一个tomcat脚本,内容如下,设置其权限为755,放在/etc/init.d/目录下 #!/bin/bash## /etc/init.d/tomca ...
随机推荐
- selenium+Python(Page Object 设计模式实例)
以下实例演示了采用了page Object设计模式的方式登录qq空间: 1.创建基础类page:在初始方法__init__()定义驱动的(driver),基本url(base_url)和超时时间(ti ...
- Java万年历,输入年月获取该年月日历表
//输入年份和月份,打印出这个月的日历表 /* 1.1900年1月1日是星期一 2.计算输入的年份距离1900年有多少天再计算当年1月1日距这个月有多少天 1) 3.总天数%7得出从星期几开始 注:计 ...
- js验证护照号码是否合规
需求:最近要做实名验证的功能,但是验证我们要验证严谨一点,参考了网上关于验证护照号码的代码,总结一下. 代码: //验证护照号码 function checkPassport(code){ var t ...
- jQuery ajax async
jQuery 同步调用: jQuery.ajax({ type:'POST', async: false, url:'qcTask/add', contentType:'application/jso ...
- C# 连接Oracle,进行查询,插入操作
注:OracleConnection和OracleCommand已被标注为[弃用的],可以使用System.Data.OleDb.OleDbConnection代替OracleCOnnection,使 ...
- web.coofig 配置跨域问题
<customHeaders> <add name="/> <add name="Access-Control-Allow-Origin" ...
- C#导入Excel|读取Excel方法
OleDbConnection读取 /// <summary> /// 返回Excel数据源 /// </summary> /// < ...
- Windbg 脚本命令简介 一
Windbg 脚本命令简介 一 Windbg command r: registers的简写,可以显示或修改寄存器的值.浮点寄存器的值.定义别名变量. 可以显示当前线程下的寄存器值. The r c ...
- VirtualBox使用Centos7与主机共享文件夹
最近使用VitrtualBox安装Centos7学习,liunx脚本和一些命令,经过一些研究完成了虚拟机与 主机共享文件夹,虚拟机链接外部网络,主机与虚拟机互相通信.在其中遇到一些我解决的技术问题记录 ...
- Discuz x3 UCenter实现同步登陆原理
1.Discuz x3 的登录页面URL是:/member.php?mod=logging&action=login 2.这个登录页面,登录提交的地址是: <form method=&q ...