1. 程式人生 > >ORACLE11G RAC啟動關閉步驟

ORACLE11G RAC啟動關閉步驟

1、(ORACLE)檢視叢集中的資料庫執行狀態,最後接著是RAC名,不是例項的名稱。

srvctlstatus database -d tax

Oracle@svrtrpc001:~>srvctl status database -d tax

Instancetax1 is running on node svrtrpc001

Instancetax2 is running on node svrtrpc002

Instancetax3 is running on node svrtrpc003

-----------------------------------------------------

(oracle)檢視資料庫的執行狀態,最後接著是RAC名,不是例項的名稱。

srvctlstatus database -d tax -v

[email protected]:~>srvctl status database -d tax -v

Instancetax1 is running on node svrtrpc001. Instance status: Open.

Instance tax2is running on node svrtrpc002. Instance status: Open.

Instancetax3 is running on node svrtrpc003. Instance status: Open.

-----------------------------------------

(ORACLE)檢視例項執行狀態,最後接著節點名

srvctlstatus instance -d tax -i tax1

[email protected]:~>srvctl status instance -d tax -i tax1

Instancetax1 is running on node svrtrpc001

---------------------------------------------------

(ORACLE)檢視叢集的配置情況

srvctlconfig -p tax -n tax

[email protected]:~>srvctl config -p tax -n tax

Databaseunique name: tax

Databasename: tax

Oraclehome: /u01/app/oracle/product/11.2.0

Oracleuser: oracle

Spfile:+DATADG/tax/spfiletax.ora

Domain:

Startoptions: open

Stopoptions: immediate

Databaserole: PRIMARY

Managementpolicy: AUTOMATIC

Serverpools: tax

Database instances:tax1,tax2,tax3

DiskGroups: DATADG

Mountpoint paths:

Services:

Type: RAC

Databaseis administrator managed

-----------------------------------------------

2、啟動:srvctl start

I thinkmaybe it's one of the most frequently used commands as well as 'srvctl stop'.

Availableoptions: database|instance|service|nodeapps|asm

# Startdatabase

srvctlstart database -d orcl -o nomount

srvctlstart database -d orcl -o mount

srvctlstart database -d orcl -o open

# Grammarfor start instance

srvctl start instance -d [db_name] -i [instance_name]

-o[start_option] -c [connect_str] -q

# Startall instances on the all nodes

srvctlstart instance -d orcl -i orcl1,orcl2,...

# StartASM instance

srvctlstart ASM -n [node_name] -i asm1 -o open

# Startall apps in one node

srvctlstart nodeapps -n [node_name]

# New:srvctl can manage listener's startup in DB 10.2

srvctlstart listener -n <node_name>

-------------------------------------------------

3、關閉:srvctl stop

I thinkmaybe it's also one of the most frequently used

commandsas well as 'srvctl start'.

Availableoptions: database|instance|service|nodeapps|asm

# Stopdatabase

srvctlstop database -d orcl -o normal

srvctlstop database -d orcl -o immediate

srvctlstop database -d orcl -o abort

# Grammarfor start instance

srvctlstop instance -d [db_name] -i [instance_name]

-o[start_option] -c

--------------------------

4、檢查叢集狀態:

[[email protected]~]$ crsctl check cluster

CRS-4537:Cluster Ready Services is online

CRS-4529:Cluster Synchronization Services is online

CRS-4533:Event Manager is online

4.1、所有 Oracle 例項 —(資料庫狀態):

[[email protected]~]$ srvctl status database -d racdb

Instanceracdb1 is running on node rac01

Instanceracdb2 is running on node rac02

4.2、檢查單個例項狀態:

[[email protected]~]$ srvctl status instance -d racdb -i racdb1

Instanceracdb1 is running on node rac01

4.3、節點應用程式狀態:

[[email protected]~]$  srvctl status nodeapps

VIPrac01-vip is enabled

VIPrac01-vip is running on node: rac01

VIPrac02-vip is enabled

VIPrac02-vip is running on node: rac02

