olahallengren / sql-server-maintenance-solution

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

Please add Backup_Promotion parameter to Data Domain Backups #464

Closed vijaygopal1216 closed 3 years ago

vijaygopal1216 commented 3 years ago

Request : - Please add a new parameter to backups stored procedure "DatabaseBackup" for avoiding backup promotion (Data Domain terminology for log backups to be converted to full backups) in the case of log backups after a failover in AG.

How I could avoid this auto backup promotion scenario : - I added a new default input parameter @DataDomainBoost_BACKUP_PROMOTION nvarchar(max) = 'Y' in your script and used the following statement in the 'DATA_DOMAIN_BOOST' section IF @DataDomainBoost_BACKUP_PROMOTION = 'N' SET @CurrentCommand += ' -a "BACKUP_PROMOTION=NONE"'

Script version : - 2020-01-26 14:06:53

How the Data Domain script should look like : - DECLARE @ReturnCode int EXEC @ReturnCode = dbo.emc_run_backup ' -c ServerName-l full -y +30d -S 1 -a "NSR_DFA_SI_DD_HOST=DD_Host_details" -a "NSR_DFA_SI_DD_USER=DD_User_Details" -a "NSR_DFA_SI_DEVICE_PATH=/DD_Device_Path" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=Z:\lockbox\location" -a "NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" -a "NSR_COPY_ONLY=TRUE" -a "BACKUP_PROMOTION=NONE" "MSSQL:DB_IN_AG"' IF @ReturnCode <> 0 RAISERROR('Error performing Data Domain Boost backup.', 16, 1)

Thank you, Sree Kandula

olahallengren commented 3 years ago

@vijaygopal1216, thank you for your feedback on this.

I am thinking that I have a parameter for changing the backup type and logic for that. https://ola.hallengren.com/sql-server-backup.html#ChangeBackupType

Maybe I could just set BACKUP_PROMOTION=NONE, with no additional parameter?

vijaygopal1216 commented 3 years ago

Yeah, I believe that will do.

If you just add the following statement when you are preparing backup script for Data Domain, we should be good.

SET @CurrentCommand += ' -a "BACKUP_PROMOTION=NONE"'

Thank you for looking into it.

Sree Kandula

olahallengren commented 3 years ago

I have added this now. https://ola.hallengren.com/versions.html