We're looking at possibly using SQL Backup for our company.  We have many backup/restore procedures that require taking Production data and moving it down to non-PROD environment (UAT, DEV, etc.).  As such, after a restore is completed we need to run SQL scripts to "tweak" data.  Is there any option in SQL Backup to accommodate this?  Thanks.
      
      
      
      
      Comments
1 comment
- 
                
                   Hi @swallman, Hi @swallman,
 There are certainly ways of achieving this. If you're performing a scheduled restore then there will be a SQL Server Agent job for the restore - if you add some extra steps to it with your custom scripts then they will be executed immediately afterwards.
 If you're performing on-demand restores, then it needs slightly more thought. One option could be to use SQL Backup's extended stored procedure and create a SQL script that both performs the backup and tweaks the data afterwards. This could be a stored procedure somewhere on the server, or stored locally and run via sqlcmd for instance.
 We have a page on scripting SQL Backup that may be of interest - https://documentation.red-gate.com/sbu9/scripting-sql-backup-pro
 I hope this helps.
Add comment
Please sign in to leave a comment.