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: Could not log into SQL*Plus

Re: Could not log into SQL*Plus

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Wed, 21 May 2003 06:25:38 +1000
Message-ID: <V%vya.38826$1s1.549713@newsfeeds.bigpond.com>

"Peter" <peter_at_nomorenewsspammin.ca> wrote in message news:bo2lcvcsgf0rp3bm575ghjpvjnkvjmr1rh_at_4ax.com...
> On Sat, 10 May 2003 16:28:45 GMT, faked_at_spam.me.not.com (Jeremy
> Russell) wrote:
>
> Suppose my databse name is DB
> I typed
> sqlplusw "sys/password_at_DB as sysdba"
> but it still complained that "the service name cannot be resolved"
> with a Windows dialog box popping up.
> I tried
> sqlplusw "sys/password_at_OracleServiceDB as sysdba"
> still it complained that "the service name cannot be resolved" with a
> Windows dialog box popping up.
>
> What could be the problem?

The problem would appear to be that you haven't configured tnsnames.ora and sqlnet.ora correctly. You need to use the Net Configuration Assistant to set up these files so that Oracle can make sense of whatever it is that you type after the "@" symbol.

At the end of the day, what you type there has to be turned into an address where we can find a Listener, who will forward our connection request to the right Instance for us.

Here's a sample from my tnsnames.ora:

LNX9.PICTON.COM =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = HAYDN)(PORT = 1521))     )
    (CONNECT_DATA =
      (SERVICE_NAME = lnx9.picton.local)     )
  )

...which means that an instance called 'lnx9.picton.com' can be found running somewhere. In order to connect to it, I must talk to the Listener running on a machine called "HAYDN". The Listener is listening on port 1521.

I would therefore type 'connect howard/password_at_lnx9.picton.com'.

That, however, is a bit of a mouth-full, so I then set this in my sqlnet.ora:

NAMES.DEFAULT_DOMAIN = picton.com

... which means I can just type the 'lnx9' bit of the connection string, and sqlnet.ora will append the picton.com for me. I can therefore actually connect by typing: 'connect howard/password_at_lnx9'.

Regards
HJR Received on Tue May 20 2003 - 15:25:38 CDT

Original text of this message

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