08-29-2017 12:38 PM
Hi All;
I have sql backup job failed because some sql database are "offline state", this backup policy is using tran script to backup sql database. What option can I exclude these database offline state to script ?
sql backup script :
SQLINSTANCE $ALL
OPERATION BACKUP
DATABASE $ALL
NBSERVER "xxxxx02"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
OBJECTTYPE TRXLOG
NUMBUFS 2
ENDOPER TRUE
Thank you
Tom
Solved! Go to Solution.
08-29-2017 04:57 PM
Try EXCLUDE <Database_Name> in script, For example, name of database is DATABASE1 then use the below script and check if the backup is working fine.
SQLINSTANCE $ALL OPERATION BACKUP EXCLUDE DATABASE1 DATABASE $ALL NBSERVER "xxxxx02" MAXTRANSFERSIZE 6 BLOCKSIZE 7 OBJECTTYPE TRXLOG NUMBUFS 2 ENDOPER TRUE
08-30-2017 02:29 AM
Hello,
with script-based backups, you cannot simply exclude all offline databases with one phrase/keyword. You must name these databases explicitly. If you are on 7.7 client or above, you can use Intelligent MS SQL policies, which have attribute for this - Skip unavailable databases.
Rgds
Michal
08-29-2017 04:57 PM
Try EXCLUDE <Database_Name> in script, For example, name of database is DATABASE1 then use the below script and check if the backup is working fine.
SQLINSTANCE $ALL OPERATION BACKUP EXCLUDE DATABASE1 DATABASE $ALL NBSERVER "xxxxx02" MAXTRANSFERSIZE 6 BLOCKSIZE 7 OBJECTTYPE TRXLOG NUMBUFS 2 ENDOPER TRUE
08-30-2017 02:29 AM
Hello,
with script-based backups, you cannot simply exclude all offline databases with one phrase/keyword. You must name these databases explicitly. If you are on 7.7 client or above, you can use Intelligent MS SQL policies, which have attribute for this - Skip unavailable databases.
Rgds
Michal
08-31-2017 09:53 AM
I think I will moveto SQL intelligent policy, that allows me to exclude state "offline", thank you everyone.