Database size calculation between SQL 2000 &SQL 2005(DMO vs SMO)

  • Hi All,

    Can you please tell me how to validate the database objects (Datafiles, filegroups, log files) attribute like occupied space,freespace and size in SQL Server 2005.It would-be great help if I get SQl queries from SQL guru's.

    I am finding the lot of different when I compare SQL server 2005 Server manager Studio output with SQL 2000 DMO explorer output.

    I created a database by the name 'eval' and compare the output=20

    Output from SQL-DMO:

    ****************

    1. Total Size of Datafile: 3 MB

    2. Free Space: 1 MB

    OCC_SPACE =3D 2MB (Total Size - FREE_SPACE-)

    Output from Server Manager Studio:

    ********************************

    1. Total Size of Datafile: 3 MB

    2. OCC_SPACE(Space Used) : 1.38

     

     

    The difference is 635 kb. Can you please tell me why I am seeing the huge difference?

     

    ***************************************************************

    One more doubt related to above Query...

    Recently I read one article in that author mentioned that most of the system table in SQL 2000 becomes system views in SQL 2005. This will effect the database size calculation?

    Also SQL server 2005 based on .net frame work uses SMO components and SQl 2000 uses DMO components.So when we use DMO component to access SQL server 2005 database.=20 Does it shows accurate data for database size and for other attributes or it will fail to collect all thee details...if it so..what will be the missing one's

     

    Please help me...

    Awaiting for your reply..

    Suresh

     

     

     

  • This was removed by the editor as SPAM

  • The logic in DMO and SMO is slightly different. It appears that in more cases DMO is more correct than SMO. However, to get the most correct answer try calling sp_spaceused.

    Cheers,

    Dan

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

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