oracle10 用户无法连接到指定实例
问题1:tns:could‘not find the identified
查看$ORACLE_HOME/network/admin/ 下的listern.ora 还有tnsnames.ora 两个文件
如下配置
# listener.ora Network Configuration File: /home/oracle/db/oracle/product/11.1.0/db_1/network/admin/listener.ora(红色字体为增加内容)
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME =/home/oracle/db/oracle/product/11.1.0/db_1)
(SID_NAME = ORCL)
)
(SID_DESC =
(SID_NAME = ovtpm)
(ORACLE_HOME =/home/oracle/db/oracle/product/11.1.0/db_1)
# (PROGRAM = extproc)
# (ENVS = "EXTPROC_DLLS=ONLY:/home/oracle/db/oracle/product/11.1.0/db_1/bin/oraclr11.dll")
)
)LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ldzhang)(PORT = 1521))
)
)
---tnsnames.ora
# tnsnames.ora Network Configuration File: /home/oracle/db/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = ldzhang)(PORT = 1521))
OVTPM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = ovtpm)
(PRESENTATION = RO)
)
) ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ldzhang)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.localdomain)
)
)
记得将host 的value 改为主机名(linux 用hostname可查看) 或是 主机的ip
问题2:ORA-28547: connection to server failed, probable Oracle Net admin error
将listener.ora 中的 (PROGRAM = extproc) 注释
且配置sqlnet.ora如下
# sqlnet.ora Network Configuration File: /home/oracle/db/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
#SQLNET.AUTHENTICATION_SERVICES = (NTS)
SQLNET.AUTHENTICATION_SERVICES = (BEQ,NONE)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)