Informix

nested-group-icon.png

DB2

New Utility Announcement: partitions[.pl] and supporting package (.pm)

  • 1.  New Utility Announcement: partitions[.pl] and supporting package (.pm)

    Posted 25 days ago
      |   view attached
    Hi Family.

    Quite some years ago, waaaaaay before the SourceForge conversion, I uploaded a set of shell scripts under the name partitions.  It is still there, under the DBAdmin-tools section.  I later converted the same algorithms into Perl and I guess I never got around to uploading that.  Which is fine by me because I've just uploaded a new version, again in Perl, but much more orderly.  The package part, Fragments.pm, was written mainly to support the executable utility, partitions.pl.

    The purpose of partitions.pl is to display a quick report on the the state of all (or some) partitions - those parts of tables, like the table itself, or (if fragmented) the fragments or the indexes.  I used the original scheme as a weekly job to check on the number of extents and alert me when they get too fractured.  Or if the page count is the 16-million (or so) hard page limit. 


    You can see a column for Extents, number of pages used, and pages allocated.  This is one table.  The command line was:
    $ partitions.pl --table frag_sales

    The .shar file (one you uncompress it) has the script, the package (pm), and an HTML file documenting each of these.

    BTW, it turns out that the Fragments.pm has additional uses for additional utilities.  I have another in the works as I type this.

    Dependencies:
    These need to be installed like any self-respecting Perl package on CPAN.

    As for Fragments.pm:  You don't really need to "install" it anywhere.  Just copy it into an directory; just make sure that you've included that directory in in the environment variable PERL5LIB.  In my case, that happens to be /ifmx-work/scripts.  And the partitions.pl utility itself: Anyplace in your PATH.

    Also, note that I've attached the compressed file here.

    I think y'all will find this moderately useful, even with the feature-creep I've allowed in there.  (Hanging around Art too much? :-)


    ------------------------------
    Jacob Salomon
    ---
    Nobody goes there anymore, it's too crowded.  --Attr: Yogi Berra
    ------------------------------

    Attachment(s)

    gz
    Fragments.shar.gz   28K 1 version