SQLSERVER 2019 AlwaysOn and Netbackup Not working
I have a 2 node sqlserver 2019 AlwaysOn build running at the moment. I have had netbackup configured on the servers and the following parameters set in the bch file. Sensitive info has been substituted
BATCHSIZE 1
OPERATION BACKUP
OBJECTTYPE DATABASE
SQLHOST "[server_name]"
SQLINSTANCE "[instance]"
DATABASE "$ALL"
BLOCKSIZE 7
MAXTRANSFERSIZE 0
NBCLASS "bronce_i_sql_inst190_[servername]"
NBSCHED "[backup_schedule]"
NBSERVER "[backup_server]"
PREFERREDREPLICA TRUE
ENDOPER TRUE
as can be seen above, the parameter PREFERREDREPLICA TRUE is set which means the backup runs on the replica. On running the netbackup, it is partially failing. Reviewing the backup logs I am noticing that the databases which are part of the AlwaysOn replication are failing to backup. This is the error seen in the log
INF - OPERATION #3 of batch C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\bronce_i_sql_inst190_[servername].bch SUCCEEDED with STATUS 0 (0 is normal). Elapsed time = 26(1) seconds
INF - Availability group database <database_name> is hosted on the preferred backup replica.
INF - Database <database_name> is hosted on an Availability Group secondary replica. Converting backup to copy_only.
DBMS MSG - ODBC return code <-1>, SQL State <IM002>, SQL Message <0><[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified>.
USER - Unable to login into ODBC DSN <> as user <sa>
ERR - Unable to determine FILESTREAM paths for database [database_name].
INF - OPERATION #7 of batch C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\bronce_i_sql_inst190_[servername].bch FAILED with STATUS 1 (0 is normal). Elapsed time = 14(14) seconds.
INF - Results of executing <C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\bronce_i_sql_inst190_[servername].bch>:
<4> operations succeeded. <3> operations failed.
INF - The following object(s) were not backed up successfully.
INF - [database_name]
we have a similar setup in our environment for sqlserver 2016 AlwaysOn with the same parameters set in the bch file and the backups work. Can anyone shed any light what is causing this issue?