Scripting for DB2 LUW – Best Practices for Perl and Other Languages – Part 3

You may also like...

2 Responses

  1. Ian Bjorhovde says:

    Viewing DBI as “only” an RDBMS-agnostic layer is selling it short. It allows you access database data without having to parse text. Even though perl is awesome for text manipulation, once you use DBI and leave the drudgery of text parsing behind, your life will be forever improved (and you won’t have to deal with minor formatting changes that occur between database releases). With the SYSIBMADM views and MON_GET table functions, you can pretty much eliminate having parse GET SNAPSHOT output.

    Your comment about not being able to execute DB2 utilities like RUNSTATS, LOAD, etc. have pretty much all been handled by the ADMIN_CMD stored procedure.

    It’s certainly a valid point about being able to install DBI and DBD::DB2 in customer environments… There are ugly workarounds for this, but it’s definitely a problem for perl.

  2. Dick Rietveld says:

    Thank you Ian. You formulated my thoughts exactly.
    It can be cumbersome when you are on a server without direct internet access to download & install it.
    So I want to reverse the common advice: “Kids, DO try this at home”.

    On your day to day windows/linux machine install perl with DBI alongside your db2-express-c and see if you can read some rows from employee 🙂 You will start to like it. Perl becomes so much more powerfull.

Leave a Reply

Your email address will not be published. Required fields are marked *