plsql连接oracle服务器,出现“无法解析名称”的错误
今天在用PLSQL连接Oracle数据库时,在tnsnames.ora中配置如下:
TAM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =10.6.36.188)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TAM)
)
)
保存后,用PLSQL登陆,出现错误:
ORA-12154: TNS:无法解析指定的连接标识符。
仔细检查tnsnames.ora发现添加的配置文件 :TAM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =10.6.36.188)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TAM)
)
)
在TAM前有空格,去除空格后,重新保存,一切OK。