skip to Main Content

I have one virtual server running on centos7. I configure it for the Nagios monitoring tool. I created the config file etc. I have 9 DB instances. When I migrated the DB config file with Nagios(adding to the Nagios )

I saw this error code on http://mysiteipaddr/nagios

CRITICAL – cannot connect to db.ipaddress.com. install_driver(DB2) failed: Can’t locate DBD/DB2.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 10) line 3.

After this error, I realize the DB2 is not installed on my machine. I’ve installed the DB2 drivers and when I execute this command I’m facing this output.

 db2ls
-------------------------------------------------------------------------------------------------------------------
/opt/ibm/db2/V9.7                11.1.1.1        1                            Fri Jan 31 11:33:28 2020 +03             0
[root@backup ~]# 

But when I want to execute DB2 command like db2start, db2stop, db2status, it won’t execute and I got this error code.

bash: db2stop: command not found 
bash: db2start:command not found

3

Answers


  1. Do you have an instance created? run /opt/ibm/db2/V9.7/instance/db2ilist

    Login or Signup to reply.
  2. Please check the folder /home/tobe/sqllib/adm for db2start and db2stop commands. You can also define an alias if you want to call them directly.

    Login or Signup to reply.
  3. Install below package in all of the instances:

    yum -y install perl-CPAN

    hope so this will be helpful for you….!!!!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search