Sql Server Backup Automation and send-email
Solution to automate backup on SQL Express and send mail based on first Microsoft SQL BackupScript “sp_SQLBackupDatabases”
Scheduling
NB: SQL Server Agent “is not available” on this SQL release
You can schedule jobs with standard “Windows Jobs“ !
How System Works:
3 Objectsd based procedure:
1) batch file > SQL-Backup.bat (Execute ALL Procedure)
2) backup procedure > SP_SQLBackupDatabase.sql (original Microsoft SQL Backup Script)
3) Send mail > Send-email.ps1 (a send email routine based on Powershell Script)
Example:
sqlcmd -U sa -P xxxx -S .\SQL2012EXPRESS -Q “EXEC sp_SQLBackupDatabases @backupLocation = ‘C:\SQLBackups\’, @backupType = ‘F’”
Original Microsoft Solution: https://support.microsoft.com/en-us/kb/2019698
Comments
Post a Comment