Symantec NetBackup SQL agent issues

Finally managed to get this working today after much struggling (and trying not to have to wade through the 200-odd pages of not-easy-to-read NetBackup for SQL Server Administrator’s guide).

So, I installed the NetBackup client, patched to version 7.1.0.4 and fired up the NetBackup MS SQL Client GUI on the server (window title bar shows NetBackup Database Extension once open). I’d previously created an Active Directory account and given it a login on the SQL server as a sysadmin. I filled out the SQL Server connection properties:

Host: SQLServerName
Instance: MYINSTANCE
Userid: rcmtech\svc-nbu-sql

I created a NetBackup policy and added the server to it. From the NetBackup GUI on the SQL Server I was then able to successfully backup a database (though I wasn’t able to get the transaction log option to show through the GUI – but it worked when I created a NetBackup batch file).

Then I tried to run a backup by initiating the job from the NetBackup Administration Console on the Master server. The backup failed. I got the following in the activity monitor Detailed Status tab for the job:

13/08/2012 17:27:59 - Info dbclient(pid=40444) INF - BACKUP STARTED USING        
13/08/2012 17:27:59 - Info dbclient(pid=40444) Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)     
13/08/2012 17:27:59 - Info dbclient(pid=40444) Sep 16 2010 19:43:16         
13/08/2012 17:27:59 - Info dbclient(pid=40444) Copyright (c) 1988-2008 Microsoft Corporation        
13/08/2012 17:27:59 - Info dbclient(pid=40444) Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) 
13/08/2012 17:27:59 - Info dbclient(pid=40444) Batch = C:\Program Files\Veritas\NetBackup\DbExt\MsSql\AllDB.bch, Op# = 11      
13/08/2012 17:27:59 - Info dbclient(pid=40444) INF - Using backup image RCMSQLSERVER.MSSQL7.RCMSQLSERVER\MYINSTANCE.db.msdb.~.0.001of001.20120813172758..C       
13/08/2012 17:27:59 - Info dbclient(pid=40444) INF - backup database "msdb" to VIRTUAL_DEVICE='VNBU0-40444-39280-1344875279' with  stats = 10, blocksize = 512, maxtransfersize = 65536, buffercount = 1
13/08/2012 17:27:59 - Info dbclient(pid=40444) INF - Number of stripes: 1, Number of buffers per stripe 1. 
13/08/2012 17:27:59 - Info dbclient(pid=40444) INF - Created VDI object for SQL Server instance <MYINSTANCE>. Connection timeout is <300> seconds.
13/08/2012 17:32:59 - Info dbclient(pid=40444) ERR - Error in GetConfiguration: 0x80770003.       
13/08/2012 17:32:59 - Info dbclient(pid=40444)     CONTINUATION: - The api was waiting and the timeout interval had elapsed.
13/08/2012 17:32:59 - Info dbclient(pid=40444) DBMS MSG - ODBC return code <-1>, SQL State <37000>, SQL Message <3265><[Microsoft][SQL Native Client][SQL Server]The login has insufficient authority. Membership of the sysadmin role is required to use VIRTUAL_DEVICE with BACKUP or RESTORE.>.
13/08/2012 17:32:59 - Info dbclient(pid=40444) DBMS MSG - SQL Message <3013><[Microsoft][SQL Native Client][SQL Server]BACKUP DATABASE is terminating abnormally.>
13/08/2012 17:32:59 - Info dbclient(pid=40444) ERR - Error found executing <backup database "msdb" to VIRTUAL_DEVICE='VNBU0-40444-39280-1344875279' with  stats = 10, blocksize = 512, maxtransfersize = 65536, buffercount = 1>.
13/08/2012 17:33:01 - Info dbclient(pid=40444) ERR - Error in VDS->Close: 0x80770004.       
13/08/2012 17:33:01 - Info dbclient(pid=40444)     CONTINUATION: - An abort request is preventing anything except termination actions.
13/08/2012 17:33:01 - Info dbclient(pid=40444) INF - OPERATION #11 of batch C:\Program Files\Veritas\NetBackup\DbExt\MsSql\AllDB.bch FAILED with STATUS 1 (0 is normal). Elapsed time = 304(304) seconds.

I finally managed to get it to work by doing the following:

  • Changed the NetBackup Client Service to run as the Active Directory account I’d made sysadmin
  • Made that account a member of the local Administrators group on the SQL server

The NetBackup batch files I’m using are as follows:

DBAll.bch:

SQLINSTANCE $ALL
OPERATION BACKUP
DATABASE $ALL
SQLHOST "RCMSQLSERVER"
NBSERVER "RCMNBUMASTER"
MAXTRANSFERSIZE 0
BLOCKSIZE 0
ENDOPER TRUE

TransAll.bch:

OPERATION BACKUP
DATABASE $ALL
SQLHOST "RCMSQLSEREVER"
SQLINSTANCE $ALL
NBSERVER "RCMNBUMASTER"
MAXTRANSFERSIZE 0
BLOCKSIZE 0
OBJECTTYPE TRXLOG
ENDOPER TRUE

On a more general note, it’s a good plan to put these batch files into a uniform location on all your SQL servers as it allows you to use the same policy to backup multiple SQL servers – you define the batch file path on a per-policy basis.

This entry was posted in NetBackup and tagged , , , , , , . Bookmark the permalink.

One Response to Symantec NetBackup SQL agent issues

  1. Hi Robin,
    Thank you for sharing this. It is crucial to hear feedback (both positive and negative) from the administrators like you. As you may already know, Symantec is taking major steps in making the life easy for database administrators. We started this with Intelligent Policies for Oracle in NetBackup 7.6. Stay tuned.

    Warm regards,

    Rasheed

    Disclaimer: I work for Symantec. But my responses in non-official channels are my own opinions.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s