cancel
Showing results for 
Search instead for 
Did you mean: 

DB2 Backup Scripts Runs Once Only

geelsu
Level 3

NetBackup Server (Win Server 2008 R2 Enterprise, NetBackup V7.7.2)

NetBackup Client (Win Server 2008 R2 Enterprise, NetBackup V7.7.2, DB2 V10.1)

We are converting our DB2 Backups to write directly to NetBackup. I have a PowerShell scripts that backs up the databases. Here is the command line that is used to back up the databases:

DB2 BACKUP DATABASE $dbName ONLINE LOAD 'C:\Program Files\Veritas\NetBackup\bin\nbdb2.dll' WITHOUT PROMPTING


Here's the problem.  This command works properly the first time only.  We have to reboot the system to get it to run again.  It will never run on subseqent attempts after the first run of the script.  

Here's the error I get on the second attempt after the completion of the first successful attempt.

SQL2062N An error occurred while accessing media "C:\Progra~1\Veritas\NetBackup\bin\nbdb2.dll".  Reason code: 513

I'm testing this command in a WIndows command prompt as the DB2 admin user.  There is some sort of problem with the DLL after it gets loaded the first time. 

Anyone seen this before?

Thanks

4 REPLIES 4

Marianne
Level 6
Partner    VIP    Accredited Certified

Any chance there are more than one IP address on the client that is linked to the same hostname?

What does 'bpclntcmd -self' show on the client?
And 'bpclntcmd -pn' before successful backup attempt and again before failed attempt?

 

Marianne .... The DB Admin is due in today who is having this issue.  I, hopefully, will be able to provide you some feedback this afternoon.

CDV
Level 1
Partner Certified

I was with this customer today.  The problem seems to be related to a large number (300+) of backups that predated NetBackup and weren't cleaned up.  Other backups without this issue are backing up fine.  The dba is going to try to remove them to see if that resolves the problem.

Confirmed.  From our DBA, "The problem was caused by DB2 backup history which wasn't being purged properly for certain databases and caused the errors in the DLL that processes the backups for Netbackup." 

The DB2 configuration was set to purge the databases starting at the 7th oldest, keeping 6 in the history.  However the failing databases were showing as many as 200+ in the history of one database alone.  These were some older databases that had been through a couple of upgrades, patches, etc on the system.  Newer databases created after the upgrades, patches, etc were not having this issue.  We are not sure if Netbackup was trying to satisfy its retention period again the history backups which did not exist in its catalog.

I will query the DB2 DBA and see if there is more to add.