微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

几次成功运行后,日志传送还原作业失败

如何解决几次成功运行后,日志传送还原作业失败

我在几个运行良好的数据库上进行了日志传送,但有三个失败了。他们都从同一个小学转到同一个中学。我已经将工作数据库的设置模拟到了非工作数据库

我重置删除并重置失败数据库的日志传送,并且恢复正常工作,前几次应该如此。但通常在第三个周期它会在作业历史记录中发布断开连接的用户,然后从那时起它会出错。作业成功完成,但在还原步骤中出错。

在这里错过了什么? 错误发生后,我运行完整备份并恢复使其处于待机模式,然后下一个日志传送周期成功。但是第二个循环又失败了

我正在使用版本: ---Microsoft sql Server 2012 (SP4-GDR) (KB4532098) - 11.0.7493.4 (X64) 2019 年 12 月 24 日 19:33:24 版权所有 (c) Windows NT 6.3(内部版本 9600)上的 Microsoft Corporation 标准版(64 位) :)(管理程序) 作业历史日志:

021-01-25 08:17:06.30   *** Error: Could not apply log backup file '\\secondary\sqlLogShip\secondarydb_20210125034500.trn' to secondary database 'secondarydb'.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  *** Error: Could not log history/error message.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  Skipping log backup file '\\secondary\sqlLogShip\secondarydb_20210125034500.trn' for secondary database 'secondarydb' because the file Could not be verified.
2021-01-25 08:17:06.30  *** Error: Could not log history/error message.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  *** Error: An error occurred restoring the database access mode.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteScalar requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  *** Error: Could not log history/error message.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  *** Error: Could not apply log backup file '\\secondary\sqlLogShip\secondarydb_20210125040001.trn' to secondary database 'secondarydb'.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  *** Error: Could not log history/error message.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  Skipping log backup file '\\secondary\sqlLogShip\secondarydb_20210125040001.trn' for secondary database 'secondarydb' because the file Could not be verified.
2021-01-25 08:17:06.30  *** Error: Could not log history/error message.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  *** Error: An error occurred restoring the database access mode.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteScalar requires an open and available Connection. The connection's current state is closed.(System.Data) ***
2021-01-25 08:17:06.30  *** Error: Could not log history/error message.(Microsoft.sqlServer.Management.LogShipping) ***
2021-01-25 08:17:06.30  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***

我重建了日志传送并禁用了第二个日志备份作业。得到新的错误。 2021-01-27 07:18:04.37 *** 错误:无法将日志备份文件“\secondary\sqlLogShip\dbname_20210126204500.trn”应用到辅助数据库dbname”。(Microsoft.sqlServer.Management.LogShipping)*** 2021-01-27 07:18:04.37 *** 错误:处理数据库dbname”的日志时出错。如果可能,从备份中恢复。如果备份不可用,则可能需要重建日志。 恢复期间发生错误,导致数据库“DP_Rpt”(19:0) 无法重新启动。诊断恢复错误并修复它们,或从已知良好的备份中恢复。如果未纠正或预期错误,请联系技术支持。 RESTORE LOG 异常终止。 已处理数据库 'dbname' 的 0 页,文件 1 上的文件 'dbname'。 已处理数据库dbname”的 1 页,文件 1 上的文件dbname”。(.Net sqlClient 数据提供程序)*** 2021-01-27 07:18:04.39 *** 错误:无法记录历史记录/错误消息。(Microsoft.sqlServer.Management.LogShipping)***

这是怎么回事?我有几个登录数据库,它们运行得很好,但这个有问题。

每天运行完整备份作业是否会导致此问题?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。