在我的TnsNamesOra中,
TEST11.12.13.14 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 11.12.13.14)(PORT = 1234))
)
(CONNECT_DATA =
(SERVICE_NAME = TESTNAME)
)
)
如果我的连接字符串如下所示:
Data Source = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 11.12.13.14)(PORT = 1234)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = TEST))); User Id = admin; Password = admin ; DBA Privilege = SYSDBA ; Pooling = false; Connection Timeout = 30" providerName="Oracle.DataAccess.Client
一切正常。
但是我想做这样的事情:
Data Source = TEST11.12.13.14; User Id = admin; Password = admin ; DBA Privilege = SYSDBA ; Pooling = false; Connection Timeout = 30" providerName="Oracle.DataAccess.Client
但是出错了
ORA-12154:TNS:无法解析指定的连接标识符