ORA-28547 连接服务器失败,可能是Oracle Net 管理错误
原文地址:http://www.linuxidc.com/Linux/2014-11/109686.htm
上周去给客户培训Oracle,讲到DG部分做实际配置演示的时候,碰到了ORA-28547故障,客户的数据库时11.2.0.1的版本,Window平台。
之前已经按照步骤把DG全部配置完成了,当准备在备库启用redo apply的时候,照例先检查一下两边远程归档路径是否有效:
# listener.ora Network Configuration File: D:oracleproduct11.2.0dbhome_1 etworkadminlistener.ora
# Generated by Oracle configuration tools.
#CLRExtProc
#DIRECT_HANDOFF_TTC_LISTENER = OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = D:oracleproduct11.2.0dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:oracleproduct11.2.0dbhome_1inoraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:oracle
tnsnames.ora
# tnsnames.ora Network Configuration File: D:oracleproduct11.2.0dbhome_1 etworkadmin nsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
sqlnet.ora
# sqlnet.ora Network Configuration File: D:oracleproduct11.2.0dbhome_1 etworkadminsqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Information in this document applies to any platform.
ORA-28547: connection to server failed, probable Oracle Net admin error
However, local BEQUEATH connections (without the Listener) work fine.
改变:
<span "="">New installation or changes to an existing listener.ora file
<span "="">The listener.ora file's SID_LIST section may INCORRECTLY contain a "PROGRAM" line and/or an "ENVS" line for all database instances.
For example, for a listener called LISTENER1 the following may be set for a "static" SID_LIST section:
(SID_LIST =
(SID_DESC =
(SID_NAME = ORCL1)
(ORACLE_HOME = E:apporacleproduct11.2.0dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:apporacleproduct11.2.0dbhome_1inoraclr11.dll")
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:apporacleproduct11.2.0dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:apporacleproduct11.2.0dbhome_1inoraclr11.dll")
)
)
In the example above, the first section contains the SID_NAME and ORACLE_HOME values for the Database instance required for connection to.
However, it also contains a PROGRAM and an ENVS value which will also attach to client connections through the SID_NAME Value.
This can result in Oracle*Net connection errors such as ORA-28547.
These are ONLY for External Procedures and/or Heterogeneous Services (HS) Gateway use, which is as per the second section example and correctly used for that section.