SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error: Could not apply log backup file


Error: Could not apply log backup file

Author
Message
dopydb
dopydb
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5939 Visits: 584
hi

i have a sql 2005 db with log shipping enabled.

the secondary server is suddenly giving me the below errors, anyone any tips on how to fix the issue trans log? or am i going to have to do a full db restore?

Error: Could not apply log backup file
Error: Could not redo log record
Restore from a backup of the database, or repair the database.
An error occurred while processing the log for database 'SysproCompanyW'. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
RESTORE LOG is terminating abnormally.
Processed 0 pages for database 'SysproComp
GilaMonster
GilaMonster
SSC Guru
SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)

Group: General Forum Members
Points: 953752 Visits: 48920
Looks like the transaction log on the secondary is damaged (or could be the data files)
You're going to need to re-do it, and it may be a good idea to recover the database (if possible) and run checkDB to see what happened, and then re-do the log shipping

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


dopydb
dopydb
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5939 Visits: 584
hi Gila

so the db is currently in restoring mode as you would expect, as soon as i take it out of this mode, wont i have to do a full db restore?
i have tried copying over the issue log file again and retrying restore but it fails again with same error

mal
GilaMonster
GilaMonster
SSC Guru
SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)

Group: General Forum Members
Points: 953752 Visits: 48920
As I said, you're going to need to redo it. i.e. full database restore

But, before you do that, it may be a good idea to recover the DB and run CheckDB so that you can see what's broken.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


dopydb
dopydb
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5939 Visits: 584
cheers Gila for advise! always appreciated
Ivan R.
Ivan R.
Mr or Mrs. 500
Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)

Group: General Forum Members
Points: 556 Visits: 366
hello, if it's a small enough database, you may want to consider restoring the adhoc full + dif + trn form the primary to another instance then do DBCC CHECKDB.

That should give some benefit of testing the restore as well before touching and re-doing the faulty replica. Also consider the DBCC on the primary maybe if it's possible size/availability wise to rule out any issue with that instance/host.
Ivan R.
Ivan R.
Mr or Mrs. 500
Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)Mr or Mrs. 500 (556 reputation)

Group: General Forum Members
Points: 556 Visits: 366
hello -- you might already be aware that the driver they use will have an impact?
But just in case here's the link: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/always-on-client-connectivity-sql-server

e.g.
DriverMulti-Subnet FailoverApplication IntentRead-Only RoutingMulti-Subnet Failover: Faster Single Subnet Endpoint FailoverMulti-Subnet Failover: Named Instance Resolution For SQL Clustered Instances
SQL Native Client 11.0 ODBCYesYesYesYesYes
SQL Native Client 11.0 OLEDBNoYesYesNoNo
ADO.NET with .NET Framework 4.0 with connectivity patch*YesYesYesYesYes
ADO.NET with .NET Framework 3.5 SP1 with connectivity patch**YesYesYesYesYes
Microsoft JDBC driver 4.0 for SQL ServerYesYesYesYesYes

GilaMonster
GilaMonster
SSC Guru
SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)

Group: General Forum Members
Points: 953752 Visits: 48920
He's using Log Shipping on SQL 2005 (3 versions before Availability Groups was introduced), the link and chart are hence not relevant.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


dopydb
dopydb
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5939 Visits: 584
soon hopefully we will upgrade, and we can experience 10 year old Tech Smile
GilaMonster
GilaMonster
SSC Guru
SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)SSC Guru (953K reputation)

Group: General Forum Members
Points: 953752 Visits: 48920
dopydb - Monday, February 26, 2018 6:28 AM
soon hopefully we will upgrade, and we can experience 10 year old Tech Smile

Smile

If upgrades are in the planning phase, I would recommend straight to 2017. No more work than any other version, and some nice features to help you fix any problems from the upgrade (Query Store)

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search