龙空技术网

记一次搭建备库,使用连接串主库无法连接到备库

思庄认证培训 97

前言:

而今咱们对“oracle报错12528”都比较关切,小伙伴们都想要知道一些“oracle报错12528”的相关知识。那么小编也在网上搜集了一些对于“oracle报错12528””的相关知识,希望朋友们能喜欢,兄弟们快快来学习一下吧!

主库使用连接串连接备库失败

SQL> conn sys/oracle@orcldg as sysdba

ERROR:

ORA-12528: TNS:listener: all appropriate instances are blocking new connections

备库已经建立了静态监听

# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = orcldg)(PORT = 1521))

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

)

)

ADR_BASE_LISTENER = /u01/app/oracle

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = orcldg)

(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)

(SID_NAME = orcldg)

)

)

主库tns文件

$ cat tnsnames.ora

orcldb =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = orcldb)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = pacsdb1)

)

)

ORCLDG =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = orcldg)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = pacsdb1)

)

)

发现主库tns中的服务名跟备库静态监听的服务名不一致,导致主库识别不到备库,上面标记红色的部分需要一样的服务名,这样就可以连接了

标签: #oracle报错12528