SQL Server with Mr. Denny

Aug 22 2011   2:00PM GMT

There’s a little something to keep in mind when restoring a SQL replication publisher

Denny Cherry Denny Cherry Profile: Denny Cherry

So the other day I had to restore the SQL Server replication publisher.  When I restored it I made sure to use the KEEP_REPLICATION option on the restore (also available in the SSMS UI) so replication should come back online.  However when I restarted the log reader I the following error message.

The log scan number (6367:10747:6) passed to log scan in database ‘%d’ is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup. (Source: MSSQLServer, Error number: 9003)

Needless to say this error looks pretty damn scarey.  In reality it isn’t actually that bad.  What this error is basically saying is that the LSN that is returned from the database is older than the one logged in the replication database.  The best part is that the fix is pretty easy.  Simply run the stored procedure “sp_replrestart” in the published database.

Denny

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: