IBM Support

Perl Script to report Objectserver triggers

Technical Blog Post


Abstract

Perl Script to report Objectserver triggers

Body

This script can be used to generate a report with all the Objectserver triggers grouped by trigger status (enabled/disabled), trigger type (Insert/Reinsert/Update/Delete/temporal/signal), trigger order (before or after db action) and database table. The triggers are also sorted by their priorities.

The report is useful in investigating the enabled triggers on a certain objectserver as close as possible to their execution sequence.

The script respect the text formatting of the triggers code as it has been written during development.

You can include or exclude the triggers code from the report using "-c" option. You can also report only the enabled triggers using the -e option. The script uses the nco_sql (isql) to access the objectserver instead of using DBI perl module that might not be installed on the omnibus machine.

Usage: ./autoReport.pl [-s <Objectserver Name> -u <username> -p <password>] [-e] [-a]
Usage: -e => to only print the enabled triggers
Usage: -c => to include the triggers code in the output report
Usage: -a => to print database triggers for alert.status table only
Example: ./autoReport.pl -s NCOMS -u root -p generic -e -a

Script can be downloaded from the following link:

https://www.ibm.com/developerworks/community/wikis/form/anonymous/api/wiki/126dae6a-952b-4d6f-9640-4764cdc88150/page/b68197b0-e7d8-4c62-8fa7-1be5f74fc7d3/attachment/371e09ee-d389-4b53-ac44-374f54751ccb/media/autoReport.pl

[{"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":""}]

UID

ibm11082211