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

问题描述

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

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

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

我正在使用版本: ---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 (将#修改为@)