cancel
Showing results for 
Search instead for 
Did you mean: 

NB_SQL_DATABASE_EXCLUDE not work

acidborn60
Level 4

Hello All!

NetBackup 7.1

I have 2 policy on sql server. For full backup and log backup.

On client have two files:

\\vsqlf29\c$\Program Files\Veritas\NetBackup\DbExt\MsSql\backup_full.bch

contains:

BATCHSIZE 6
OPERATION BACKUP
DATABASE $ALL
SQLHOST "vsqlf29"
NBSERVER "NBUCL"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
RETRYTYPE AUTO
RETRYWAITSECONDS 60
NUMRETRIES 1
NUMBUFS 2
ENDOPER TRUE

\\vsqlf29\c$\Program Files\Veritas\NetBackup\DbExt\MsSql\backup_log.bch

BATCHSIZE 6
OPERATION BACKUP
DATABASE $ALL
SQLHOST "vsqlf29"
NBSERVER "NBUCL"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
OBJECTTYPE TRXLOG
NUMBUFS 2
RETRYTYPE AUTO
RETRYWAITSECONDS 60
NUMRETRIES 1
ENDOPER TRUE

Full backup worked without errors, log backup worked with errors:

01.09.2011 11:16:00 - Info dbclient(pid=1980) USER - Operation inhibited by NetBackup for Microsoft SQL Server: Only a full backup can be performed on the master database.
01.09.2011 11:16:01 - Info dbclient(pid=1980) INF - OPERATION #1 of batch C:\Program Files\Veritas\NetBackup\dbext\mssql\temp\0-2492-1468backup_log[0].bch FAILED with STATUS 1 (0 is normal). Elapsed time = 2(2) seconds.
01.09.2011 11:16:10 - Info dbclient(pid=1980) USER - Operation inhibited by NetBackup for Microsoft SQL Server: Only a full or incremental database backup can be performed on database <msdb> because it uses the simple recovery model or has 'truncate log on checkpoint' set.
01.09.2011 11:16:23 - Info dbclient(pid=1980) INF - The following object(s) were not backed up successfully.   
01.09.2011 11:16:24 - Info dbclient(pid=1980) INF - master          
01.09.2011 11:16:24 - Info dbclient(pid=1980) INF - msdb

I create file NB_SQL_DATABASE_EXCLUDE  here \\vsqlf29\c$\Program Files\Veritas\NetBackup\DbExt\MsSql\

This file contains text:

master;msdb

Later i restart net backup client on sql server and try start log backup, but backup job contains error:

Info dbclient(pid=1980) INF - The following object(s) were not backed up successfully.   
Info dbclient(pid=1980) INF - master          
Info dbclient(pid=1980) INF - msdb

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

It's a Windows function....

Right-click on 'My Computer' select 'Properties'.
Click on 'Advanced System Settings' then 'Environment Variables'

Steps might be slightly different for the various Windows versions.

 

Instead of Environment Variables, consider adding EXCLUDE <database> to the backup_log.bch script.  Have a look at this section in the manual:

You can exclude the databases "master," "accounting," and "pubs" with the
NB_SQL_DATABASE_EXCLUDE environmental variable. For the value of the
variable, indicate the databases you want to exclude. Separate the database names
with semi-colons.
MASTER;ACCOUNTING;PUBS
The NB_SQL_DATABASE_EXCLUDE variable is applicable only for a batch file
that has DATABASE $ALL. It performs the same function as the keyword and
value pair EXCLUDE <database>. If both variables are used, they augment each
other to determine which databases to exclude.

 

See NBU for Microsoft SQL Server Admin Guide  http://www.symantec.com/docs/DOC3670  for more info.

View solution in original post

5 REPLIES 5

jim_dalton
Level 6

The doc states creating an ENV VARIABLE with the excludes in but you've created a file. I've not seen a reference to creating a file, but am happy to be proved wrong.

Jim

acidborn60
Level 4

Ok, how to create variable?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

It's a Windows function....

Right-click on 'My Computer' select 'Properties'.
Click on 'Advanced System Settings' then 'Environment Variables'

Steps might be slightly different for the various Windows versions.

 

Instead of Environment Variables, consider adding EXCLUDE <database> to the backup_log.bch script.  Have a look at this section in the manual:

You can exclude the databases "master," "accounting," and "pubs" with the
NB_SQL_DATABASE_EXCLUDE environmental variable. For the value of the
variable, indicate the databases you want to exclude. Separate the database names
with semi-colons.
MASTER;ACCOUNTING;PUBS
The NB_SQL_DATABASE_EXCLUDE variable is applicable only for a batch file
that has DATABASE $ALL. It performs the same function as the keyword and
value pair EXCLUDE <database>. If both variables are used, they augment each
other to determine which databases to exclude.

 

See NBU for Microsoft SQL Server Admin Guide  http://www.symantec.com/docs/DOC3670  for more info.

jim_dalton
Level 6

I was robbed! Surely thats my solution, not MVDBs. Referee...!

Will_Restore
Level 6

smiley