0

I have shrunk a log file of a database in SSMS 2008:

      treeview
           mydatabase (right-click)
                 tasks -> shrink -> files : choose log from dropdown
      (*) reorganize pages before releasing unused space
               shrink file from 6999MB to 417MB

       click OK

When I go back in and look, the currently allocated space for the log is 417.38MB, so the reduction seems to have taken place. But I don't see the drive's free space increasing at all. It should have increased by over 6GB. When is the released space put back into the O/S file system?

Tim
  • 8,669
  • 31
  • 105
  • 183

1 Answers1

0

If the shrink operation succeeds, the disk space is freed immediately. The fact, that the file is now shown with the intended size means the shrink operation did succeed. There are two options for the missing space:

  1. You are looking at the wrong drive. The logfile is probably on a different drive than the data files.
  2. Something else (e.g. another database) quickly grabbed the newly available space.
Sebastian Meine
  • 11,260
  • 29
  • 41
  • The two possibilities you mention must not be the complete explanation. This is a development PC running Windows 7 x64 (not a server where I would be unaware of competing processes) and I also checked that the drive was the c: drive. There must be some other explanation why the freed space is not showing up when I check the free space of drive c: – Tim Feb 15 '13 at 04:16