linux下Oracle数据库实例开机自启动设置
linux下数据库实例开机自启动设置
1、改动/oratab
[root@org54 ~]# vi/etc/oratab --把N改为Y,例如以下提示
# This file is used by ORACLEutilities. It is created by root.sh
# and updated by the Database ConfigurationAssistant when creating
# a database.
# A colon, ':', is used as the fieldterminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', arecomments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are thesystem identifier and home
# directory of the databaserespectively. The third filed indicates
# to the dbstart utility that the databaseshould , "Y", or should not,
# "N", be brought up at systemboot time.
#
# Multiple entries with the same$ORACLE_SID are not allowed.
#
#
#game:/u01/app/oracle/product/10.2.0/db_1:N --dbca创建库时注冊的默认信息
--格式:$ORACLE_SID:$ORACLE_HOME:<N|Y>
--<N|Y>选项代表开机是否自启动
game:/u01/app/oracle/product/10.2.0/db_1:Y
~
~
~
~
2、编辑/dbstart
[oracle@org54 bin]$ cd$ORACLE_HOME/bin
[oracle@org54 bin]$ ls-ll |grep dbstart
-rwxr-xr-x 1 oracle oinstall 10415 Jan 1 2000 dbstart
[oracle@org54 bin]$ vidbstart
--dbstart为开机自启动脚本,让系统开机就去运行dbstart脚本文件,它会去读oratab文件。读到Y就会把相应的实例开机自启动
--调整或确认监听路径。如ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle或ORACLE_HOME_LISTNER=$ORACLE_HOME依据设置的监听调整路径
3、编辑/rc.local
[root@org54 ~]# vi/etc/rc.d/rc.local --加入例如以下两行信息,启动实例、启动监听
#!/bin/sh
#
# This script will be executed *after* allthe other init scripts.
# You can put your own initialization stuffin here if you don't
# want to do the full Sys V style initstuff.
touch /var/lock/subsys/local
modprobe hangcheck-timer hangcheck_tick=30hangcheck_margin=180
su - oracle -c"/u01/app/oracle/product/10.2.0/db_1/bin/dbstart"
su - oracle -c"/u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start"
--命令中-c代表运行脚本。脚本dbstart中指定启动的实例,脚本lsnrctl中启动配置的监听
4、重新启动验证
# reboot
[oracle@org54 ~]$ sqlplus'/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Productionon Fri Jul 4 10:40:57 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise EditionRelease 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Miningoptions
SQL> selectstatus,instance_name from v$instance;
STATUS INSTANCE_NAME
------------ ----------------
OPEN game
小结:
linux下设置实例自启动有关脚本:
oratab:实例是否自启动的注冊信息
dbstart:开机启动脚本文件会读取oratab信息
rc.local:开机后马上要做的文件
***********************************************声明************************************************
原创作品,出自 “深蓝的blog” 博客,欢迎转载。转载时请务必注明出处(http://blog.csdn.net/huangyanlong)。
表述有错误之处,请您留言,不胜感激。
*****************************************************************************************************
linux下Oracle数据库实例开机自启动设置的更多相关文章
- CentOS Linux 新建oracle数据库实例并连接
CentOS Linux 新建oracle数据库实例 安装好oracle之后,首先想到的那就是自己建一个库来看看效果喽. 创建的过程如下文章所说,http://blog.chinaunix.net/u ...
- linux下oracle数据库字符集修改
linux下oracle数据库字符集修改 0.RHEL6.7.oracle11gr2 1.登录oracle.在安装oracle的用户下进入数据库. $ sqlplus / as sysdba 2.查询 ...
- Linux下的应用程序开机自启动
Linux下的应用程序开机自启动,目前我知道的有2种: 1.将启动语句写到/etc/rc.local 2.在init.d放置启动脚本 第一种,很简单,直接写进去就行,比如说: /db/mongodb/ ...
- linux下oracle数据库的启动
linux下oracle数据库的启动 一.切换oracle用户 命令:su - oracle 二.运行sqlplus命令,进入sqlplus环境 命令:sqlplus /nolog (nolog参数表 ...
- Linux下Oracle数据库的安装
记录详细过程以备使用 一.准备安装 为了确保Oracle数据库11g能够成功安装,您需要做好准备工作,例如检查网络配置.更改Linux内核参数.创建用户Oracle.创建安装目录.设置用户Oracle ...
- 配置Oracle数据库的开机自启动
每当数据库服务器重启后,都要重新启动数据库的监听和实例,特别是在服务器断电重启.例行维护性的场景下.能否像Windows服务器一样,让实例和监听随着服务的启动而启动呢?答案当然是肯定的,我们可以利用O ...
- Linux下oracle数据库启动和关闭操作
第一步:登陆 root登陆之后切换到oracle用户上,输入 su oracle 第二步:连接 在oracle用户下,输入 sqlplus /nolog 第三步:使用管理员权限 输入 connect ...
- [工作相关] GS产品使用LInux下Oracle数据库以及ASM存储时的数据文件路径写法.
1. 自从公司的GS5版本就已经支持Linux下的oracle数据库通过安装工具自动安装注册了, 只不过路径需要使用linux的命名规则, 如图: /home/oracle/ 注意 最后是有一个 斜线 ...
- Linux下添加自定义脚本到开机自启动,标准rpm,举例:设置Apache自启动
写一个脚本,名字为:autostart.sh,放在/etc/init.d/目录下,赋予权限chmod +x /etc/init.d/autostart.sh 代码如下 #!/bin/sh #chkco ...
随机推荐
- 对oracle实例的内存(SGA和PGA)进行调整,优化数据库性
一.名词解释 (1)SGA:SystemGlobal Area是OracleInstance的基本组成部分,在实例启动时分配;系统全局域SGA主要由三部分构成:共享池.数据缓冲区.日志缓冲区. (2) ...
- [转载]Delphi事件的广播
https://blog.csdn.net/dropme/article/details/975736 明天就是五一节了,辛苦了好几个月,借此机会应该尽情放松一番.可是想到Blog好久没有写文章,似乎 ...
- TensorFlow------读取CSV文件实例
TensorFlow之读取CSV文件实例: import tensorflow as tf import os def csvread(filelist): ''' 读取CSV文件 :param fi ...
- 关于判断语句中如:while not xx: 或者:if not xx: 的含义及用法解析
关于判断语句中如:while not xx: 或者:if not xx: 的含义及用法解析 name='' while not name: name=raw_input(u'请输入姓名:') prin ...
- 登录Tomcat控制台
在http://localhost:8080界面中,右上角有三个按纽对应着三个控制台:Server Status控制台,Manager App控制台和Host Manager控制台.Server St ...
- 能显示git分支的终端提示配置
之前都是跟随潮流,安装zsh然后oh-my-zsh,选一个看起来顺眼的主题,一通瞎配置,很酷炫. 可是即使只有一个git插件,oh-my-zsh每次启动的时候都很慢,起码有好几秒,而且有时候zsh还会 ...
- 几个免费的DNS地址
百度CDN 180.76.76.76 114.114.114.114 阿里CDN 223.5.5.5 223.6.6.6 googleCDN 8.8.8.8 国内外DNSserver地址列表 http ...
- Maven+TestNG+ReportNG/Allure接口自动化测试框架初探(上)
转载:http://www.51testing.com/html/58/n-3721258.html 由于一直忙于功能和性能测试,接口自动化测试框架改造的工作被耽搁了好久.近期闲暇一些,可以来做点有意 ...
- EXCEL在使用中,jar导入问题
报错:The type org.apache.poi.ss.usermodel.Workbook cannot be resolved. It is indirectly referenced fro ...
- 算法笔记_100:蓝桥杯练习 算法提高 三个整数的排序(Java)
目录 1 问题描述 2 解决方案 1 问题描述 问题描述 输入三个数,比较其大小,并从大到小输出. 输入格式 一行三个整数. 输出格式 一行三个整数,从大到小排序. 样例输入 33 88 77 样 ...