Thursday, February 9, 2012

Actual physical file size

Hi Everybody,
I like to compute the actual physical database file size using queries.

From the EM database properties, the file size shown is not matching with the master..sysaltfiles.size

Ex. Actual file size is 12MB and 1MB for MDF & LDF respectively.
'sysaltfiles' shows 1464 & 96 resp. Since they are shoing it as 8K Pages,
96*8 = 768KB is not matching with 1024KB for the LDF file.
Is there any overheads (additional space from the physical file for file headers) allocated?

Thanks
Babuhm odd, I see the same thing. Additionaly, when calculating via sysaltfiles and comparing it with what a 'dir' shows, I have a match. The EM does show the size correctly in the Space allocated (taskpad), but not the Database Size. In my case it's a 4,56 MB off. Detaching the DB didn't change the size on disk either.|||Hi Kaiowas,

So you are getting the computation of sysaltfiles.size*8K pages matching with those of the physical OS file size. There is no difference in your system.
Mine is not matching. Any idea?|||yes, I did size * 8 * 1024 to get a bytesize to compare against a dir/properties of the actual databasefile.

No comments:

Post a Comment