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 | ||||
---|---|---|---|---|
| ||||
USE master; GO SELECT name, log_reuse_wait_desc, * FROM sys.databases WHERE name = 'MYDB'; |
You should see:
Code Block | ||||
---|---|---|---|---|
| ||||
USE master EXEC sp_removedbreplication @dbname = 'MYDB' GO |
Proceed to backup MYDB
Shrink MYDB
Backup the MYDB transaction log
Shrink the MYDB transaction log