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: sqlplus from a perl script is giving ORA-12545 error.

Re: sqlplus from a perl script is giving ORA-12545 error.

From: Tim X <timx_at_spamto.devnul.com>
Date: 14 May 2003 21:41:32 +1000
Message-ID: <87y919eowj.fsf@tiger.rapttech.com.au>


>>>>> "pdqd" == pdqd <pdqd_at_rediffmail.com> writes:

 pdqd> Hi Friends, - Using a perl script i am running 'sqlplus'
 pdqd> command(sqlplus <dbuid>/<dbpasswd>@DB1 @oracle.sql ). I get the
 pdqd> following error message...  - ORA-12545: Connect failed because
 pdqd> target host or object does not exist - But I don't think there
 pdqd> could be any connection problem (and also the database manager
 pdqd> is up and running) because i can run the same command mannually
 pdqd> from the shell.  Could someone pls suggest what could be
 pdqd> causing the above error.  - Thanks and Regards, Parimal.

Lots of things - really need to see your code. Could be -

  1. ORACLE_SID environment variable not set/available
  2. How are you executing the sqlplus command form perl - system(), backticks, etc - this can effect the shell environment it is executed in and the variables available in that environment
  3. Why are you using perl? Why not just a shell script? If you are also processing data via perl, why not use DBI and bypass sqlplus completely - gives you easier access to the data from within perl.

Really need to post your perl script and then we can make better suggestions.

Tim

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!
Received on Wed May 14 2003 - 06:41:32 CDT

Original text of this message

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