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

What happened if the Security Default is turned off in Microsoft Entra?

No need to worry about turning off Security Default in Microsoft Entra ID because Microsoft will automatically create 4 managed conditiaiona...