Network isenabled

Networkis running on node: rac01

Networkis running on node: rac02

GSD isdisabled

GSD isnot running on node: rac01

GSD isnot running on node: rac02

ONS isenabled

ONSdaemon is running on node: rac01

ONSdaemon is running on node: rac02

eONS isenabled

eONSdaemon is running on node: rac01

eONSdaemon is running on node: rac02

4.4、列出所有的配置資料庫:

[[email protected]~]$ srvctl config database

racdb

4.5、資料庫配置:

[[email protected]~]$ srvctl config database -d racdb -a

Databaseunique name: racdb

Databasename: racdb

Oraclehome: /u01/app/oracle/product/11.2.0/dbhome_1

Oracleuser: oracle

Spfile:+RACDB_DATA/racdb/spfileracdb.ora

Domain:xzxj.edu.cn

Startoptions: open

Stopoptions: immediate

Databaserole: PRIMARY

Managementpolicy: AUTOMATIC

Serverpools: racdb

Databaseinstances: racdb1,racdb2

DiskGroups: RACDB_DATA,FRA

Services:

Databaseis enabled

Databaseis administrator managed

4.6、ASM狀態以及ASM配置:

[[email protected]~]$ srvctl status asm

ASM isrunning on rac01,rac02

[[email protected]~]$ srvctl config asm -a

ASM home:/u01/app/11.2.0/grid

ASMlistener: LISTENER

ASM isenabled.

8、TNS監聽器狀態以及配置:

[[email protected]~]$ srvctl status listener

ListenerLISTENER is enabled

ListenerLISTENER is running on node(s): rac01,rac02

[[email protected]~]$ srvctl config listener -a

Name:LISTENER

Network:1, Owner: grid

Home:<CRS home>

  /u01/app/11.2.0/grid on node(s) rac02,rac01

Endpoints: TCP:1521

4.7、SCAN狀態以及配置:

[[email protected]~]$ srvctl status scan

SCAN VIPscan1 is enabled

SCAN VIPscan1 is running on node rac02

[[email protected]~]$ srvctl config scan

SCANname: rac-scan.xzxj.edu.cn, Network: 1/192.168.1.0/255.255.255.0/eth0

SCAN VIPname: scan1, IP: /rac-scan.xzxj.edu.cn/192.168.1.55

4.8、VIP各個節點的狀態以及配置:

[[email protected]~]$ srvctl status vip -n rac01

VIPrac01-vip is enabled

VIPrac01-vip is running on node: rac01

[[email protected]~]$ srvctl status vip -n rac02

VIPrac02-vip is enabled

VIPrac02-vip is running on node: rac02

[[email protected]~]$  srvctl config vip -n rac01

VIPexists.:rac01

VIPexists.: /rac01-vip/192.168.1.53/255.255.255.0/eth0

[[email protected]~]$  srvctl config vip -n rac02

VIPexists.:rac02

VIPexists.: /rac02-vip/192.168.1.54/255.255.255.0/eth0

4.9、節點應用程式配置 —(VIP、GSD、ONS、監聽器)

[[email protected]~]$ srvctl config nodeapps -a -g -s -l

-l optionhas been deprecated and will be ignored.

VIPexists.:rac01

VIPexists.: /rac01-vip/192.168.1.53/255.255.255.0/eth0

VIPexists.:rac02

VIPexists.: /rac02-vip/192.168.1.54/255.255.255.0/eth0

GSDexists.

ONSdaemon exists. Local port 6100, remote port 6200

Name:LISTENER

Network:1, Owner: grid

Home:<CRS home>

  /u01/app/11.2.0/grid on node(s) rac02,rac01

Endpoints: TCP:1521

4.10、驗證所有叢集節點間的時鐘同步:

[[email protected]~]$ cluvfy comp clocksync -verbose

VerifyingClock Synchronization across the cluster nodes

Checkingif Clusterware is installed on all nodes...

Check ofClusterware install passed

Checkingif CTSS Resource is running on all nodes...

