cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup SQL always on

Maverick101
Level 4

Good day,

We have just introduces SQL AG on in our enviroment.

SQL 2016 on Server 2016

2 node cluster config.

SQL Netbackup policy created with Batch script.

Both nodes configured with the same batch file. Both nodes backup work but only the system DB's are retrieved when checking restore properties for the DB's

Any logs i am required to upload i will do so gladly.

 

Thanks in advance

 

9 REPLIES 9

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Which backup method are you using?  
Preferred replica or a policy that protects a specific node?

Can you post the script as well as dbclient log (in txt format) on both nodes?

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello,

you mean "Last Backup" in Database Properties in SQL Management Studio? Whar about scripts here, are they working?

http://www.sqlbackuprestore.com/backuprestorehistorytables.htm

Regards

Maverick101
Level 4

good day,

Please see attached dbclient file.

 

sample of our batch script below

OPERATION BACKUP
DATABASE "XXXX"
SQLHOST "XXXXX"
NBSERVER "XXXXX"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
NUMBUFS 2
ENDOPER TRUE

PREFERREDREPLICA TRUE

 

 

I have also logged a call. We were informed to restore using the windows server failover cluster name but Netbackup isnt aware of the cluster name

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Replacing everything with XXXX does not help. 

Anykind of meaningful replacement will be of better use to understand.
e.g.

DATABASE "db1"
SQLHOST "node1"
NBSERVER "master"

It seems you are not backing up $ALL, rather one-by-one dbs, right?

PREFERREDREPLICA TRUE must be specified as part of each OPERATION. So, before  ENDOPER TRUE.

OPERATION BACKUP
DATABASE "db1"
SQLHOST "node1"
NBSERVER "master"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
NUMBUFS 2
PREFERREDREPLICA TRUE
ENDOPER TRUE

We see this in the dbclient log: 

The PREFERREDREPLICA option was not specified for database <adss>. The backup will continue on the current replica.
15:32:45.922 [7888.12128] <4> CDBbackrec::ProcessAvailabilityGroupBackup: INF - Database <adss> is hosted on an Availability Group secondary replica. Converting backup to copy_only.

 

Look for IsDatabaseOnPreferredReplica in the log. We see it 3 times. Here the database is clearly skipped: 

INF - Skipping backup of availability group database <secureaudit> per configuration. The database is not hosted on the preferred backup replica.

  

Thanks Marianne,

I have seen that error though the DBA's assured me its on the preferred replica. Im not a DBA so going after their guidance. 

I have ameneded the script as you indicated but we still gettting the same error. I have a call with support and will share my findings. 

I had a customer case last year where the SQL Server environment had a bug determining the preferred replica server. Here is what I wrote then:

SQL Server is configured to back up AG databases on the replica host. NetBackup executes
dbclient on the replica host, and for each database executes a built-in stored procedure
to ask, "Is this the right host to back up this database?" For example, for database TestDB1: >select [master].[sys].fn_hadr_backup_is_preferred_replica(N'TestDB1') as PreferredReplica For most of the databases, this procedure returns 0 when it should return 1. The stored
procedure is built-in from Microsoft, and it gets the wrong answer when executed outside
of NetBackup. An internet search shows that this is not an uncommon problem.

Thanks for the responses, though the issue is still ongoing. 

The initial batch script i believe was configured incorrectly. We are trying to backup the preferred replica and our SQL host in the batch should have been the windows failover cluster which we corrected.

We are now in the situation where the backup fails with status 2 and 239 *NULL*

We are using the local system account and the NT AUTHORITY\system has sysdmin role on both SQL hosts.

19 Dec 2017 1:03:53 PM - Info dbclient (pid=9024) DBMS MSG - ODBC return code <-1>, SQL State <28000>, SQL Message <18456><[Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'sa'.>.
19 Dec 2017 1:03:53 PM - connected; connect time: 0:00:00
19 Dec 2017 1:03:54 PM - Info dbclient (pid=9024) DBMS MSG - ODBC return code <-1>, SQL State <28000>, SQL Message <18456><[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Login failed for user 'sa'.>.
19 Dec 2017 1:04:26 PM - Info dbclient (pid=9024) DBMS MSG - ODBC return code <-1>, SQL State <08001>, SQL Message <18><[Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error>.
19 Dec 2017 1:04:26 PM - Info dbclient (pid=9024) DBMS MSG - SQL Message <1><[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECCreateCredentials()).>

This makes me believe we have a permissions issue. Some guidance on this will be appreciated.

 

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Can you please post full dbclient log (as .txt)? 
Preferrably level 3 log (Veritas support prefers level 5 as they have the time and tools to analyze massive log files)

I always as SQL admins to change NBU Client service logon account to the same account used for SQL services. 
This way you are sure that there are no permission issues.