ORACLE单机环境,实现开机自动启动数据库
来源:互联网 发布:淘宝网售后服务内容 编辑:程序博客网 时间:2024/06/09 22:53
Windows环境和Unix环境都能够实现数据库的自动启动
Windows环境下:
实验方法相对简单,通过修改注册表或用oradim命令来实现:
oradim -edit <SID> -startmode [auto|manual] -shutmode [nomal|immediate|abort]
Unix环境下:
通过数据库自带的dbstart命令来实验.
命令: dbstart + {ORACLE_HOME的全路径}
原理:
1. 操作系统启动过程中,读取/etc/oratab文件,判断是否有哪些数据库是需要自动启动的(N代表不自动启动,Y代表自动启动)
ora10g:/u01/app/oracle/product/10.2.0:Y <<<<<<<<<自动启动
catdb:/u01/app/oracle/product/10.2.0:N <<<<<<<<<不自动启动
2. 调用dbstart命令启动监听器和数据库
查看脚本全路径为$ORACLE_HOME/bin/dbstart,会注意到:
监听器的启动受环境变量ORACLE_HOME_LISTNER影响
以LINUX环境操作过程为例:
1. 如下编辑/etc/oratab文件
<p><span style="font-size:14px;">[oracle@ora10g bdump]$ cat /etc/oratab # This file is used by ORACLE utilities. It is created by root.sh# and updated by the Database Configuration Assistant when creating# a database.</span></p><p><span style="font-size:14px;"># 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 filed 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.##ora10g:/u01/app/oracle/product/10.2.0:Y <<<<<<<<<<<<<<<<<<<<catdb:/u01/app/oracle/product/10.2.0:N</span></p>
注: 数据库实例为ora10g,它的安装目录位置/u01/app/oracle/product/10.2.0,开户自动启动
2. 添加dbstart命令至rc.local.如下:
<span style="font-size:14px;">[oracle@ora10g bdump]$ cat /etc/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/localsu - oracle -c "dbstart /u01/app/oracle/product/10.2.0" <<<<<<<<<<<<<<<<<<<<<全路径根据你的实际情况来定</span>
至此,自动启动的环境准备完成了.可以通过dbstart +{数据库安装目录全路径}来做测试或重启验证了...
----------------------------------------
道行尚浅,欢迎拍砖.
转载请注明出处.
- ORACLE单机环境,实现开机自动启动数据库
- AIX上Oracle 单机DB的开机自动启动
- AIX上Oracle 单机DB的开机自动启动
- linux开机自动启动ORACLE数据库
- 开机自动启动oracle数据库脚本
- 实现开机自动启动oracle以及监听器
- oracle 开机自动启动
- oracle 开机自动启动
- linux下开机自动开启单机oracle
- 28.4.2 开机自动启动Oracle数据库服务
- 在linux系统下,Oracle数据库开机后自动启动
- Solaris上Oracle 9i数据库开机自动启动方法
- Solaris上Oracle 10g数据库开机自动启动
- linux设置oracle数据库和监听开机自动启动
- oracle开机自动启动设置
- linux 开机自动启动 oracle
- 5.开机自动启动Oracle
- Oracle 开机自动启动设置
- nostra13---Universal Image Loader(Powerful and flexible library for loading, caching and displaying)
- 在Visual Studio中连接到Azure
- Java程序员常用工具类库 - 目录
- 有没有什么自然科学理论瞬间击中你以至于改变了你的价值观?
- UVALIVE 5000 Underwater Snipers(二分+贪心)
- ORACLE单机环境,实现开机自动启动数据库
- Linux 上线程开发 API 的概要介绍
- Android中Acition和Category常量表
- Android网络连接类型
- OpenGL ES之GLSurfaceView学习一:介绍
- 对curl的封装
- Intel IPP 之图像处理
- 生成器模式(Build)
- zf2+mysql Statement could not be executed (HY000 - 1030 - Got error 28 from storage engine)