asm遠程連接可能會遇到以下報錯:
創(chuàng)新互聯(lián)建站專業(yè)為企業(yè)提供平橋網(wǎng)站建設、平橋做網(wǎng)站、平橋網(wǎng)站設計、平橋網(wǎng)站制作等企業(yè)網(wǎng)站建設、網(wǎng)頁設計與制作、平橋企業(yè)網(wǎng)站模板建站服務,十余年平橋做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡服務。
ORA-12505 TNS:listener could not resolve SID given in connect descriptor
ORA-12541: TNS:no listener
ORA-15000: command disallowed by current instance type
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
ORA-1031: insufficient privileges
asm遠程連接配置如下:
參數(shù)配置:
remote_login_passwordfile = exclusive ... for stand alone ASM setups
remote_login_passwordfile = shared ... for ASM setups that also use Real Application Cluster (RAC)
節(jié)點1:
[oracle@prodb1 admin]$ cat listener.ora
SID_LIST_LISTENER_prodb1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = +ASM1)
(GLOBAL_DBNAME = +ASM)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
)
)
LISTENER_prodb1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = prodb1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.10.101)(PORT = 1521)(IP = FIRST))
)
)
節(jié)點2:
[oracle@prodb2 admin]$ cat listener.ora
SID_LIST_LISTENER_prodb2 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = +ASM2)
(GLOBAL_DBNAME = +ASM)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
)
)
LISTENER_prodb2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = prodb2-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.10.102)(PORT = 1521)(IP = FIRST))
)
)
客戶端tnsname.ora:
ASM1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.10.101)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = +ASM)
(UR=A)
)
)
ASM2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.10.102)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = +ASM)
(UR=A)
)
)
ASM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.10.102)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.10.101)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = +ASM)
(UR=A)
)
)
關鍵部分為 (UR=A)
,如果不配置該選項,則連接的時候報:
$ sqlplus sys/admin@asm1 as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on чǚ? 7? 5 21:44:30 2018
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
UR=A選項通常用來連接使用nomount,mount或restricted模式啟動數(shù)據(jù)庫。
數(shù)據(jù)庫啟動到nomount,監(jiān)聽狀態(tài)為BLOCKED;
數(shù)據(jù)庫啟動到mount,監(jiān)聽狀態(tài)為READY;
數(shù)據(jù)庫啟動到restrict,監(jiān)聽狀態(tài)為RESTRICT;
靜態(tài)注冊的asm為BLOCKED
參考自:How to connect to ASM instance from a remote client (Oracle Net) (文檔 ID 340277.1)