Skip to main content

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”
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

Popular posts from this blog

The Difference Between Microsoft Dynamics NAV and AX

The Difference Between Microsoft Dynamics NAV and AX Microsoft Dynamics offers a variety of ERP solutions. You might say there is a solution for every purpose and every industry. Two of the offerings,  Dynamics NAV  and  Dynamics AX (now part of  Dynamics 365 ) share some of the same features so you might wonder: ‘what are the differences and which is right for my organization?’ Both ERP solutions are highly customizable, available in and adaptable to many languages and currencies used around the world. The two solutions can also be employed in a central location or across diverse satellite locations and are designed to grow as a business grows. Their industry-specific functionality can assure compliance with local and regional requirements. In short, both solutions could rightly be described as comprehensive and well equipped to manage complex requirements of supply chain and inventory. So, what is the difference? Is one better than the other for your...

Purchases and Direct Cost Applied Accounts in Microsoft Dynamics NAV

Purchases and Direct Cost Applied Accounts in Microsoft Dynamics NAV When working on new Dynamics NAV implementations (and for that matter, existing NAV solutions), we get a lot of questions about the Purchases and Direct Cost Applied Accounts—namely, what are they used for? We were trained in accounting that, when an inventory purchase receipt is invoiced (vouchered), we would debit the Inventory Account and credit the Accounts Payable Account and be done with it. Dynamics NAV doesn’t handle it that way. When we look at the General Posting Setup in Dynamics NAV 2013 (see below), we see that there is a column for the Purchases Account and the Direct Cost Applied Account. Figure 1 - General Posting Setup in Dynamics NAV 2013 When a purchase receipt is invoiced (vouchered) in NAV, we get the following General Ledger entries: Dr Purchases Account for the Actual Invoice Amount Cr Accounts Payable Account for the Actual Invoice Amount Dr Inventory Account for the Ac...

Microsoft Dynamics Nav 2018, Hint for the Developers

Microsoft Dynamics Nav 2018, Hint for the developers What‘s the most important for Developers? With every new Dynamics NAV version, NAV Developers have to learn new things and adapt to new rules. With Dynamics NAV 2018 developers should: Start using/learning Visual Studio code as Dynamics NAV development will migrate to it from old C/SIDE. Start using events & subscription & Events. By analyzing all the given material from Microsoft and their presentation during key conferences, the future of Dynamics NAV is the cloud, VS Code, customization with events & web client. Now it‘s time to touch in reality the Dynamics NAV 2018 and share with You our insights in upcoming blog posts. Interested in professional Dynamics NAV Upgrade Service? – Submit the form below and we will help to boost Your Microsoft Dynamics NAV services!