Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

MSSQL DB file shrink won't work because log file grows too big

$
0
0

I have this issue in MSSQL (2008 R2).

A server we have has a 250GB partition where the SQL mdf (data) and ldf (log) file both sit. I understand this is not really best practice and they should live on separate drives, but this is a server I inherited and there has not been the stomach internally to make changes.
We used a script to cleardown 10 years of very old data that was not needed as the DB was 150GB in size. This freed up ~45GB of space in the DB.
I now want to do a one time shrink on the mdf to free up 40GB of space, leaving 5GB of growth space, which should be sufficient for a decent amount of time. I ran a full backup, then ran the shrink and went for dinner.
I got back to find the shrink operation failed and a low space warning on the drive the two DB files reside. GULP. So I checked the situation and the log file had grown from...

Viewing all articles
Browse latest Browse all 4871

Trending Articles