Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: differenece in DOS SQL*Plus vs. GUI?

Re: differenece in DOS SQL*Plus vs. GUI?

From: Glen A Stromquist <glen_stromquist_at_no.spam.yahoo.com>
Date: Tue, 07 Oct 2003 14:50:23 GMT
Message-ID: <PoAgb.41$Sg4.16@edtnps84>


Paul Murphy wrote:

>> How are you attempting to connect?
>> Are you using the
>>  user.pass_at_tnsnameentry
>>
>> What error do you get?

>
>
> I'm filling in the 3 fields in the SQL*Plus windows dialog box: user
> name, password, host string (such as system, mypass, mydbname). I've
> done this several hundred times on multiple Windows 2000 servers running
> Oracle 8i and 9i with no problems. The error is ORA-12154: TNS:could not
> resolve service name. This is the same error you'd get if you type the
> host string wrong. Here's what I'm really getting at:
>
> If DBA Studio and the DOS version of SQL*Plus (running locally on the db
> server) can resolve the host string and connect, why can't the windows
> version of SQL*Plus (running locally on the database server) when remote
> users can connect using the windows version of SQL*Plus using the same
> system, mypass, mydbname.
>
> The bottom line is: What is different about what the Windows version of
> SQL*Plus looks at to connect to a database running on the local machine
> as compared to DBA Studio and the DOS version of SQL*Plus?
To connect locally all you should need is ORACLE_SID = yoursid, otherwise it will use tnsnames or (whatever you are useing), try issueing "set" in DOS and see what you oracle_sid is set at. It's possible that your dos session is using the tnsnames file and the sqlplusw sessions is looking in a different place for it, IIRC I ran in to a similar issue when I first installed 8.1.5 on an NT box.

>
> Another clue might be that a few of the remote users had to rename their
> sqlnet.ora files to another name before SQL*Plus would look at the
> tnsames.ora file and connect.
>
> Thanks for any advice...I hope I'm not the only one who has had this
> type of problem and that someone will have a few things for me to look at.
>
> So far, I've reset the hostname to localhost, to the fully qualified
> active directory name, to the IP address of the machine...nothing
> worked. I set a TNS_ADMIN environment variable to the exact path of the
> tnsnames.ora file. I've looked at the listner.ora file and that looks
> fine (plus people can connect fine remotely, so that's probably not the
> issue). Thanks again. -Paul Murphy
>

Like I said, the listener running should be irrelavent if your ORACLE_HOME and ORACLE_SID settings are correct for the local database, but try stopping the listener and see if you can still connect thru DOS, that will tell you if it is using the tnsnames or not.

Try a search to see if there are multiple copies of tnsnames.ora, this is what I ran in to once when I installed some of oracle utilities after the main install

hth Received on Tue Oct 07 2003 - 09:50:23 CDT

Original text of this message

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