1 。tnsping 通
2 sqlplus 不行
请输入用户名: idmp/idmp@idmp
RROR:
RA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
解决
1.
IDMP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = idmp)
)
)
2 重建 监听器。
SERVICE_NAME
用 ping 命令时,
ping localhost 说找不到主机,但用 ping 127.0.0.1 时却是通的
并且文件 C:\windows\system32\drivers\etc\Hosts 是存在的,其中有这么一行:
127.0.0.1 Localhost
IDMP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = idmp)
)
)
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\gddg>tnsping idmp
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-1月 -
2008 01:50:41
Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的参数文件:
c:\oracle\product\10.2.0\client_2\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhos
t)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = idmp)))
OK (50 毫秒)
C:\Documents and Settings\gddg>sqlplus idmp
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 1月 21 01:50:55 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
输入口令:
ERROR:
ORA-12560: TNS: 协议适配器错误
请输入用户名: idmp
输入口令:
ERROR:
ORA-12560: TNS: 协议适配器错误
请输入用户名: idmp/idmp
ERROR:
ORA-12560: TNS: 协议适配器错误
SP2-0157: 在 3 次尝试之后无法连接到 ORACLE, 退出 SQL*Plus
C:\Documents and Settings\gddg>
C:\Documents and Settings\gddg>