所有實例和服務的狀態
$ srvctl status database
Instance orcl
Instance orcl
單個實例的狀態
$ srvctl status instance
Instance orcl
在數據庫全局命名服務的狀態
$ srvctl status service
Service orcltest is running on instance(s) orcl
特定節點上節點應用程序的狀態
$ srvctl status nodeapps
VIP is running on node: linux
GSD is running on node: linux
Listener is running on node: linux
ONS daemon is running on node: linux
ASM 實例的狀態
$ srvctl status asm
ASM instance +ASM
列出配置的所有數據庫
$ srvctl config database
orcl
顯示 RAC 數據庫的配置
$ srvctl config database
linux
linux
顯示指定集群數據庫的所有服務
$ srvctl config service
orcltest PREF: orcl
顯示節點應用程序的配置 —(VIP
$ srvctl config nodeapps
VIP exists
GSD exists
ONS daemon exists
Listener exists
顯示 ASM 實例的配置
$ srvctl config asm
+ASM
集群中所有正在運行的實例
SELECT
inst_id
FROM gv$instance
ORDER BY inst_id;
INST_ID INST_NO INST_NAME PAR STATUS DB_STATUS STATE HOST
位於磁盤組中的所有數據文件
select name from v$datafile
union
select member from v$logfile
union
select name from v$controlfile
union
select name from v$tempfile;
NAME
+FLASH_RECOVERY_AREA/orcl/controlfile/current
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_
+FLASH_RECOVERY_AREA/orcl/onlinelog/group_
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
+ORCL_DATA
屬於
SELECT path
FROM v$asm_disk
WHERE group_number IN (select group_number
from v$asm_diskgroup
where name =
PATH
ORCL:VOL
ORCL:VOL
啟動/停止RAC集群
確保是以 oracle UNIX 用戶登錄的
# su – oracle
$ hostname
Rac
停止 Oracle RAC
第一步是停止 Oracle 實例
$ export ORACLE_SID=orcl
$ emctl stop dbconsole
$ srvctl stop instance
$ srvctl stop asm
$ srvctl stop nodeapps –n rac
啟動 Oracle RAC
第一步是啟動節點應用程序(虛擬 IP
$ export ORACLE_SID=orcl
$ srvctl start nodeapps
$ srvctl start asm
$ srvctl start instance
$ emctl start dbconsole
使用 SRVCTL 啟動/停止所有實例
啟動/停止所有實例及其啟用的服務
$ srvctl start database
$ srvctl stop database
From:http://tw.wingwit.com/Article/program/Oracle/201311/16967.html