Hi

This is not a dbi question, but where can i find i good example script for perl snmp 
trap handling ( send snmp trat and manage snmp trap )

Thanks
bye

-----Original Message-----
From: Jeff Urlwin [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 27, 2004 1:13 PM
To: 'Oracle Monk'; [EMAIL PROTECTED]
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