在大型数据库上使用 smo 备份失败
我使用 vb.net 备份 sql '05 - '08 数据库。它在较小的数据库上效果很好。但当涉及大型数据库时,它会在 30% 或 40% 时失败,并出现错误:备份或恢复已中止。
Dim objBackup1 As Backup = New Backup() With {.Action = BackupActionType.Database, .Database = Common.DsSettings("DataBase", Nothing), .Initialize = True, .Checksum = True, .ContinueAfterError = True, .Incremental = False, .LogTruncation = BackupTruncateLogType.Truncate}
objBackup1.SqlBackup(objServer)
关于如何克服这个问题有什么想法吗?
I use vb.net to backup sql '05 - '08 databases. It works great on smaller databases. but when it comes to large databases it fails at 30 or 40 percent with the error: The backup or restore was aborted.
Dim objBackup1 As Backup = New Backup() With {.Action = BackupActionType.Database, .Database = Common.DsSettings("DataBase", Nothing), .Initialize = True, .Checksum = True, .ContinueAfterError = True, .Incremental = False, .LogTruncation = BackupTruncateLogType.Truncate}
objBackup1.SqlBackup(objServer)
Any idea on how to overcome this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
记不太清了,但我认为可能是操作超时了。我认为默认超时是 10 分钟,但如果将其设置为 0,它将禁用超时。
像这样的东西:
Can't remember exactly, but I think it might be that the operation is timing out. I think the default timeout is 10 minutes, but if you set it to 0 it'll disable the timeout.
Something like:
看看这个,看起来像超时问题:
http: //devio.wordpress.com/2009/03/27/handling-smo-sqlbackup-timeout/
和
http://msdn.microsoft .com/en-us/library/microsoft.sqlserver.management.common.serverconnection.statementtimeout.aspx?ppud=4
Have a look at this, looks like a timeout issue:
http://devio.wordpress.com/2009/03/27/handling-smo-sqlbackup-timeout/
and
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.common.serverconnection.statementtimeout.aspx?ppud=4