Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Shrinkfile exhausting space in transaction log for relatively small amount of data and can't figure out why?

$
0
0
I have multiple file database where the ndf file 9  is 134g in size but 122g of it is free due to a massive amount of table deletions of histrical tables.   The last 12g is most recently created tables  and I have a  two copies of this database.    I have tried running the SQL SERVER Managment Studio  menus and telling it to reorganize the pages  looking to move the 12g to the front of the file and it the shrink failed  because it filled up a 49g transaction log file.     On the second copy of the database I used the command DBCC (9,1)  to shrink the file in a query window.   On this instance the log was only 25g in size but I had done some testing on experimental databases of large allocations where huge amounts of data was deleted and only 12g left at the end and it barely touched the transaction log file so I thought I was safe.   Again I exhausted the transaction log file.   I am baffled as to why this operation is hitting the transaction log file so hard and  if I have to make a large transaction log file, just how large must it be? 

Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>