我安装了Oracle和pl / sql开发人员来管理我的数据库。但是当我想连接到pl / sql时,我得到了错误:ORA-12154:TNS:could not resolve the connect identifier
这是我的tns.ora:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = yegane-laptop)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
答案 0 :(得分:1)
有时,您编辑tnsnames.ora文件的记事本会在每个换行符的前面加上“....”(点)。例如:
XE =
..(DESCRIPTION =
....(ADDRESS =(PROTOCOL = TCP)(HOST = yegane-laptop)(PORT = 1521))
....(CONNECT_DATA =
.....(SERVER = DEDICATED)
......(SERVICE_NAME = XE)
...)
...)
你可以用notepad ++选择'Show All Charecters'来检查这个案例。