Oralce ORA-12154 无法解析指定的连接标识符

今天在配置oracle时发现一个问题,在tnsnames.ora中添加一个远程连接数据库时,所有配置都正确但老提示“ORA-12154:无法解析指定的连接标识符”,后来发现引起错误的竟然是一个空格符!!!

ORACLE =
   (DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
     (CONNECT_DATA =
       (SERVER = DEDICATED)
       (SERVICE_NAME = oracle)
     )
   )


ORACLE_TEST =
   (DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.17)(PORT = 1521))
     (CONNECT_DATA =
       (SERVER = DEDICATED)
       (SERVICE_NAME = CMS40)
     )
   )

我在配置时,不小心在ORACLE_TEST前面加了个空格,后来将其去掉问题就解决了,不知道这算不算oracle的bug,呵呵。

你可能感兴趣的:(Oracle类)