Re: tnsping and sqlplus output OK, but [ORA-12545: Connect failed because target host or object does not exist]

From: Ron Crisco <ron.crisco_at_method-r.com>
Date: Mon, 10 May 2010 08:50:20 -0500
Message-ID: <AANLkTikgJzTM1cMWLYcVrUudQQGrDKY-PQRpmIQxxS8I_at_mail.gmail.com>



You're attempting to connect twice, so the error is from the default connect of sqlplus. Use sqplus -S /nolog in the command line to prevent this.

Ron Crisco

On Mon, May 10, 2010 at 8:37 AM, Ojha, Ajeet (GE Healthcare, consultant) < Ajeet.Ojha_at_ge.com> wrote:

> Please check your TNSNAMES.ora , this might have some problem , if you
> copy,paste the entries from another file to your tnsnames.ora , then
> this problem comes - this is most common cause for this.
>
>
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sven Aluoor
> Sent: Monday, May 10, 2010 6:58 PM
> To: oracle-l_at_freelists.org
> Subject: tnsping and sqlplus output OK, but [ORA-12545: Connect failed
> because target host or object does not exist]
>
> Hi folks
>
> I have here a strange problem. I wrote a lot of cronjobs with sqlplus
> here documents like that:
>
> select_script ()
> {
> db_dummy=Jby8a4xsS20Lf08aQ7Q7
> sqlplus -S <<EOF / > /opt/ess/scripts/outout_pf00.log
> essadmin/$db_dummy_at_$ORACLE_SID
> set echo Off
> set term On
> set pages 0
> set head off
> set ver off
> set feed off
> set trims on
> set linesize 200
>
> select * from rss;
>
> exit
> EOF
> }
>
> As output I receive in /opt/ess/scripts/outout_pf00.log the error
> "ORA-12545: Connect failed because target host or object does not
> exist" and the output of the Select-Query.
>
> Tnsping shows no error. Tnsnames.ora is OK (tried both IP-Address and
> name). Manual sqlplus with user name and password doesn't show the
> error.
>
> Everything works, but this is an ugly error message in the output. How
> to get rid of?
>
> cheers Sven
> --
> http://www.freelists.org/webpage/oracle-l
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 10 2010 - 08:50:20 CDT

Original text of this message