Backup Database Script

USE master;
GO

DECLARE @databaseName VARCHAR(256),
		@path VARCHAR(256),
		@date VARCHAR(50),
		@disk VARCHAR(256);

SET @databaseName = 'Singapore';
SET @path = 'C:\Office\Database\backup\';

SELECT @date = CONVERT(VARCHAR(20), GETDATE(), 112);
SELECT @disk = @path + @databaseName + '_' + @date + '.bak';

BACKUP DATABASE @databaseName TO DISK = @disk
Advertisements