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::

#

# 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:

--选项代表开机是否自启动

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数据库实例开机启动不了,linux下Oracle数据库实例开机自启动设置相关推荐

  1. 在linux操作系统中启动oracle数据库程序,Linux系统下Oracle数据库的安装和启动关闭操作教程...

    这篇文章主要介绍了Linux系统下Oracle数据库的安装和启动关闭操作教程,并针对在sqlplus下所需执行的命令进行讲解,需要的朋友可以参考下 1.准备: df -H 查看空间剩余   一般准备最 ...

  2. DM数据库安装及启动教程(Linux超详细版)

    DM数据库安装及启动教程(Linux超详细版) 一.部署前准备工作 1.新建 dmdba 用户 2.修改文件打开最大数 3.挂载镜像文件 4.新建安装目录 二.DM8Linux的安装部署 1.命令行安 ...

  3. linux oracle 用户创建,LINUX下Oracle数据库用户创建方法详解

    本文实例分析了LINUX下Oracle数据库用户创建方法.分享给大家供大家参考,具体如下: 1)登录linux,以oracle用户登录(如果是root用户登录的,登录后用 su - oracle命令切 ...

  4. windows下oracle数据库自动备份脚本

    1.根据日期自动生成 Oracle 备份文件 @echo off echo 正在备份Oracle数据库,请稍等...... exp userid='用户名/密码@SID' file=D:\bak\re ...

  5. Linux服务器下oracle数据库启动服务操作步骤

    一.在Linux下启动Oracle 1.登录到Linux服务器,切换到oracle用户权限(命令是:# su - oracle) 2.进入sqlplus界面(命令是:$ sqlplus /nolog ...

  6. linux mysql多实例启动不了_linux下mysql多实例安装(转)

    转自:http://www.cnblogs.com/xuchenliang/p/6843990.html 1.MySQL多实例介绍 1.1.什么是MySQL多实例 MySQL多实例就是在一台机器上开启 ...

  7. linux init.d添加启动脚本 ln,linux编写可运行的shell脚本并在其他目录创建ln连接与设置开机启动...

    ln :创建连接文件 - 默认创建的是硬连接,好比复制 ,但是两个文件会同步 命令:ln ./java/android/aa.txt  aaa - s :创建的是软连接变为指向(类似于windows的 ...

  8. linux 开机启动文件夹,Linux开机启动流程

    linux开机启动详细流程图: 一.BIOS 加电自检 当你按电源开关开机时,电脑会首先去启动BIOS(基本输入输出系统),BIOS一般是集成在主板上的. BIOS 的工作 1.检测连接硬件,比如显卡 ...

  9. manjaro 开机启动项_Manjaro Linux优化设置分享

    在安装完桌面版Linux后,由于个人"强迫症"多多少少要对Linux进行一番设置和优化.本文给大家分享Manjaro Deepin下我应用的一些设置,希望能为大家提供问题解决或优化 ...

最新文章

  1. 打造微量元素产业-丰收节交易会·李喜贵:签约南国健康产业
  2. 海尔5D净水洗热水器引领中国制造未来
  3. java stringbuffer原理_深入理解Java:String
  4. 9203 演练 jsp实现增删改查
  5. django模板变量的使用详解 200309
  6. python图像分类代码_Kaggle—So Easy!百行代码实现排名Top 5%的图像分类比赛
  7. jmeter之JDBC类组件
  8. 【转】LoadRunner使用Libmemcached与Memcached通讯
  9. 3行代码,Python实现excel转换成任意格式的word文档
  10. FudanNLP学习实例——中文分词部分
  11. SpringUtil 工具类
  12. 论文降重的方法是什么?
  13. 闭式系统蒸汽管径推荐速度_蒸汽管道的设计选型
  14. total commander 自定义快捷键
  15. scandisk.exe 流氓软件的删除
  16. 把成都市所有图书馆标记在地图上需要几步?超简单
  17. Unity VideoPlayer播放切换视频卡上一帧问题
  18. CEC-I 中华学习机使用说明与问答
  19. 如何实现GridView分页功能?
  20. 2019最新妙味课堂jquery源码分析 jquery源码逐行分析全套

热门文章

  1. Cloud for Customer UI designer自动生成的一些模型
  2. 如何查找UI5应用对应在ABAP Netweaver服务器上的BSP应用名称
  3. How product extension field is involved in search scenario
  4. S/4HANA Adapt UI按钮的实现逻辑
  5. Detail when click Custom fields tile in s4
  6. 创建简单的xslt transformation
  7. How to debug Material delta download
  8. 递归调用cl_crm_oi_docx_transform_rt=process_node_cc
  9. No Authorization to generate extension field
  10. 关于如何根据UI的版本把Tab切换成新的Notes UI Component