olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 756 forks source link

AG backups. skip database part of same AG doesn't work. #788

Open logicinside22 opened 11 months ago

logicinside22 commented 11 months ago

Description of the issue Script by default backups all database in AG But when need to skip the backup which are in same AG it doesn't work. I have AG name AG1 and db1,db2,db3,db4,db5 are part of AG1. If I want to skip the db3 & db5 from AG1 Backup it doesn't work.

SQL Server version and edition Execute SELECT @@VERSION

Version of the script Check the header of the stored procedure Jan 2022 version.

What command are you executing? EXECUTE dbo.DatabaseBackup @AvailabilityGroups ='AG1, -db3, -db5'

What output are you getting? Script still backup all Databases part of AG1 including db3 & db5.

olahallengren commented 3 weeks ago

At the moment it is not possible to exclude databases from an availability group. It is a good idea though. :-)

This is a general limitation, that is not specific to EMC Data Domain.