Get size of Individual table in SQL Server 2000

Posted on 2007-08-02
Last Modified: 2008-01-09
How do I get the size of an individual Table in SQL Server 2000.
Are these accurate:

EXEC sp_spaceused 'TableName'

Exec sp_MStablespace 'TableName'

Question by:LegalZoomer
    LVL 30

    Expert Comment

    Yes, those are accurate. However, there are some instances where it may be incomplete (for example, you have just dropped a large index, and the sysindexes information is not current)

    To force 100% accuracy, run with the optional updateusage parameter

    EXEC sp_spaceused 'TableName','TRUE'

    Note, however, that this could hamper performance while it is running and can take some time on larger tables (essentially scans the data pages for the table in the database and makes any necessary corrections to the sysindexes table), so only use it if you suspect that there are incorrect values being returned.

    Author Comment

    Ok when I run the query for one of my tables I get the following results:

    Name      Rows         Reserved Space      Data            Index Size       Unused
    Table      10914680   721032 KB      710104 KB     4360 KB      6568 KB

    How do I get the total size used.
    Is it Data + Index Size = Total ?
    LVL 30

    Accepted Solution

    You just need to look at the Reserved Space.

    Reserved Space = Data +  Index Size  + Unused

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now