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: Error ORA-12154 when connecting on the server

Re: Error ORA-12154 when connecting on the server

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Fri, 2 Aug 2002 19:33:18 +1000
Message-ID: <aidjir$362$1@lust.ihug.co.nz>


A classic problem, I'm afraid.

Almost certainly, your sqlnet.ora file is doing its usual thing of silently appending a domain to whatever you type in at collect time as the service name.

For example, you type "connect system/manager_at_DB1".

If your sqlnet.ora contains the line 'names.default_domain=WORLD' (something like that -I'm doing this from memory), then the ".world" gets silently appended to your connect string -so, in effect, you're really typing 'connect system/manager_at_db1.world'. Trouble is, your tnsnames.ora is probably set to understand only the 'db1' alias.

So, you have two possible fixes. The dirty fix is to open tnsnames.ora, and edit the bit where it says 'db1= blah blah blah...' and change it to read 'db1.world= blah blah blah...'. You then continue connecting to 'db1' [without the .world], let sqlnet.ora do its thing, and there'll be a match.

The second suggestion is to open the sqlnet.ora, and remove the 'default domain' line altogether. You supply 'db1', sqlnet doesn't append a thing, and that matches the 'db1' you've got in your tnsnames.ora. Connection made!

Regards
HJR "Paulo" <preichert_at_libero.it> wrote in message news:89489138.0207300153.42d352a7_at_posting.google.com...
> Please guys,
>
> I'm almost a newbie on Oracle and I'm having the following problem:
>
> I've installed a server Windows 2K with Oracle 8.1.7 and it's
> configured and appears to be working properly.
>
> On my desktop (Windows 2K Professional) I've installed the client
> tools (default installation of Oracle Client 8.1.7).
>
> In Net8 Assistant, I've used the wizard to create the service name to
> connect to a database on the server. When I try to test the connection
> from inside Net8 Assistant to the database it works fine.
>
> When I try to connect to the database from SQL*Plus or ODBC it gives
> me an error that says that the service name could not be resolved:
>
> [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name
>
> Did someone foud a problem like mine?
>
> Thanks.
Received on Fri Aug 02 2002 - 04:33:18 CDT

Original text of this message

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