我的电脑Windows Server Enterprise系统,oracle版本 11.2.0.1,java(jdk)版本 1.6.0_10-rc2;出现错误如下:
Fatal NI connect error 12505, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=orcl)(CID=(PROGRAM=E:\app\Administrator\product\11.2.0\dbhome_1\bin\emagent.exe)(HOST=WIN-DE07F3ID1ZT)(USER=SYSTEM))))
VERSION INFORMATION:
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 11.2.0.1.0 - Production
Time: 28-12月-2010 00:02:13
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS: 拒绝连接
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
以下是使用sqlplus连接时出现的错误情况:
以下是oradim.log记录的错误
那位大侠可以指导一二,救人于水火之中!!!
附录:
sqlnet.ora
# sqlnet.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.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= (ALL)
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT,HOSTNAME)
# SQLNET.AUTHENTICATION_SERVICES = (BEQ,NONE)
listener.ora
# listener.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-DE07F3ID1ZT.yangzaixia.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = E:\app\Administrator
tnsnames.ora
# tnsnames.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.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_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.6.226)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
------解决方案--------------------
先tnsping orcl 确认监听器是否可用?
并且,那个listener.ora 和 tnsnames.ora这两个里HOST变量要么都是IP要么都是主机名
------解决方案--------------------
首先,从客户端TNSPING一下你的主机,看看能通不。如果能通,证明监听启动的没有问题。如果不通,检查一下WINDOWS下的几个ORACLE的服务是不是已启动的状态。
通过你的第一张截图,本地的SYS用户无法登陆的话,可能是密码文件丢失或者有问题了。
请在命令行里执行如下的语句:
按照你的路径,应该是
E:\app\Administrator\product\11.2.0\dbhome_1\bin>orapwd file=E:\app\Administrator\product\11.2.0\dbhome_1\database\PWD[sid].ora password=yourpassword entries=30