前提:
1、虚拟机中已成功安装Oracle数据库
2、配置了监听器
3、下载安装PLSQL
4、安装并配置好instantclient
问题:使用PL/SQL developer 连接Oracle11g,提示错误ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
以下是我报错的配置:
linux虚拟机服务器端
listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.159.129)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.159.129)(PORT = 1522))
)
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=orcl)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0)
(SID_NAME=orcl))
)
tnsnames.ora
orcl=
(*DESCRIPTION =
(DESCRIPTION_LIST* =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.159.129)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.159.129)(PORT = 1522