Oracle 11g时
ORA-12514: TNS: 监听进程不能解析在连接描述符
我先要描述下产生的背景
刚开始装上后是可以用pl/SQL连接的,但是重启电脑后,就报这个问题,数据库服务和监听 我是肯定开启的
在网上招了不少,都说是配置文件问题下面是两个文件:
tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = Oracle8)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
电脑上 所有和oracle相关的都开启了,
但还是报这个错误,哪位有过这个问题的??
求教了
------解决方案--------------------把tnsnames.ora 和 listener.ora 里面的 localhost 改成你的ip试试。。
然后重启下监听,看能连上不。
------解决方案--------------------SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
(SID_NAME = orcl)
) )
然后重启监听试下。
另外你可以看下服务器端有几个数据库,有时候多个数据库的话是需要set ORACLE_SID=XXXX或者export ORACLE_SID=XXXX才可以连接到数据库