ORALC 抛出ORA-12154的错误

今天在虚拟机中已经配置了oracle数据库,并且数据库也已经启动,但是通过pl/sql连接后,始终
抛出错误--ORA-12154:TNS:无法解析指定的连接标识符的错误

 

解决
经排查网络是正常,数据库也是正常启动的,后来把oracle的tns配置修改了下就可以了:

(1)原先的数据库连接方式:

Test_2 =
    (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.129)(PORT = 1521))
      (LOAD_BALANCE = yes)
    )
    (CONNECT_DATA =
      (SERVICE_NAME =test)
    )
)

 

(2)修改后的数据库连接方式:

Test_2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.129)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME =test)
    )
  )

 

你可能感兴趣的:(oracle)