Failed to shrink transaction log file size (.ldf)

Created by Cheng Kah Poh, Modified on Fri, 25 Sep, 2020 at 11:51 AM by Cheng Kah Poh

Step 1 - Connect to Database use Microsoft SQL Server Management Studio.

Please refer How to Connect to Database use Microsoft SQL Server Management Studio

Step 2 - Start a new Query

Copy and Paste the following SQL Script into the New Query

SELECT name,log_reuse_wait_desc FROM SYS.DATABASES


Step 3 - Click Execute

Step 4 - If the result of your database’s name is REPLICATION then continue below steps else contact QNE Support Team

Step 5 - Start a new Query

Step 6 - Copy and Paste the following SQL Script into the New Query

EXEC sp_removedbreplication 'SampleDB'----- Change SampleDB to your database name

GO

Step 7 -  When result shown ‘Command(s) completed successfully.’, then repeat steps to shrink transaction log file size.

Please refer How to Shrink Database Transaction Log

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article