Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Log corruption encountered while backing up transaction log

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Fault description:

The following error was encountered while backing up the transaction log

Backup detected log corruption in database FakeDBName. Context is FirstSector. LogFile: 2'F:\ SQLLOGS\ XYZ\ FakeDBName_Log.ldf' VLF SeqNo: x502e VLFBase: x2ce40000 LogBlockOffset: x2d0a9000 SectorStatus: 2 LogBlock.StartLsn.SeqNo: x4ee3 LogBlock.StartLsn.Blk: x1348 Size: x200 PrevSize: x400

2009-03-06 10 Backup Error: 3041, Severity: 16, State: 1.

2009-03-06 10 Backup BACKUP failed to complete the command BACKUP LOG FakeDBName Check the backup application log for detailed messages.

2009-03-06 10 Backup Error: 3041, Severity: 16, State: 1.

When performing a full backup, there was no error.

Cause analysis:

1. When you back up a log, you need to back up the entire log chain since the last log backup. Any log corruption in the log chain will report an error and cause the log backup to fail.

two。 Why is there no error in the full backup? Because a full backup requires only a small number of transaction logs. See http://www.mssqlmct.cn/dba/?post=203

Countermeasures:

SQL Server does not have the tools and direct methods to rebuild the transaction log chain. It is recommended to rebuild the transaction log chain:

1. Stop all transactions in the database

two。 Perform a full backup

3. Change the recovery model of the database to simple, which deletes the original transaction log chain. If there are a large number of buffered data not written back to the hard disk, please execute checkpoint. Shrink the transaction log file if necessary.

4. Then change the recovery model of the database back to "complete"

5. Perform a full backup, which rebuilds the transaction log chain

6. You can continue with the transaction log backup.

References:

Https://www.sqlskills.com/blogs/paul/how-can-a-log-backup-fail-but-a-full-backup-succeed/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report