SQL Server 2005 Express:备份到网络上的文件夹
我将此代码用作应用程序的过程。午夜时分,它将触发该程序。
http://www.geekzilla.co.uk/View487F82A5-C96B-4660-A070-F7C8B7FC4431.htm
我将此本地备份更改
TO DISK = N''c:\db backup\'
为:
TO DISK = N''\\nlbkserver02\backup_devicem01$\'
它在本地计算机上正常工作,但在网络驱动器上不起作用。错误详细信息如下:
Cannot open backup device
'\\nlbkserver02\backup_devicem01$\15-Dec-2010
- application 1'. Operating system error 5(error not found). BACKUP
DATABASE is terminating abnormally.
有人能给我建议吗?
提前致谢。
I am using this code as a procedure on an application. At the mid-night, it will trigger the procedure.
http://www.geekzilla.co.uk/View487F82A5-C96B-4660-A070-F7C8B7FC4431.htm
I changed this locally back-up:
TO DISK = N''c:\db backup\'
to:
TO DISK = N''\\nlbkserver02\backup_devicem01$\'
It is working normally on the local machine but it did not work on a network drive. The error details is as following:
Cannot open backup device
'\\nlbkserver02\backup_devicem01$\15-Dec-2010
- application 1'. Operating system error 5(error not found). BACKUP
DATABASE is terminating abnormally.
could anyone give me an advice?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
SQL 默认在 Localsystem 帐户下运行。该帐户无权访问网络上的共享,因为它不是经过身份验证的网络帐户。
您还应该检查共享的权限。
SQL runs by default under the Localsystem account. that account does not have access to shares on the network as it isn't an authenticated network account.
You should also check the permisions on the share.
SQL Server 服务器帐户是否具有对此共享的写入权限?
Has the SQL Server server account got write access to this share?
您是否考虑过备份到本地驱动器并让另一项工作(SQL 之外)将备份复制/移动到网络驱动器?
这样,如果网络驱动器出现问题(例如计算机离线、网络中断等),备份仍然会发生。我认为仅仅因为网络驱动器离线,您就不想跳过备份。
Did you consider backing up to the local drive and having another job (outside of SQL) to copy/move the backup to the network drive?
This way, if there is some problem with the network drive (like that computer is offline, the network is down, etc.) the backup will still happen. I would think that just because the network drive is offline you would not want to skip the backup.