0

So my tempdb log has 0% free when I checked my Disk Management in my windows server, I went to SSMS and checked the disk usage report GUI and it shows me that my transaction log is 99% free and the last autogrow stopped 2 days ago. This is production server FYI, so, should I restart my SQL server after hours? Shrink the templog? Just confused with what's going on having to see 2 different reports.

What should I do?

Disk Usage in SSMS

Templog 0% free in Disk Management

mustaccio
  • 28,207
  • 24
  • 60
  • 76

1 Answers1

2

When you check in "disk management", you are checking the free space on the disk. When you are checking in SQL, you are probably looking at the free space inside the SQL log file (.ldf).

A 10Gb log file could be use at 0%, it will still take 10Gb on disk.

Now, if the log file ended up being the actual size, it's because SQL needed it to be that big at some point. Shinking it will give you some free space on the disk, but if SQL needs the file to grow again, it will use that space again.

If something else uses the space in the midtime, then the tempdb log file will fill to 100% and you will get an error.

Seems to me like you are a bit "short" on space on this disk so I would make it bigger (if VM) or would look at adding another disk and move the tempdb log file over there.

Dominique Boucher
  • 3,287
  • 11
  • 27