I am in a similar position - migrating huge amounts of shell scripts, sql
scripts and PL/SQL programs to Perl/DBI (Oracle - Data warehousing
environment)

Apart from the PRO's already mentioned, I find that Perl/DBI reduces the
number of lines of code considerably, and also the number of program files
(eg 1 Perl/DBI script replaces a shell script that calls 3 SQL scripts that
invoke 2 PL/SQL procedures, ..) - so I end up with a much more maintainable
system in Perl/DBI.  Although the scripts I inherited were well written, it
was a nightmare for me to take them over, chasing down what called what etc.

Having said that, I still keep what I can in Oracle PL/SQL packages.  The
database keeps track of dependencies for me (for example with TOAD I can
easily see what procedures use what tables) and I can control access to
tables better.

But Perl/DBI is much better for calling stored procedures anyway - I can
raise exceptions in PL/SQL and trap them programatically in Perl, catch
DBMS_OUTPUT messages neatly, etc  - all the things I need to build an
overall system.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 7:47 PM
To: [EMAIL PROTECTED]
Subject: Marketing DBI



Hello dbi-users,

I hope the following question is not off topic. I am new to a company that
makes intensive use of Oracle under UNIX. Most Applications are Oracle
Forms- and Oracle Reports-based. But there is also a vast variety of batch
scripts. Currently all these scripts are SQL*Plus scripts (using SQL and
PL/SQL) and shell scripts. People here do not speak perl :-(. Now I am going
to give a course on perl and DBI. So far so easy. But my main problem is to
convince developers and management to use perl/DBI on an official basis (as
substitute for or complement to SQL*Plus). So I would be very glad if you
can give me some argument for (or against [are there any? :)]) Perl/DBI
compared to SQL*Plus scripts wrapped into shell scripts. Of course I have my
own portfolio of arguments, but would be glad to hear from your experience
or ideas...
E.g. I am not sure about a performance comparison (will make some tests
though). Success stories would be a great help too.

Thanks for any comments,
Peter

P.S: Arguments I immediately see:

PRO:

1. Perl/DBI is more flexible:
   a) working with file system (how easy is it in PL/SQL to read from and
write to files???)
   b) lots of existing modules in perl (XML, Excel spreadsheet access, web
based applications,...)
2. Perl/DBI is a "real" language (loops etc.) compared to SQL*Plus (counter
argument: PL/SQL is a real language too, and can be used within SQL*Plus.)
3. DBI is database independent, migration to other databases is easier.
4. Anything you can do with PL/SQL can be done with perl/DBI, since you can
use PL/SQL within Perl/DBI

CONS (expected to hear):

1. We dont want to learn a new language...
2. More Oracle developers than perl/DBI developers on the market (I doubt
this is true, but I have heard this argument).
3. PL/SQL is better integrated into oracle, e.g. as far as data types are
concerned (in fact working with Oracle date values, NULL values,... seems to
me to be easier in pure PL/SQL than Perl/DBI).
CAUTION

This e-mail and any files transmitted with it are privileged and confidential 
information intended for the use of the addressee. The confidentiality and/or 
privilege in this e-mail is not waived, lost or destroyed if it has been transmitted 
to you in error. If you have received this e-mail in error you must (a) not 
disseminate, copy or take any action in reliance on it; (b) please notify Australia 
Post immediately by return e-mail to the sender; and (c) please delete the original 
e-mail.

Reply via email to