Monday, August 22, 2011

SQL Backup Script

To create a simple backup job by using SQL Server Agent in MS SQL Server Management Studio

DECLARE @BackupPath VARCHAR(100)

SET @BackupPath = '\\<UNC Path>\PM_' + CONVERT(VARCHAR, GETDATE(), 112) + '.bak'

BACKUP DATABASE [<database_name>]

TO DISK = @BackupPath
GO

 

No comments:

Post a Comment

Azure MFA NPS extension stopped working due to expired certification

 Users complained they were unable to log in VMware Horizon Client portal and the logon stuck at "Authenticating...." screen. So I...