Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents

...

log_reuse_wait_desc errors after restore

What may happen is that the database sets itself to replication mode, and does not allow the shrinking of the transaction log while continuing to grow indefinitely.

To verify if this is the case run a new query on the DB:

Code Block
themeEmacs
languagesql
USE master;
GO
SELECT name, log_reuse_wait_desc, * FROM sys.databases
WHERE name = 'MYDB';

You should see:

 

Image Added

 

Code Block
themeEmacs
languagesql
USE master
EXEC sp_removedbreplication
	@dbname = 'MYDB'
GO
  1. Proceed

...

  1. to

...

  1. backup

...

  1. MYDB

  2. Shrink

...

  1. MYDB

...

  1. Backup the

...

  1. MYDB

...

  1. transaction

...

  1. log

  2. Shrink the MYDB transaction log

...

Insert Next Topic