日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux数据库实例开机启动,linux下数据库实例开机自启动设置

發(fā)布時間:2025/3/8 linux 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux数据库实例开机启动,linux下数据库实例开机自启动设置 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

linux下數(shù)據(jù)庫實例開機自啟動設置 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 datab

linux下數(shù)據(jù)庫實例開機自啟動設置

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創(chuàng)建庫時注冊的默認信息

--格式:$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為開機自啟動腳本,讓系統(tǒng)開機就去執(zhí)行dbstart腳本文件,它會去讀oratab文件,讀到Y就會把對應的實例開機自啟動

--調(diào)整或確認監(jiān)聽路徑,如ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle或ORACLE_HOME_LISTNER=$ORACLE_HOME根據(jù)設置的監(jiān)聽調(diào)整路徑

3、編輯/rc.local

[root@org54 ~]# vi/etc/rc.d/rc.local --添加如下兩行信息,啟動實例、啟動監(jiān)聽

#!/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代表執(zhí)行腳本,腳本dbstart中指定啟動的實例,腳本lsnrctl中啟動配置的監(jiān)聽

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:開機后立即要做的文件

本條技術文章來源于互聯(lián)網(wǎng),如果無意侵犯您的權益請點擊此處反饋版權投訴

本文系統(tǒng)來源:php中文網(wǎng)

總結

以上是生活随笔為你收集整理的linux数据库实例开机启动,linux下数据库实例开机自启动设置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。