您好,登錄后才能下訂單哦!
asm遠程連接可能會遇到以下報錯:
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遠程連接配置如下:
參數配置:
remote_login_passwordfile = exclusive ... for stand alone ASM setups
remote_login_passwordfile = shared ... for ASM setups that also use Real Application Cluster (RAC)
節點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))
)
)
節點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模式啟動數據庫。
數據庫啟動到nomount,監聽狀態為BLOCKED;
數據庫啟動到mount,監聽狀態為READY;
數據庫啟動到restrict,監聽狀態為RESTRICT;
靜態注冊的asm為BLOCKED
參考自:How to connect to ASM instance from a remote client (Oracle Net) (文檔 ID 340277.1)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。