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

Solution: The size of the extent is less than the minimum in VMware

 I ran out the C drive space in a Windows 10 virtual machine in VMware. However, after adding additional free disk space, the "Extend&q...