Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can't connect to remote database
Once again thanks for your prompt reply.
I amended the db1 tag in tnsnames.ora to ORCL as you suggested. Using sqlplus with User1/password results in the same error messages. However User1/password_at_db1 results in
ORA-12154: TNS: could not resolve service name
as you would expect, and User1/password_at_ORCL connects fine.
It almost appears that it is not using the tnsnames.ora file unless the @???? is included in the login.
Is this a missing environment variable perhaps?
Once again many thanks.
Paul
In article <3a7f0577_at_news.iprimus.com.au>,
"Howard J. Rogers" <howardjr_at_www.com> wrote:
> OK, well you tnsnames.ora explains why the connect "@db1" works -
because db1
> is the tns alias for the ORCL sid, and the .ora file explains nicely
where
> and how to connect there.
>
> When you just connect as User1, though, you really ARE relying on
> ORACLE_SID, and since that's set to ORCL, and since your tnsnames.ora
says
> not one word about how to connect to something called ORCL, it can't.
>
> A couple of things to try. First edit the tnsnames, and change the
line
> where it says db1= to read ORCL=. See how you get on then. Try a
connect
> User1/password and note the results. And then try a connect
> User1/password_at_ORCL and again note the results.
>
> If that works, you could try cutting and pasting the 9 lines you've
shown
> here, and then editing that same line again, so that you end up with
one set
> of lines saying "db1 = " and one set of lines reading "ORCL =". You
should
> then have the choice of what name you wish to connect by (though both
will
> actually connect to the ORCL Instance.
>
> Let me know how you get on
>
> Regards
> HJR
Sent via Deja.com
http://www.deja.com/
Received on Tue Feb 06 2001 - 02:34:07 CST