Check:CTSS Resource running on all nodes

  Node Name                             Status                 

  ------------------------------------  ------------------------

  rac02                                 passed                 

Result:CTSS resource check passed

QueryingCTSS for time offset on all nodes...

Result:Query of CTSS for time offset passed

CheckCTSS state started...

Check:CTSS state

  Node Name                             State                  

  ------------------------------------  ------------------------

  rac02                                 Active                 

CTSS isin Active state. Proceeding with check of clock time offsets on all nodes...

ReferenceTime Offset Limit: 1000.0 msecs

Check:Reference Time Offset

  Node Name    Time Offset              Status                 

  ------------ ------------------------ ------------------------

  rac02        0.0                      passed                  

Timeoffset is within the specified limits on the following set of nodes:

"[rac02]"

Result:Check of clock time offsets passed

OracleCluster Time Synchronization Services check passed

Verificationof Clock Synchronization across the cluster nodes was successful.

4.11、叢集中所有正在執行的例項 — (SQL):

SELECTinst_id , instance_number inst_no , instance_name inst_name , parallel , status, database_status db_status , active_state state , host_name host FROMgv$instance ORDER BY inst_id;

4.12、所有資料庫檔案及它們所在的 ASM 磁碟組— (SQL):

16、啟動和停止叢集:

以下操作需用root使用者執行。

(1)、在本地伺服器上停止OracleClusterware 系統:

