SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = sidb26)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = sidb26)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain.com)(PORT = 1521))
)
)
客户端配置好服务名后,用PL/SQL Developer连接数据库时,报错:ORA-12504:TNS:监听程序在CONNECT_DATA中未获得SERVICE_NAME。一般这种情况请检查tnsnames.ora文件中TNS是否配置正确,如下所示,SERVICE_NAME 名字弄错了,结果报如上错误:GSP =
(DESCRIPTION =
(ADDRESS =(PROTOCOL = TCP)(HOST = 172.20.36.79)(PORT = 1521))
(CONNECT_DATA=
(SERVER = DEDICATED)
(SERVER_NAME = gsp)
)
)
修改为
GSP =
(DESCRIPTION =
(ADDRESS =(PROTOCOL = TCP)(HOST = 172.20.36.79)(PORT = 1521))
(CONNECT_DATA=
(SERVER = DEDICATED)
(SERVICE_NAME = gsp)
)
)
你确定你的服务器上得 监听 listener 启动了?查看下是否启动了,命令行中输入
lsnrctl status
如果没启动则
lsnrctl start
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)