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, the 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.
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
- 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
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.
Use the same method to start all the following default monitors.
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.
Configuring a DB2 Server on Windows 2000
Here again, create the eG DB2 PerfMonitor service
Once the service is created, follow the steps given below to start the service (Steps 3-5 are to be executed for the first time only):
- Go to Control Panel > Administrative Tools -> Services
- In the list of services, click on eGDB2<port number>. For example, if 50000 is the port number, then the name of the service will be eGDB250000.
- Click the Properties button available in the Services panel to open the Service panel for the selected service.
Click on the Log On tab and choose the This Account selection.
Figure 2 : Selecting the This Account option from the Log On tab
- Enter the username of the DB2 admin user in the This Account text box and the corresponding password against the Passwordtext box.
- Confirm the password by retyping it in the Confirm password text box. Then, click on the OK button at the bottom of the panel.
- Start the selected service by clicking the Start button in the Services panel.
If the DB2 server is not configured with the performance monitors turned on, execute the command <EG_INSTALL_DIR>\lib\egdb2switch.bat.
Once the above-setup is done, manage the DB2 UDB - 6/7.x server that is auto discovered using the steps given in the Managing the DB2 UDB – 6/7.x Server.