SQL Server tables size

  • Hi,

    Wich t-sql command can I run tho have a list of the user-tables ordered by size inside one database?

    Thank you

  • river1 (12/5/2015)


    Hi,

    Wich t-sql command can I run tho have a list of the user-tables ordered by size inside one database?

    Thank you

    If you just want to see the tables, then open SSMS, open the Object Explorer (press the {f8} key if it's not already open), right click on the database you want the information for, select {Reports}, {Standard Reports},{Disk Usage by Top Tables}.

    If you need the script to power some a strored procedure or some such, post back.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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