how to invoke .sql file from dbi
- From: Ravi.Kongara@xxxxxxx (Ravi Kongara)
- Date: Tue, 23 May 2006 11:39:52 -0700
Hello all,
We have bunch of sql files ( .sql ) that we want to invoke from dbi ( Oracle ).
How does it work. Dbi expects actual sql statements to be given as it's
arguments whether in case of do() or prepare() methods. I wonder is there any option
to just point the dbi to a sql file and dbi taking care of it. I do understand that running
sql file is sqlplus feature and may not be applicable to dbi, as dbi is more generic. We have
hundreds of sql files to be run like this. Each sql file has multiple sql statements within it.
I know these are my options..
1) Parse sql files and assign each sql statement to string variable and pass the string as an argument to do().
File handler routines may come in handy for this.
2) Do not use DBI. Instead call 'sqlplus' from perl itself with file as input parameter.
Did anyone come across this. Is there any simple way to do this.
Thanks,
Ravi
.
- Prev by Date: RE: Identify PID for remote database handle--CLARIFICATION...
- Next by Date: Re: Identify PID for remote database handle--CLARIFICATION...
- Previous by thread: perl DBI/postgres: alternatives to slash commands?
- Next by thread: RE: how to invoke .sql file from dbi
- Index(es):
Relevant Pages
|