Raghu On Tech

Pro tips on managing data at scale

Troubleshoot Db2 Backup Issues With Veritas NetBackup

by | Mar 16, 2018 | 0 comments

Problem Statement:

So you are a database administrator and you configured your Db2 environment to send its backups to Veritas NetBackup. However your backups are failing and you are not getting enough information from the generic errors messages thrown at you by Db2. Furthermore you are not familiar with NetBackup, how do you troubleshoot Db2 backup issues with Veritas NetBackup ? If that is the case, the information I gathered while troubleshooting Db2 backup issues may be of use to you.

Problem Troubleshooting:

Why The Backup Failed ?

First of all remember that your backup’s might fail for N number of reasons. At the same time your db2diag.log should give you a good indication of why your database backups are failing in most cases. However when the backup failures are related to the vendor backup solutions such as TSM or NetBackup, Db2 will throw a -2062 SQLCODE. -2062 in it self can be caused due to a number of reasons either due to the misconfiguration on database side or NetBackup side.

Once you ruled out all the other possible causes of backup failure, you can look at a few places on the NetBackup side to see if there is a problem.

First Things First:

If this is the initial configuration of NetBackup that you are trying to make it work, then its better to start by verifying /usr/openv/netbackup/bp.conf and ${DB2HOME}/db2.conf. Ensure that there are no lines with extra white spaces etc to rule out issues with the configuration. Once this check is done you can proceed for further checks.

Check NetBackup Logs:

NetBackup stores the logs related to Db2 backup operations under “/usr/openv/netbackup/logs/user_ops/dbext/logs“. There will be multiple log files, one for each successful or failed backup operation. I will show how a log file will look up on successful backup and also output from a failed backup operation.

Successful Backup Operation:
Failed Backup Operation:

As you can see below, backup job waited in NetBackup scheduler queue for more than 15 minutes. Once its turn arrived, it waited for close to another 30 minutes before bailing out saying that NetBackup could not connect to client i.e. your Db2 server. We will see how to troubleshoot connectivity issues in the next section.

Check If your NetBackup Client Deamons Are Running:

You can easily verify the NetBackup Client daemons by querying the process table on Linux as follows or by using bpps command.


Check visibility between NetBackup and your Db2 server:

You can check if your Db2 server is able to see the NetBackup master and media servers by running the following commands. As you can see, you can check visibility using both hostname and/or IP address. If following command fails then you need to address issues with firewalls, DNS, host entries etc.


Below is how the output from “/usr/openv/netbackup/bin/bpclntcmd” will look when you run it on a hostname and ip address that you can not communicate with or does not exist.

Clear The NetBackup Cache:

In case something recently changed like configuration parameters in the /usr/openv/netbackup/bp.conf etc. you may want to clear the NetBackup cache to ensure that any unwanted entries lurking in the memory are cleared out. You can run the below command to clear out the cache.


Restart the services:

In case the clearing out of cache and any other things that you may have tried after changing parameters on the NetBackup side did not resolve your issues, you may want to try restarting of NetBackup services. Restarts can be performed in a couple of ways, either cleanly or forcefully.




  1. How To Configure DB2 To Use NetBackup ? - Raghu On Tech - […] Troubleshoot Db2 Backup Failures With Veritas NetBackup […]

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share This