Issues with Shrinking or Truncating SIMPLE Recovery Mode Database
I had a database with log file size of 30 Gig and Data File with 20 Gig. I wanted to shrink the database but I was not able to .
When I ran “DBCC OPENTRAN“, I got the following message.
Transaction information for database ‘DBName’.
Replicated Transaction Information:
Oldest distributed LSN : (0:0:0)
Oldest non-distributed LSN : (23798:744:1)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
SELECT name, log_reuse_wait_desc from sys.databases
WHERE log_reuse_wait_desc = ‘Replication’
The database log is marked for Replication but none is setup on this Database.
After trying several methods, I still couldn’t shrink it. Finally I ran the following command and then I was able to successfully shrink it.
EXEC sp_removedbreplication ‘DBName’