Automate backup on SQL Express and Send Mail Powershell Script

sql express backup

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”

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)

sqlcmd -U sa -P xxxx -S .\SQL2012EXPRESS -Q “EXEC sp_SQLBackupDatabases @backupLocation = ‘C:\SQLBackups\’, @backupType = ‘F’”

Original Microsoft Solution:

MSDN Post Link
Download link

Share and Enjoy !


2 thoughts on “Automate backup on SQL Express and Send Mail Powershell Script

Leave a Reply to Roberto Stefanetti Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.