Blog Archives

Backup all databases using Backup-SqlDatabase cmdlet


Launch SSMS Right click on databases node, Select Menu item “Start PowerShell” Type in following command to backup all databases to Default backup folder dir |  Backup-SqlDatabase     Databases are backed up to Default backup folder  

Posted in Backup, Scripting, SQL Power shell, SQL Server

Scripting database using Smo.Scripter


You can automate script generation using SMO and power shell using the following power shell script. Script generated would be similar to the script generated using “Generate Script Wizard” in ssms You can download script from here This posting is

Tagged with:
Posted in Scripting, SQL Power shell, SQL Server