inquiring about ldf rebuild and log restore

고민재 40 Reputation points
2024-04-24T04:23:16.8633333+00:00

Hello, I am inquiring about ldf rebuild and log restore Recently, the ldf file failed during log restoration, and the LDF file was recreated through database detach, attach, and LOG REBUILD.

After that, I wanted to proceed with the restoration of the TRN file that had a problem, but the LSNs failed because they did not match each other.

I was aware that LSN could be initialized because I did the log REBUILD, but in my opinion, I was aware that information about the backup set would remain and I proceeded with the work.

Is there any way to RESTORE the LOG TRN file of the existing replica set after LOG REBUILD? Or is there another way to RESTORE the LOG TRN file of the existing replica set while the LDF file is defective?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,760 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MikeyQiao-MSFT 560 Reputation points Microsoft Vendor
    2024-04-24T09:02:29.3166667+00:00

    Hi,고민재

    It seems you intend to recover as much data as possible from the damaged LDF file.

    Unfortunately, once the LDF file is corrupted, the data modifications contained in the log file at that LSN are definitely lost.

    Since you have already rebuilt the database log, it is recommended that you first confirm that the data has been restored to the most recent backup prior to the damaged LDF file. Then, attempt to repair the LDF file. However, SQL Server does not provide a function to repair LDF files.

    There are some third-party SQL Server data recovery tools on the market that may be of help.

    Best regards

    Mikey Qiao

    0 comments No comments