When a large number of databases are enumerated in an SQL batch file, or when the "DATABASE $ALL" wildcard is used to enumerate a large number of databases, some databases are skipped and not all databases are backed up. No failure is reported in the Activity Monitor. (updated December 18, 2009)

Article:TECH73702  |  Created: 2009-01-19  |  Updated: 2010-09-07  |  Article URL http://www.symantec.com/docs/TECH73702
NOTE: If you are experiencing this particular known issue, we recommend that you Subscribe to receive email notification each time this article is updated. Subscribers will be the first to learn about any releases, status changes, workarounds or decisions made.
Article Type
Technical Solution

Product(s)

Environment

Problem



When a large number of databases are enumerated in an SQL batch file, or when the "DATABASE $ALL" wildcard is used to enumerate a large number of databases, some databases are skipped and not all databases are backed up. No failure is reported in the Activity Monitor. (updated December 18, 2009)


Solution



Introduction:
When backing up a large number of databases using the NetBackup for Microsoft SQL Server agent, it has been seen that backups occasionally complete and report success (status code 0 in the Activity Monitor); however, not every database enumerated in the batch file is backed up.  This has been seen both when the $ALL wildcard is used with to define the DATABASE keyword ("DATABASE $ALL" directive specified within batch file), as well as when a large number of databases have been manually enumerated within the batch file through the use of multiple DATABASE keywords.

What is Affected:
The following versions are affected on all applicable operating systems:
 
  • NetBackup for Microsoft SQL Server 6.5 through 6.5.5
Note: Although this issue affects all versions listed above, it has most often been reported in NetBackup 6.5.4 and appears to much more frequently manifest itself when running that version.  Earlier versions may still be affected, however.

How to Determine if Affected:
Upon completion of the backup, the number of databases which were backed up should be compared with either the number of databases defined in the batch file - or, if the wild card is used, the actual number of databases that exist on the client.

To determine the actual number of SQL databases that exist on the client, run the following query in Microsoft SQL:
select count(*) from sysdatabases

In the example below, a result of 6 is returned:
 

By design, the tempDB is not backed up, so decrease this number by one to obtain the actual number which should be backed up.

To determine the number of databases backed up, launch the NetBackup Microsoft SQL Client GUI on the client and examine the backup job:
 
  • Click on File > View Status.
  • Highlight the backup job.
  • Check the Verbose checkbox and scroll to the bottom of the Progress pane to find the <#> operations succeeded message:
In this example, the correct number of databases - five - have been backed up:
 

Similarly, messages similar to the following can be found in the client's dbclient logs:
02:00:23.675 [3824.8568] <4> CDBbackmain::dbbackup: INF - Results of executing <C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\test_sql_full_all.bch>: <23> operations succeeded. <0> operations failed.

dbclient logs can be found in the <install_path>\VERITAS\NetBackup\logs\dbclient folder.  If it does not exist, it will need to be created.

If the number of databases in the <#> operations succeeded message isn't what was expected (does not match the known number of databases), the client has been affected by this issue.

Formal Resolution:
The formal resolution to this issue (Etrack 1822263) will be included in the following release:
 
  • NetBackup 6.5 Release Update 6 (6.5.6), scheduled for release during the second quarter of 2010.
Workaround:
A fix for this issue for NetBackup 6.5.5 can be obtained by accessing this TechFile:
 http://support.veritas.com/docs/330184

For NetBackup 6.5.4 and earlier:

The following procedure has been seen to greatly reduce the possibility for this issue to occur:
Add the BATCHSIZE <#> directive to the batch file, using a value equal to or less than the number of databases listed in the batch file, or the number that would be enumerated by use of the DATABASE $ALL directive.  The NetBackup 6.5 for Microsoft SQL Administrator's Guide (linked below) recommends a value for BATCHSIZE in the range between 1-10, but this value may be set as high as 32.  When not set, this value defaults to 1.

Another workaround for this issue is to break up large backup jobs into smaller jobs handling less databases.

If these workarounds are not feasible, please contact Symantec Technical Support, referencing this document ID and Etrack 1822263 to obtain a fix for this issue.

Best Practices:
Symantec strongly recommends the following best practices:
1. Always perform a full backup prior to, and after any changes to the NetBackup environment.
2. Always make sure the NetBackup environment is running the latest version and patch level.
3. Perform periodic "test" restores.
4. Subscribe to technical articles.

How to Subscribe to Email Notification:
Directly to this Article:
Subscribe to this TechNote for any updates which are made to this article by clicking on the following link:
 http://maillist.support.veritas.com/notification.asp?doc=330033

Software Alerts:
If this technical information has not been received from the Symantec Technical Support Email Notification Service, please click on the following link to subscribe to future notifications:
 http://maillist.entsupport.symantec.com/subscribe.asp





 

Supplemental Materials

Value1822263
Description

Potential data loss. Use of DATABASE $ALL in SQL batch files on NBU 6.5.4 results in databases being "silently" skipped.



Legacy ID



330033


Article URL http://www.symantec.com/docs/TECH73702


Terms of use for this information are found in Legal Notices