Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-12154: TNS:could not resolve service name
gurinder.kabbay_at_gmail.com wrote:
> Frank van Bortel wrote:
> > gurinder.kabbay_at_gmail.com schreef:
> > > Hi,
> > > I am using Oracle 10g with windows XP. I've a service name USERDB and
> > > the database userdb is in shared server configuration. I works fine if
> > > I try to connect from SQL*PLUS. But when I try to connect from sqlplus
> > > D:\Set Oracle_SID=userdb
> > > D:\sqlplus /nolog
> > > SQL>conn scott/tiger_at_userdb
> > > SQL>ORA-12154: TNS:could not resolve service name.
> > >
> > > SQL>
> > >
> > > Anybody having some idea to resolve this....
> > > Thanks in advance
> > >
> > Almost correct:
> > SQL>conn scott/tiger
> > should do the trick.
> >
> > No need for a listener, as a bequeath connection is used.
> > @userdb requires a userdb entry in tnsnames.ora
> > in your network directory (%ORACLE_HOME\network\admin).
> > --
> > Regards,
> > Frank van Bortel
> >
> > Top-posting is one way to shut me up...
>
>
> Thanks for reply.
> userdb is there in tnsnames.ora that's why i able to connect from
> sql*plus or isqlplus using connection string
> userdb(user/password_at_userdb from sql*plus or isqlplus)
> but the problem exists only when i try to connect from sqlplus
> Regards,
> Harcharan
Go into a dos box and enter:
lsnrctl status
There should be a service name which probably has the domain appended to the sid. Be sure the service_name parameter in the tnsnames.ora is the same as the service name the listener specifies.
If that still doesn't work, try adding (SERVER=DEDICATED) to see if you have a shared server configuration issue.
12154, 00000, "TNS:could not resolve service name"
// *Cause: The service name specified is not defined correctly in the // TNSNAMES.ORA file. // *Action: Make the following checks and correct the error: // - Verify that a TNSNAMES.ORA file exists and is in the proper // place and accessible. See the operating system specific manual // for details on the required name and location. // - Check to see that the service name exists in one of the // TNSNAMES.ORA files and add it if necessary. // - Make sure there are no syntax errors anywhere in the file. // Particularly look for unmatched parentheses or stray characters. // Any error in a TNSNAMES.ORA file makes it unusable. See // Chapter 4 in the SQL*Net V2 Administrator's Guide. If // possible, regenerate the configuration files using the Oracle // Network Manager.
Also be sure you scroll through the entire tnsnames.ora file, it's easy to miss duplicate entries. Some versions of Oracle can be blown off by stray invisible characters in the tnsnames.ora file.
jg
-- @home.com is bogus. "Mm hmm... Mm hmm... very nice... what do all these little arrows mean?" - Woody Allen http://www.orablogs.com/brian/depgraph_large.pngReceived on Thu Aug 10 2006 - 15:02:29 CDT
![]() |
![]() |