使用查询在 sql server 中创建备份时出现以下错误?
我有一个名为学生的数据库。为此,我可以使用工具备份创建数据库。但我无法使用查询创建。
use students
go
backup database students to disk = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup' with format, medianame = 'test',name = 'back up of the student database'
go
这样做时我收到以下错误。 有人可以帮助我解决这个问题吗? 谢谢大家/......
消息 3201,级别 16,状态 1,第 1 行 无法打开备份设备“C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup”。操作系统错误 5(访问被拒绝。)。 消息 3013,16 级,状态 1,第 1 行 备份数据库异常终止。
i have a database named students. for that i can able to create the database using the tool backup. but i am not able to create using the query.
use students
go
backup database students to disk = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup' with format, medianame = 'test',name = 'back up of the student database'
go
while doing this i am getting the following errror.
could any one help me in this issue?
thank you all/......
Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup'. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要指定备份的文件名
,例如
`TO DISK='C:\Backups\BackupFile.BAK'
有关选项的完整说明,请参阅 MSDN
You need to specify the filename of the backup
e.g
`TO DISK='C:\Backups\BackupFile.BAK'
See MSDN for a full description of options