Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

SQL '05 Backup + %Date%

$
0
0
Hello,

I have question regarding backup SQL'05.
Please look ta my script :

sqlcmd -S srv_name -U sa -P pass -Q "BACKUP DATABASE Database_name TO DISK = 'D:\Backup\%date%_Database_name.bak' WITH NAME = 'Database_name_backup', FORMAT"

If i remove %Date% backup process will be completed successfully. But with %Date% I ahve folowing error:

Cannot open backup device 'D:\Backup\%date%_Database_name.bak' Date is repleaced by system time...

Please tell me what is wrong...

Thx for help
michal

Viewing all articles
Browse latest Browse all 13329

Trending Articles