开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