亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

ORACLE 11G RAC常用命令有哪些

發布時間:2021-11-10 14:29:44 來源:億速云 閱讀:230 作者:小新 欄目:關系型數據庫

這篇文章給大家分享的是有關ORACLE 11G RAC常用命令有哪些的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。

ORACLE 11G RAC常用命令(grid用戶查看)

1:檢查OHAS狀態和集群狀態

[root@rac1 ~]# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online


2:檢查所有實例運行狀態

[root@rac1 ~]# srvctl status database -d racdb
Instance racdb1 is running on node rac1
Instance racdb2 is running on node rac2


3:檢查單個實例狀態(實例名分別為racdb1和racdb2,數據庫名為racdb)

[root@rac1 ~]# srvctl status instance -d racdb -i racdb1
Instance racdb1 is running on node rac1

[root@rac1 ~]# srvctl status instance -d racdb -i racdb2
Instance racdb2 is running on node rac2


4:節點應用程序狀態

[root@rac1 ~]# srvctl status nodeapps
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1
VIP rac2-vip is enabled
VIP rac2-vip is running on node: rac2
Network is enabled
Network is running on node: rac1
Network is running on node: rac2
GSD is disabled
GSD is not running on node: rac1
GSD is not running on node: rac2
ONS is enabled
ONS daemon is running on node: rac1
ONS daemon is running on node: rac2


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

[root@rac1 ~]# srvctl config nodeapps -a -g -s -l
Warning:-l option has been deprecated and will be ignored.
Network exists: 1/192.168.11.0/255.255.255.0/eth0, type static
VIP exists: /rac1-vip/192.168.11.201/192.168.11.0/255.255.255.0/eth0, hosting node rac1
VIP exists: /rac2-vip/192.168.11.211/192.168.11.0/255.255.255.0/eth0, hosting node rac2
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
Name: LISTENER
Network: 1, Owner: grid
Home:
  /u01/app/11.2.0/grid on node(s) rac2,rac1
End points: TCP:1521


5:列出所有的配置數據庫

[root@rac1 ~]# srvctl config database -d racdb -a
Database unique name: racdb
Database name: racdb
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/racdb/spfileracdb.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racdb
Database instances: racdb1,racdb2
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed


6:ASM狀態及ASM配置

[root@rac1 ~]# srvctl status asm
ASM is running on rac2,rac1

[root@rac1 ~]# srvctl config asm -a
ASM home: /u01/app/11.2.0/grid
ASM listener: LISTENER
ASM is enabled.
[root@rac1 ~]#


7:TNS監聽器狀態及配置

[root@rac1 ~]# srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac2,rac1

[root@rac1 ~]# srvctl config listener -a
Name: LISTENER
Network: 1, Owner: grid
Home:
  /u01/app/11.2.0/grid on node(s) rac2,rac1
End points: TCP:1521
[root@rac1 ~]#


8:SCAN狀態及配置

[root@rac1 ~]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1

[root@rac1 ~]# srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.11.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rac-scan/192.168.11.199


9:VIP各個節點的狀態及配置

[root@rac1 ~]# srvctl status vip -n rac1
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1

[root@rac1 ~]# srvctl status vip -n rac2
VIP rac2-vip is enabled
VIP rac2-vip is running on node: rac2

[root@rac1 ~]# srvctl config vip -n rac1
VIP exists: /rac1-vip/192.168.11.201/192.168.11.0/255.255.255.0/eth0, hosting node rac1

[root@rac1 ~]# srvctl config vip -n rac2
VIP exists: /rac2-vip/192.168.11.211/192.168.11.0/255.255.255.0/eth0, hosting node rac2


10:集群中所有正在運行的實例(SQL)

SQL> select inst_id,instance_number,instance_name,parallel,status,database_status,active_state,host_name from gv$instance;

   INST_ID INSTANCE_NUMBER INSTANCE_NAME    PAR STATUS       DATABASE_STATUS   ACTIVE_ST HOST_NAME
---------- --------------- ---------------- --- ------------ ----------------- --------- --------------
         1               1 racdb1           YES OPEN         ACTIVE            NORMAL    rac1
         2               2 racdb2           YES OPEN         ACTIVE            NORMAL    rac2

用root用戶執行以下所有檢查


1:啟動或關閉數據庫實例

[root@rac1 ~]# srvctl stop instance -d racdb -n rac1
[root@rac1 ~]#
[root@rac1 ~]# srvctl stop instance -d racdb -n rac2
[root@rac1 ~]#
[root@rac1 ~]# srvctl status database -d racdb
Instance racdb1 is not running on node rac1
Instance racdb2 is not running on node rac2

也可以通過如下命令,檢查每一個實例的狀態

[root@rac1 ~]# srvctl status instance -d racdb -i racdb1
Instance racdb1 is not running on node rac1
 
[root@rac1 ~]# srvctl status instance -d racdb -i racdb2
Instance racdb2 is not running on node rac2


2:啟動或關閉asm實例

[root@rac1 ~]# srvctl stop asm -n rac1
PRCR-1014 : Failed to stop resource ora.asm
PRCR-1065 : Failed to stop resource ora.asm
CRS-2529: Unable to act on 'ora.asm' because that would require stopping or relocating 'ora.DATA.dg', but the force option was not specified
[root@rac1 ~]#

可以用 crsctl status resource -t -init 檢查集群資源的狀態


3:本地服務器上停止oracle clusterware 使用crsctl stop cluster 命令,這個命令執行之后,如果oracle clusterware管理的資源中有任何一個還在運行,
則整個命令失敗。使用-f選項,表示無條件的停止所有資源,并停止oracle clusterware系統。

另外,可通過指定-all選項在集群中所有服務器上停止oracle clusterware系統,如下:

crsctl stop cluster -all -f

也可以使用 crsctl start cluster -n rac1 rac2

感謝各位的閱讀!關于“ORACLE 11G RAC常用命令有哪些”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

达尔| 金门县| 浦东新区| 宿迁市| 二连浩特市| 南宁市| 上杭县| 蒙城县| 龙泉市| 航空| 陇川县| 莒南县| 天津市| 萨嘎县| 临清市| 元朗区| 泰宁县| 轮台县| 凌源市| 梧州市| 山阳县| 永和县| 海口市| 西贡区| 兴城市| 五原县| 安阳市| 云和县| 龙泉市| 成安县| 内丘县| 娄烦县| 朝阳市| 秀山| 游戏| 罗城| 青川县| 新乡县| 大同市| 长宁县| 海宁市|