1) Use the Database Maint. Planner in Enterprise Manager. It will auto-assign the sysdate to the backup name.
2) Use Dynamic SQL (which may or may not cause speed issues on your machine).
The dynamic SQL way would be as follows:
Code:
Declare @BackupDate DateTime,
@BackupName varchar(50)
Set @BackupDate = GetDate()
Set @BackupName = 'F:\backupdata\data' + @BackupDate + '.bak'
Backup database DATA_W1 to disk = @BackupName with init skip
Usually, doing your backup with T-SQL doesn't allow the assignment of a system date to the backup name.
Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.