sp_spaceused and fileproperty

  • Hi All

    I am trying to use fileproperty() function to get the space usage at the file level. But when I execute the following set of commands the values from fileproperty() and sp_spaceused doesnt match.

    select fileproperty('master','SpaceUsed')*8;

    select sum(reserved)*8 from master.dbo.sysindexes where indid in (0,1,255);

    exec sp_spaceused;

    Can anyone help me with this???

  • - did you run DBCC UPDATEUSAGE  ('master') with count_rows 

     followed by sp_updatestats

    - I wonder what sp_helpfile returns ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • I have tried using the DBCC updateusage('master') with count_rows

    and sp_updatestats.

    But still I am getting different values in fileproperty and .

    Can anyone try this out and tell me why this is happening. There must be some valid reason for this. I just don't know it. If anyone can explain it would be great.

Viewing 3 posts - 1 through 2 (of 2 total)

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