RE: SQL PLUS

2004-06-11 Thread Bob Showalter
jason corbett wrote:
 What would I need to call SQL Plus into action for PERL?

If you just need to execute SQL statements, use the DBI module and talk
directly to the database.

If you need to run existing sqlplus reports, use any of the standard
facilities like system(), backticks, pipe open, fork/exec, etc. to call
sqlplus from your perl script.

HTH

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: SQL PLUS

2004-06-11 Thread Jeff Westman
Bob Showalter [EMAIL PROTECTED] wrote:

 jason corbett wrote:
  What would I need to call SQL Plus into action for PERL?
 
 If you just need to execute SQL statements, use the DBI module
 and talk directly to the database.
 
 If you need to run existing sqlplus reports, use any of the
 standard facilities like system(), backticks, pipe open, 
 fork/exec, etc. to call sqlplus from your perl script.

If using DBD/DBI is not an option, a better choice would be to open
sqlplus as a pipe stream, as in

 open (SQLPLUS, | sqlplus   $SQL_LOG) 
or die Can't fork process;
 print SQLPLUS $oraId/[EMAIL PROTECTED];
 print SQLPLUS  set heading off\n;
 print SQLPLUS  set pagesize 0\n;
   (etc)

You could then run some basic commands.  You can use the same idea
to run plsql blocks.


HTH


Jeff








__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response