how to shrink a very big log file in SQL server 2016

202 Views Asked by At

I have a warehouse with a 800 GB log file.now I want to shrink or another solution to reduce the disk space occupied by the Log.ldf. I tried shrink file in several ways.I got a full backup , transaction log back up , changed recovery mode , ran dbcc command but none of them affected log file volume in disk , detach database and then deleted the log file but because of memory-optimize file container I faced error while I attempted to attach it again (I read SQL server will automatically add a log file but apparently not when database has a memory_optimize file ) after all these solutions my log file is still 800 GB and I don't know what to do to free disk space used by log file. Is there any suggestion ? Or do I forget to do sth in my approaches ?

0

There are 0 best solutions below