Tuesday, March 17, 2009

Backup Database script

Below script describe how to backup database and output file include current date


DECLARE @filename NVARCHAR ( 500 )
SET @filename = 'C:\ABC_' + CONVERT(NVARCHAR, GETDATE(),112) + '.BAK'
BACKUP DATABASE ABC TO DISK = @filename


Happy code ;)

No comments:

Data Governance Learning Plan

Seven courses to build the knowledge of Data Governance Program ( planning & establishment ) by Kelle O'Neal with 100 MCQs Exam 1....