dataguard ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
错误的意思是listener 不知道连接解析器中的请求服务,这里要说静态监听和动态监听了
动态注册是在instance启动的时候PMON进程根据init.ora中的instance_name,service_names两个参数将实例和服务动态注册到listener中。
静态注册就是实例启动时读取listener.ora文件的配置,将实例和服务注册到监听程序。无论何时启动一个数据库,默认地都有两条信息注册到监听器中:数据库服务器对应的实例和服务。
搭建dataguard过程中,先启动的数据库,没有在listener.ora 中设置静态监听。重新设置后。
# listener.ora Network Configuration File: /opt/oracle/10.2.0/orcl/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orclpdg)
(ORACLE_HOME = /opt/oracle/10.2.0/orcl)
)
--增加内容 BEGIN
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/10.2.0/orcl)
(PROGRAM = extproc)
)
)
--增加内容 END
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.250.7.230 )(PORT = 1521))
)
)
oracle@yangDB2:/opt/oracle/10.2.0/orcl/network/admin>lsnrctl
LSNRCTL> status
LSNRCTL> reload
LSNRCTL> status