[[email protected]~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster

CRS-2673:Attempting to stop 'ora.crsd' on 'rac01'

CRS-2790:Starting shutdown of Cluster Ready Services-managed resources on 'rac01'

CRS-2673:Attempting to stop 'ora.LISTENER.lsnr' on 'rac01'

CRS-2673:Attempting to stop 'ora.CRS.dg' on 'rac01'

CRS-2673:Attempting to stop 'ora.racdb.db' on 'rac01'

CRS-2673:Attempting to stop 'ora.registry.acfs' on 'rac01'

CRS-2677:Stop of 'ora.LISTENER.lsnr' on 'rac01' succeeded

CRS-2673:Attempting to stop 'ora.rac01.vip' on 'rac01'

CRS-2677:Stop of 'ora.rac01.vip' on 'rac01' succeeded

CRS-2672:Attempting to start 'ora.rac01.vip' on 'rac02'

CRS-2677:Stop of 'ora.registry.acfs' on 'rac01' succeeded

CRS-2676:Start of 'ora.rac01.vip' on 'rac02' succeeded

CRS-2677:Stop of 'ora.CRS.dg' on 'rac01' succeeded

CRS-2677:Stop of 'ora.racdb.db' on 'rac01' succeeded

CRS-2673:Attempting to stop 'ora.FRA.dg' on 'rac01'

CRS-2673:Attempting to stop 'ora.RACDB_DATA.dg' on 'rac01'

CRS-2677:Stop of 'ora.FRA.dg' on 'rac01' succeeded

CRS-2677:Stop of 'ora.RACDB_DATA.dg' on 'rac01' succeeded

CRS-2673:Attempting to stop 'ora.asm' on 'rac01'

CRS-2677:Stop of 'ora.asm' on 'rac01' succeeded

CRS-2673:Attempting to stop 'ora.ons' on 'rac01'

CRS-2673:Attempting to stop 'ora.eons' on 'rac01'

CRS-2677:Stop of 'ora.ons' on 'rac01' succeeded

CRS-2673:Attempting to stop 'ora.net1.network' on 'rac01'

CRS-2677:Stop of 'ora.net1.network' on 'rac01' succeeded

CRS-2677:Stop of 'ora.eons' on 'rac01' succeeded

CRS-2792:Shutdown of Cluster Ready Services-managed resources on 'rac01' has completed

CRS-2677:Stop of 'ora.crsd' on 'rac01' succeeded

CRS-2673:Attempting to stop 'ora.cssdmonitor' on 'rac01'

CRS-2673:Attempting to stop 'ora.ctssd' on 'rac01'

CRS-2673:Attempting to stop 'ora.evmd' on 'rac01'

CRS-2673:Attempting to stop 'ora.asm' on 'rac01'

CRS-2677:Stop of 'ora.cssdmonitor' on 'rac01' succeeded

CRS-2677:Stop of 'ora.evmd' on 'rac01' succeeded

CRS-2677:Stop of 'ora.ctssd' on 'rac01' succeeded

CRS-2677:Stop of 'ora.asm' on 'rac01' succeeded

CRS-2673:Attempting to stop 'ora.cssd' on 'rac01'

CRS-2677:Stop of 'ora.cssd' on 'rac01' succeeded

CRS-2673:Attempting to stop 'ora.diskmon' on 'rac01'

CRS-2677:Stop of 'ora.diskmon' on 'rac01' succeeded

注:在執行“crsctl stopcluster”命令之後,如果 Oracle Clusterware 管理的資源中有任何一個還在執行,則整個命令失敗。使用 -f 選項無條件地停止所有資源並停止 Oracle Clusterware 系統。

另請注意,可通過指定 -all 選項在叢集中所有伺服器上停止 Oracle Clusterware 系統。如下所示,在rac01和rac02上停止oracle clusterware系統:

[[email protected]~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster –all

在本地伺服器上啟動oralceclusterware系統:

[[email protected]~]# /u01/app/11.2.0/grid/bin/crsctl start cluster

注:可通過指定 -all 選項在叢集中所有伺服器上啟動 Oracle Clusterware 系統。

[[email protected]~]# /u01/app/11.2.0/grid/bin/crsctl start cluster –all

還可以通過列出伺服器(各伺服器之間以空格分隔)在叢集中一個或多個指定的伺服器上啟動 Oracle Clusterware 系統:

[[email protected]~]# /u01/app/11.2.0/grid/bin/crsctl start cluster -n rac01 rac02

使用 SRVCTL 啟動/停止所有例項:

[[email protected]~]#srvctl stop database -d racdb

[[email protected]~]#srvctl start database -d racdb

安裝的後置任務:

1.官方建議的兩個安裝後置任務

(1) 備份 root.sh 指令碼

官方建議在完成安裝後要備份root.sh指令碼檔案。如果在OracleHome目錄中又安裝其它的產品,安裝時OUI會升級已存在的root.sh檔案。如果需要root.sh內的原始資訊,就可以在備份中找到。

cd$ORACLE_HOME;cp root.sh root.sh.bak

(2)重新編譯無效物件

執行 utlrp.sql 指令碼立即重新編譯所有無效的PL/SQL 程式包,而不是在首次訪問它們時再重新編譯。這是個可選步驟,但建議您選擇該步驟。

[[email protected]~]$ sqlplus / as sysdba

SQL&gt;@?/rdbms/admin/utlrp.sql2.

在 RAC 環境中啟用存檔日誌

(1)、以 oracle 使用者身份登入到一個節點(即racnode1),通過在當前例項中將 cluster_database 設定為 FALSE 來禁用叢集例項引數:

[[email protected]~]$ sqlplus / as sysdba

SQL&gt;alter system set cluster_database=false scope=spfile sid='racdb1';

Systemaltered.

(2)、以 oracle 使用者身份關閉所有 訪問叢集化資料庫的例項:

[[email protected]~]$ srvctl stop database -d racdb

(3)、使用本地例項,掛載資料庫:

[[email protected]~]$ sqlplus / as sysdba

SQL*Plus:Release 11.2.0.1.0 Production on Sat Nov 21 19:26:47 2009 Copyright (c) 1982,2009, Oracle. All rights reserved. Connected to an idle instance.

SQL&gt;startup mount

ORACLEinstance started.

TotalSystem Global Area 1653518336 bytes

FixedSize 2213896 bytes

VariableSize 1073743864 bytes

DatabaseBuffers 570425344 bytes

RedoBuffers 7135232 bytes

(4)、啟用存檔功能:

SQL&gt;alter database archivelog;

Databasealtered.

(5)、通過在當前例項中將例項引數 cluster_database 修改為 TRUE,重新啟用對叢集的支援:

SQL&gt;alter system set cluster_database=true scope=spfile sid='racdb1';

Systemaltered.

(6)、關閉本地例項:

SQL&gt;shutdown immediate

ORA-01109:database not open

Databasedismounted.

ORACLEinstance shut down.

(7)、以 oracle 帳戶身份使用 srvctl命令重啟所有例項:

[[email protected]~]$ srvctl start database -d racdb

(8)、登入到本地例項,驗證存檔日誌模式已啟用:

[[email protected]~]$ sqlplus / as sysdba

SQL*Plus:Release 11.2.0.1.0 Production on Sat Nov 21 19:33:38 2009 Copyright (c) 1982,2009, Oracle. All rights reserved. Connected to: Oracle Database 11g EnterpriseEdition Release 11.2.0.1.0 - 64bit Production With the Partitioning, RealApplication Clusters, Automatic Storage Management, OLAP, Data Mining and RealApplication Testing options

SQL&gt;archive log list

Databaselog mode Archive Mode

Automaticarchival Enabled

Archivedestination USE_DB_RECOVERY_FILE_DEST

 Oldest online log sequence 69

Next logsequence to archive 70

Currentlog sequence 703

在兩個RAC節點都備份spfile初始化引數檔案:建立一個備份目錄:

[[email protected]~]$ mkdir $ORACLE_HOME/spfile_bak

[[email protected]~]$ sqlplus “/as sysdba”

==============================================

crsctl說明

crsctladd resource

crsctladd type

crsctlcheck css

crsctldelete resource

crsctldelete type

crsctlget hostname

crsctlgetperm resource

crsctl getpermtype

crsctlmodify resource

crsctlmodify type

crsctlsetperm resource

crsctlsetperm type

crsctlstart resource

crsctlstatus resource

crsctlstatus type

crsctlstop resource

叢集啟動和停止

./crsctlstop cluster

./crsctlstart cluster

./crsctl check cr

相關推薦

ORACLE11G RAC啟動關閉步驟

1、(ORACLE)檢視叢集中的資料庫執行狀態,最後接著是RAC名,不是例項的名稱。 srvctlstatus database -d tax Oracle@svrtrpc001:~>srvctl status database -d tax Instanc

Oracle11g RAC 啟動流程梳理(二)OHASD簡析和啟停實驗

簡單說明: 11gRAC啟動分為四個層次,第一個層次是OHASD和子代理程序啟動: init——>init.ohasd——>ohasd——>agent子程序啟動 即: OS啟動——>/etc/rc.d/init.d/init.o

Oracle RAC啟動關閉步驟

Oracle RAC的關閉及啟動,需要嚴格按照步驟來執行,以下就以一套實際的系統為例,來介紹RAC的關閉及啟動過程: 環境說明 主機名 例項名 監聽埠 字符集 db-node1 orcl1

Oracle11g RAC叢集啟動關閉

1.切換到叢集使用者grid [root@rac1 ~]# su - grid11 2.檢視叢集資源狀態(ora.gsd 11G不使用此資源 所以OFFLINE為正常狀態) [[email protected] ~]$ crs_stat -t Name

Oracle 10g RAC啟動關閉步驟

在運維過程中,需要重啟資料庫服務,步驟如下: 1、在終端執行  su - oracle   ,切換至oracle使用者。在終端執行 su 命令 ,切換至root 使用者  ,但此時保留了 oracle 使用者的環境變數,並且得到了root使用者的許可權。 2、在終端執行

11g RAC集群啟動關閉、各種資源檢查、配置信息查看匯總。

11g RAC集群啟動關閉、各種資源檢查簡要:一:集群的啟動與關閉1. rac集群的手動啟動[root@node1 bin]# ./crsctl start cluster -all2. 查看rac集群的狀態[root@node1 bin]# ./crsctl stat res -t3. rac集群的關閉[r

RAC啟動關閉(oracle 11g)

[[email protected] ~]# crsctl stop has CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1' CRS-2673: Attempti

Oracle11g R2 RAC 啟動與停止順序

停止的過程: 停止資料庫例項-> 停止HAS-> 停止CRS, 啟動的過程與之相反 關閉過程(CRS叢集關閉->關閉資料庫) 1.關閉資料庫: 用oracl使用者執行srvctl命令 語法:srvctl stop database -d dbname [

oracle11g rac crs啟動錯誤一例

虛擬機器的測試環境中,開啟後,crs沒有啟動,使用root手工啟動,提示: ./crsctl start crs CLSU-00100: Operating System function: ope

11g RAC叢集啟動關閉、各種資源檢查、配置資訊檢視彙總。

簡要: 一:叢集的啟動與關閉 1. rac叢集的手動啟動 [[email protected] bin]# ./crsctl start cluster -all 2. 檢視rac叢集的狀態 [[email protected] bin]# ./cr

oracle 11g RAC 啟動關閉和一些維護命令

在Oracle 11g環境中,Oracle的關閉和啟動順序如下:關閉順序:    1、關閉資料庫,oracl使用者執行srvctl命令:     [[email protected] ~]$ srvctl stop database -d ORCL ---停止所有

CentOS6.5下redis3.0.7安裝、啟動關閉、配置密碼、開機啟動詳細步驟

安裝環境: CentOS 6.5 Redis 3.0.7 下載安裝: 下載檔案到 /usr/local 目錄下 解壓檔案 tar zxvf redis-3.0.7.tar.gz 切換目錄到 redis-3.0.7 目錄下 cd redis-3

Grid Control的啟動關閉步驟

實際上官方的文件上有詳細的介紹,但是對於Grid Control不太熟悉人來說,不僅文件位置不好找而且總被那些通用$ORACLE_HOME變數所迷惑。還是決定在此做個備忘及分享。一、Stopping Grid Control and All Its Components

oralce11g RAC 啟動後 CRS-0184: Cannot communicate with the CRS daemon.

asm art bili 解決 completed target let 服務器 style 很奇怪的一個問題! ORACLE數據庫服務器,系統啟動之後,查看集群狀態,發現CRS實例不可用,然後網上查找資料; 隔了幾分鐘之後,再次查詢相關集群服務狀態,發現正常了!!!

windows 啟動關閉Oracle監聽和服務

break stat local 程序啟動 tle -- add network 寫入 經常要用數據庫,讓他自己啟動的話,開機太慢,所以用命令啟動方便點。 1.開啟: 在運行中輸入cmd,進入控制臺,lsnrctl start回車,提示啟動監聽成功後

redis 安裝及啟動關閉

containe art size ash bin 一份 四種 color service 1、redis下載   方式1:直接去官網下載     https://redis.io/download   方式2:通過命令下載     wget http://download

c# 啟動關閉sql服務

expr new rst args pan style start 服務啟動 exp static void Main(string[] args) { ServiceController sc = new ServiceCont

VMware相關服務啟動關閉腳本

work stat 虛擬機不能上網 restart borde interface station disabled 16px VMware相關服務 VMware Authonrization Service:用於啟動和訪問虛擬機的授權和身份驗證服務 VMwa

Oracle 12c 學習之啟動關閉CDB&PDB

pro sysdba pdb lob ins connect nec plus start 1、默認登陸到CDB <roidb01:cdb:/home/oracle>$sqlplus / as sysdba SQL*Plus: Release 12.1.0.2

Windows7下設置定時啟動(關閉)虛擬機

9.png msconfig gpo bat vmrun 一個 新建 top conf 曾記否,憶當年,開啟或者關閉虛擬機,度秒如年~ ⒈石頭,剪刀,布,C、D、E盤隨便找一個,然後在裏面找個靜謐的墻角, 新建一個文件:vmstart.bat  添加:"C:\Pro