Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-12154: TNS: servicename

Re: ORA-12154: TNS: servicename

From: Hermann Maier <benutzer_at_beispiel.at>
Date: Thu, 11 Mar 2004 15:25:29 GMT
Message-ID: <7bd624cc82675a98304edaa06c53273e@news.teranews.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US