-Q "BACKUP DATABASE main TO DISK = 'c:\Program Files\Microsoft Retail Management System\Backup\Backup-' + str(year(getdate())) + str(month(getdate())) + str(day(getdate())) '.bck' WITH FORMAT, STATS" Msg 170, Level 15, State 1, Server TCS50, Line 1 Line 1: Incorrect syntax near '+'.
A
Antonio Mazzeo
"Gerd" ha scritto nel messaggio news:% snipped-for-privacy@TK2MSFTNGP10.phx.gbl...
BACKUP DTABASE yourdbname TO DISK = 'yourpath\backupdb_' + str(year(getdate())) + str(month(getdate())) + str(day(getdate())) + str(datepart(hh,getdate()))+str(mi(getdate()))+str(datepart(ss,getdate())) '.bck'
A
Antonio Mazzeo
"Gerd" ha scritto nel messaggio news: snipped-for-privacy@tk2msftngp13.phx.gbl...
BACKUP DATABASE main TO DISK = @fullpath WITH FORMAT, STATS
sorry for my error antonio
G
Gerd
Hi Antonio,
could I bother you again. I made the changes you specified but now I get the following error message:
C:\Program Files\Microsoft Retail Management System>OSQL -U sa -P password -S TCS50 -Q "BACKUP DATABASE main TO DISK = @fullpath WITH FORMAT, STATS" Msg 137, Level 15, State 2, Server TCS50, Line 1