How to Configure and Monitor DB2 UDB Server – Version 6/7.x Using eG Enterprise?
To assure backward compatibility with older, less-used DB2 versions, eG retains the monitoring model for DB2 Server 6.0/7.X versions. To configure the DB2 UDB server 6/7.x versions to work with the eG Agent, a set of pre-requisites should be fulfilled. These requirements are explained in the following section.
Configuring a DB2 Server 6.0/7.X to work with the eG Agent
This section discusses about how to configure DB2 Server 6.0/7.X versions on Unix and Windows environments.
Configuring a DB2 Server on Unix Environments
- To monitor a specific DB2 instance on Unix environments, login as the owner of the database instance and go to the /opt/egurkha/bin directory. From this directory, run the start_egdb2mon script. This script, checks the default monitors of the DB2 server that are required by eG agents for monitoring this database server.
-
If the DB2 default monitors are not started (by default, they will not be started), then the start_egdb2mon script generates the messages as shown in Figure 1
Figure 1 : Messages indicating that the default monitors have not been turned on
- Now, use the script egdb2monswitch from the directory /opt/egurkha/bin, to switch on all the necessary default monitors. This script can be run only by the DB2 instance owner.
-
Alternately, the same can be manually achieved by issuing the following commands at the command prompt:
[db2inst1@lin15 bin]$ db2 update database manager config using DFT_MON_BUFPOOL on
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
DB21025I Client changes will not be effective until the next time the
application is started or the TERMINATE command has been issued. Server
changes will not be effective until the next DB2START command.
[db2inst1@lin15 bin]$
-
Use the same method to start all the following default monitors.
- DFT_MON_BUFPOOL
- DFT_MON_LOCK
- DFT_MON_TABLE
- DFT_MON_UOW
- DFT_MON_SORT
- DFT_MON_STMT
After all the default monitors have been started, remember to restart the database or else the changes will not take effect.
To stop the DB2 instance, issue the command db2stop. To restart the instance, use the command db2start at the command prompt. These can normally be found under the $INSTANCE/sqllib/adm directory of the instance that is being monitored.
- Sometimes, the DB2 database may not stop completely and instead, may send out a message stating that as some applications are already active, the DB2 instance could not be stopped. In that case, make sure that every required action is complete in that instance and then issue the following command to force the shutdown: db2 force application all
- Now, try stopping the database and restart it. This will ensure that the DB2 Server has been completely configured to work with eG.