十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
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)