>What's easier than sqlplus?  With the right options, you can have sqlplus
>return errors and/or ignore them.  Otherwise, you have to parse the sql 
and
>separate the statements.  It shouldn't be too difficult, but I'm not sure
>it's worth the time.

I find DBI easier than sqlplus.  You can parse the statements, or parse 
the output, but parse you will.  IMHO, you have a lot more flexibility 
with your output if you use DBI.

>> 
>> Actually im trying to prepare a delivery installation script 
>> for our application for which we are currently using shell 
>> scripts. I know that the sqlplus can be called from the perl 
>> script to do this but i wanted to use pure perl, DBI and .sql 
>> files only so that the script could be run from any machine 
>> (including windows) which does not have oracle client installed. 
>
>Can't do that.  The DBD::Oracle module *requires* the Oracle client
>installed.  The only platform that natively support that type of 
connection,
>that I'm aware of, is Java with the thin drivers.  I'm sure there's 
another
>way, but, DBD::Oracle requires the client installed.

DBD::Proxy.  Of course you then need the Proxy running 
somewhere....perldoc DBD::Proxy


____________________________
Jeff Seger
Fairchild Semiconductor
[EMAIL PROTECTED]
____________________________





"Jeff Urlwin" <[EMAIL PROTECTED]>
02/27/2004 07:12 AM

 
        To:     "'Oracle Monk'" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
        cc: 
        Subject:        RE: including sql files in a main perl script.


> 
> Hi all,
> 
> I want to know is it possible to include .sql files in a main 
> perl script? 

Sure.

> 
> I don't want write sql statements inside a perl script, 
> rather i want to keep the sql files in a seperate folder and 
> then use a perl script to read those sql files, prepare them 
> and then execute them as we can do in a shell script (its 
> easy in shell as we use the sqlplus @filename). 

What's easier than sqlplus?  With the right options, you can have sqlplus
return errors and/or ignore them.  Otherwise, you have to parse the sql 
and
separate the statements.  It shouldn't be too difficult, but I'm not sure
it's worth the time.

> 
> Actually im trying to prepare a delivery installation script 
> for our application for which we are currently using shell 
> scripts. I know that the sqlplus can be called from the perl 
> script to do this but i wanted to use pure perl, DBI and .sql 
> files only so that the script could be run from any machine 
> (including windows) which does not have oracle client installed. 

Can't do that.  The DBD::Oracle module *requires* the Oracle client
installed.  The only platform that natively support that type of 
connection,
that I'm aware of, is Java with the thin drivers.  I'm sure there's 
another
way, but, DBD::Oracle requires the client installed.

Regards,

Jeff




Reply via email to