Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-12154: TNS: servicename
thank you, but how do I use it, i've tried : DBQ=MYDB
Dim con As OracleConnection
con = New OracleConnection("Data Source=Oracle9i;Integrated
Security=yes;DBQ=MYDB")
But then I get the message it doesn't know DBQ.
How should I use it in my string then?
rg,
Eric
"Hermann Maier" <benutzer_at_beispiel.at> schreef in bericht
news:7bd624cc82675a98304edaa06c53273e_at_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 - 10:00:15 CST
![]() |
![]() |