sql script returns UPDATE SYSDEVICES
I'm running this statement:
declare @path varchar(255), @mydb varchar(50)
SELECT @mydb = 'timeclockplus'
select @path = 'C:\Program Files\Microsoft SQL Server\MSSQL.开发者_如何学C2\MSSQL\Backup\' + @mydb + '-' + convert(varchar(8),getdate(),112) + '.bak'
BACKUP DATABASE @mydb TO @path
and getting this error:
Msg 3206, Level 16, State 1, Line 4
No entry in sysdevices for backup device 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Backup\timeclockplus-20100714.bak'. Update sysdevices and rerun statement.
Msg 3013, Level 16, State 1, Line 4
BACKUP DATABASE is terminating abnormally.
does anyone know what is going on?
Oops
BACKUP DATABASE @mydb TO DISK = @path
精彩评论