DB2 Script for Compiled Procedures from yesterday

Shell script which helps to find db2 stored procedures got compiled from the last day


It is always good to keep a track or log of all the activities that were going on in the DB server .
So What is the idea
Keep a track of all the compiled procedures from the last day
    • A Copy of  log on the server and
    • Mail the daily report to your Id with Cronjob utility
So that when somebody in your team or your manager ask you anytime this question you need not login the server and execute the query , You  have it in your inbox everyday.
This script help's you to maintain the log of all the proc's compiled for the day ,

DB2LOOK (Should be a regular habit)

Its always good that we take a copy of the db2look(often called as the the skeleton of the db) of the respective database regularly as a foresight of the disaster crash recovery .
So Why don't we make it a regular process , I mean write a script and schedule with the crontab utility which will make your job easy
Here is the script 

# What does this script do
1. Execute db2look
2. Tar the file
3. Copy to remote server
4. Remove old Files



Start Your Day With DIAGLOG

db2 diaglog error log tips and tricks
Well to start this DB2DIAG , it’s the place where all the DBA’s look for finding anything wrong or where it went wrong . So all the error’s , warning during the db operations are stored in this places .
Its a DBM CFG parameter and its /instance .
So a single instance will have a single DB2DIAGLOG file .
The default path would be