cancel
Showing results for 
Search instead for 
Did you mean: 

SQLPLUS

Marko_3
Contributor

SQLPLUS

Hi all

My Oracle database resides in another Unix HP box.

I have configured Oracle Client on another HP Unix box as the application server. However when I try to do a 'sqlplus system/manager', it gives me oracle error 12545. But if I do 'sqlplus system/manager@SAPDB', it does not have any error and the SQL prompt appears. What's wrong? My ORACLE_SID environment variable is set to SAPDB

Thanks
4 REPLIES
Rita C Workman
Honored Contributor

Re: SQLPLUS

Here's what Oracle says is the problem:

ORA-12545: Connect failed because target host or object does not exist

Cause: The address specified is not valid, or the program being connected to does not exist.

Action: Ensure the ADDRESS parameters have been entered correctly; the most likely incorrect parameter is the node name. Ensure that the executable for the server exists (perhaps "oracle" is missing.) If the protocol is TCP/IP, edit the TNSNAMES.ORA file to change the host name to a numeric IP address and try again.

You may find this url handy for these types of problems..

http://www.cs.umbc.edu/help/oracle8/errmsg/A54625_01/toc.htm

/rcw
Joseph C. Denman
Honored Contributor

Re: SQLPLUS

The reason is this:

When you run "sqlplus system/manager" oracle is looking for the database to reside on the system you are running the command from. The "@ORACLE_SID" tells oracle that the database is on a different system and check the tnsnames.ora for the connect information.
If I had only read the instructions first??
Andreas D. Skjervold
Honored Contributor

Re: SQLPLUS

Hi
Might add that you can use the enviroment variable TWO_TASK to define the default connect string to be used.
Set to the connect sting alias defined in tnsnames.ora.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Alexander M. Ermes
Honored Contributor

Re: SQLPLUS

Hi there.
In this case Joseph's answer is correct.
I tried this from different clients ( HP-UX / WIndows NT / Windows 98 ).
If the tnsnames.ora shows the correct database connections, you have to add the ORACLE_SID to your sqlplus call.
Rgds
Alexander M. Ermes
;-)
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"