测试:
一开始,ASM实例运行在本地节点,Oracle实例访问本地的ASM实例:
点击(此处)折叠或打开
-
SQL> select instance_name,db_name,status from v$asm_client;
-
-
INSTANCE_NAME
-
--------------------------------------------------------------------------------
-
DB_NAME STATUS
-
---------------- ------------------------
-
-MGMTDB
-
_mgmtdb CONNECTED
-
-
+ASM1
-
+ASM CONNECTED
-
-
racdb1
-
racdb CONNECTED
-
-
-
INSTANCE_NAME
-
--------------------------------------------------------------------------------
-
DB_NAME STATUS
-
---------------- ------------------------
-
racdb1
- racdb CONNECTED
点击(此处)折叠或打开
-
$ sqlplus / as sysasm
-
-
SQL> shutdown abort
- ASM instance shutdown
随后,查看节点1上访问ASM实例的客户端,有了来自节点2的客户端访问。
点击(此处)折叠或打开
-
SQL> select instance_name,db_name,status from v$asm_client;
-
-
INSTANCE_NAME
-
--------------------------------------------------------------------------------
-
DB_NAME STATUS
-
---------------- ------------------------
-
-MGMTDB
-
_mgmtdb CONNECTED
-
-
+ASM1
-
+ASM CONNECTED
-
-
racdb1
-
racdb CONNECTED
-
-
-
INSTANCE_NAME
-
--------------------------------------------------------------------------------
-
DB_NAME STATUS
-
---------------- ------------------------
-
racdb1
-
racdb CONNECTED
-
-
racdb2
-
racdb CONNECTED
-
-
racdb2
-
racdb CONNECTED
-
-
- 6 rows selected.
如果节点2的ASM2实例恢复后,Oracle实例不会自动切换回来,仍然会访问远程的ASM实例。要想重新访问本地的ASM实例,需要正常关闭Oracle实例,再启动实例后
将自动选择访问本地的ASM实例。