ORACLE 11g RAC日常執行中一些基本啟停等命令總結
RAC日常執行中一些基本啟停命令總結
設定cluster不隨著作業系統自動啟動
[root@rac01 u01]# crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
設定cluster隨著作業系統自動啟動,預設是啟動的
[root@rac01 u01]# crsctl enable crs
CRS-4622: Oracle High Availability Services autostart is enabled.
啟動cluster,兩個節點分別執行
[root@rac01 u01]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[root@rac02 u01]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
檢視cluster資源狀態,在兩個節點都可以檢視。
[root@rac01 u01]# crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
OFFLINE OFFLINE rac01
OFFLINE OFFLINE rac02
ora.LISTENER.lsnr
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.OCR.dg
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.asm
ONLINE ONLINE rac01 Started
ONLINE ONLINE rac02 Started
ora.eons
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.gsd
OFFLINE OFFLINE rac01
OFFLINE OFFLINE rac02
ora.net1.network
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.ons
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.registry.acfs
ONLINE ONLINE rac01
ONLINE ONLINE rac02
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac01
ora.oc4j
1 ONLINE ONLINE rac01
ora.rac01.vip
1 ONLINE ONLINE rac01
ora.rac02.vip
1 ONLINE ONLINE rac02
ora.sap.db
1 OFFLINE OFFLINE
2 OFFLINE OFFLINE
ora.scan1.vip
1 ONLINE ONLINE rac01
啟動資料庫例項,資料庫例項名字為sap,在一個例項上執行即可
[root@rac01 u01]# srvctl start database -d sap
檢視cluster資源狀態ora.sap.db狀態為open
[root@rac01 u01]# crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.LISTENER.lsnr
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.OCR.dg
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.asm
ONLINE ONLINE rac01 Started
ONLINE ONLINE rac02 Started
ora.eons
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.gsd
OFFLINE OFFLINE rac01
OFFLINE OFFLINE rac02
ora.net1.network
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.ons
ONLINE ONLINE rac01
ONLINE ONLINE rac02
ora.registry.acfs
ONLINE ONLINE rac01
ONLINE ONLINE rac02
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac01
ora.oc4j
1 ONLINE ONLINE rac01
ora.rac01.vip
1 ONLINE ONLINE rac01
ora.rac02.vip
1 ONLINE ONLINE rac02
ora.sap.db
1 ONLINE ONLINE rac01 Open
2 ONLINE ONLINE rac02 Open
ora.scan1.vip
1 ONLINE ONLINE rac01
檢視資料庫例項狀態
[root@rac02 u01]# srvctl status database -d sap
Instance sap1 is running on node rac01
Instance sap2 is running on node rac02
檢視nodeapps資源狀態
[root@rac01 rac01]# srvctl status nodeapps
VIP rac01-vip is enabled
VIP rac01-vip is running on node: rac01
VIP rac02-vip is enabled
VIP rac02-vip is running on node: rac02
Network is enabled
Network is running on node: rac01
Network is running on node: rac02
GSD is disabled
GSD is not running on node: rac01
GSD is not running on node: rac02
ONS is enabled
ONS daemon is running on node: rac01
ONS daemon is running on node: rac02
eONS is enabled
eONS daemon is running on node: rac01
eONS daemon is running on node: rac02
檢視listener狀態
[root@rac01 rac01]# srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac01,rac02
檢視ASM狀態
[root@rac01 rac01]# srvctl status asm
ASM is running on rac01,rac02
檢視scan狀態
[root@rac01 rac01]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac01
檢視ASM diskgroup狀態
[root@rac01 rac01]# srvctl status diskgroup
PRKO-2082 : Missing mandatory option -g
[root@rac01 rac01]# srvctl status diskgroup -g data
Disk Group data is running on rac01,rac02
停掉rac一個節點,例如停掉rac02
1、先停掉資料庫例項,使用以下命令
[root@rac01 rac01]# srvctl stop instance -d sap -n rac02 -o immediate
也可以使用以下命令,
[root@rac01 rac01]# srvctl stop instance -d sap -i sap2 -o immediate
檢視voting disk
[root@rac01 rac01]# crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE aeeaa395bb2b4fe0bff37dd0eaafe2c1 (/dev/disk/by-id/scsi-14f504e46494c4552667a507877412d6d616f452d63583051-part1) [OCR]
Located 1 voting disk(s).
檢視OCR
[root@rac01 rac01]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2700
Available space (kbytes) : 259420
ID : 1248966756
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31444259/viewspace-2151513/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g RAC 監聽日常管理Oracle
- Oracle:Redhat 7 + Oracle RAC 11g 安裝 bug 總結OracleRedhat
- oracle基本命令總結Oracle
- Oracle 11g RAC之HAIP相關問題總結OracleAI
- 日常工作最常用的一些DOS命令總結
- ORACLE 12C RAC資料庫的啟停Oracle資料庫
- oracle中執行os命令(轉)Oracle
- Oracle 11g RAC Silent Install For NFSOracleNFS
- rac叢集日常維護命令
- Oracle11g RAC啟動關閉情況大概總結Oracle
- Oracle 11g RAC手動新增serviceOracle
- Oracle 11G RAC叢集安裝(3)——安裝OracleOracle
- [20210804]oracle rac執行命令crs_stat -t -v緩慢的分析.txtOracle
- Oracle 11g RAC重新新增節點Oracle
- Tuning CPU 100% in Oracle 11g rac-20220215Oracle
- Oracle RAC日常運維-ASM磁碟擴容Oracle運維ASM
- Oracle RAC日常運維-DATA磁碟組故障Oracle運維
- Oracle RAC重新執行root.sh指令碼Oracle指令碼
- Oracle 11g RAC SCAN ip的原理及配置Oracle
- Oracle 11g RAC到單例項OGG同步Oracle單例
- oracle 11g rac配置em dbconsole ORA-12514Oracle
- Oracle RAC自啟動Oracle
- Golang 啟停管理及後臺執行Golang
- Oracle 11gR2 RAC 叢集服務啟動與關閉總結Oracle
- oracle 11g 常用命令Oracle
- 通過ORACLE VM virtualbox環境安裝oracle 11G RAC(ASM)OracleASM
- Oracle 11g RAC自動打GI PSU補丁Oracle
- Oracle 11G RAC叢集安裝(2)——安裝gridOracle
- oracle 11g RAC 安裝前準備指令碼Oracle指令碼
- oracle 11G RAC的建立(VM虛擬環境)Oracle
- 關於Oracle 11G RAC雙節點之間存在防火牆導致只能一個節點執行Oracle防火牆
- CSS日常總結CSS
- Oracle RAC日常運維-NetworkManager導致叢集故障Oracle運維
- [20191113]一行命令瞭解rac執行狀態.txt
- iOS RAC總結iOS
- IO流中「執行緒」模型總結執行緒模型
- Oracle RAC啟動失敗-軟連結惹的禍Oracle
- Oracle 11g 測試停庫對job的影響Oracle