Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-12154: TNS: servicename
EMW schrieb:
> I use:
>
> Dim con As OracleConnection
> con = New OracleConnection("Data Source=Oracle9i;Integrated Security=yes")
>
> But I get this message:
>
> ORA-12154: TNS: servicename could not be resolved
>
> What does this mean?
Check your tnsnames.ora (search for this file if you don't know where it is). There must be an entry for the instance you want connect to, e.g.
MYDB = (DESCRIPTION =
(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = myhost.mydomain.org) (PORT = 1521) ) ) (CONNECT_DATA = (SID = MYDB) ) )
Then you can use MYDB in your connect string.
HTH, Hermann Received on Thu Mar 11 2004 - 09:25:29 CST