SQL Server maintenance
It’s very rare that a database server completely fails, most of the time when an issue occurs you can notice a drop in terms of performance as the server runs out of disk space or operations are very slow to perform before the database becomes corrupt.
This kind of scenario shows proof as to why it’s important that besides backup plans for your database, you have set up maintenance plans.
Usually, you will have a simple operation/task that you want to run as part of your maintenance or backup plan. Most of these simple and general tasks are already available in SQL Server and can be set up through the available Maintenance Plan options.
But most of the time you are not the creator of the maintenance plan and you have just recently joined the DBA team at your organization and have to continue with their plan.
If their plan involves running custom-written SQL scripts or Windows batch scripts, there’s good news as these scripts can be run directly from SQLBackupAndFTP before and/or after, depending on how your plan is set up, the backup process is executed.
So, to add custom scripts to your backup job, open SQLBackupAndFTP and go to the “Custom scripts” section
Here you can choose what scripts do you want to run. Will it be a SQL (T-SQL) before or after the backup
or you prefer to run Windows batch scripts before or after the backup.