Hi @Surendra Adhikari ,
Could be this helpful for you?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
To shrink the log file of a database, I changed the mode to simple and executed the shrinkfile command but the file does not get shrinked. Why is it so even in simple recovery mode?
What does
select name, log_reuse_wait_desc
from sys.databases
return for the database in mind? Is there logshipping, replication or etc. setup for the database?
Executing checkpoint before shrinkfile helped.
Thank you all for replies.
Hi @Surendra Adhikari ,
If you wanna shrink file in the simple mode, you need to truncate the log. To execute checkpoint is a way and you can also do the full backup, which will have the same effect. :)
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment"
Use Checkpoint before running the shrink command. Thanks