dbcc sqlperf(logspace): how to get info updated

  • I ran

    dbcc sqlperf(logspace)

    to see what logs I could shrink and by how much. Then, I went ahead and did the shrinking. Then I excuted the same dbcc statement, and got the same statistics.

    What do I need to do to get the correct information when I run sqlperf after shrinking log files?

    thanks,

    Joseph

  • Do you mean the log size hasn't changed after the shrink? Which version of SQL Server do you run?

  • The log shrink works fine. The physical file is shrunk, and everything works fine. After the file is shrunk, and I run sqlperf(logspace), the data ("log size", "log space used") still show the old data. IE. I shrunk a log file from 200meg to 15 meg. I run sqlperf(logspace) and it still show 200 meg with 6% used.

    Joseph

  • Strange. Can you check back the log file size by running sp_helpfile in your user database.

  • sp_helfile does not display % used, and the "size" is not accurate either.

    Joseph

  • quote:


    the "size" is not accurate either.


    Why?

  • Sorry, I mistook the information. The size is accurate when running the sp_helpfile. And that information is good enough for me.

    thank you for your help

    Joseph

  • Try

    dbcc updateusage (DBName)

    Sometime the stats is not been update correctly

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply