Displaying the sizes of every table in a database

Hello All,
I need to get the table sizes for each and every table in a database.
I would have checked it manually but there are many number of tables.
I am using SQL Server 2008 R2.
Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.

Please make habit of searching net before posting or if you dont know how to write a query. A simple search would lead you to
t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
sys.tables t
sys.indexes i ON t.OBJECT_ID = i.object_id
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
sys.allocation_units a ON p.partition_id = a.container_id
sys.schemas s ON t.schema_id = s.schema_id
AND t.is_ms_shipped = 0
t.Name, s.Name, p.Rows
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
My TechNet Wiki Articles

Similar Messages

  • Is there a way to display the size of a folder or group of folders in Bridge?

    In windows it is easy to click on any folder and see the size of it's contents, whether it is a single folder or contains subfolders.  This doesn't seem possible as far as I can see in Bridge.  The only way I can see to see the size of a folder is to select all files in the folder and then it will display the size. Seems quite a clunky way or working and is frustrating when you want to see the size of a folder containing sub folders.  Strange for a program which is supposed to make managing files easier.  However, I'm hoping that there is a way to do this and I've not discovered it yet.
    If anyone knows of a way to click on any folder and display it's contents (with or without subfolders) without having to select all files, I would greatly appreciate them sharing it.
    Many thanks,

    In the Folders Tab, right click on  folder  then click Reveal in Explorer. This will open an Explorer window with the folder selected.  In Explorer you can right click > Properties or navigate to whatever you want to measure.

  • How to find the size of a Table

    Dear all,
    How can i find the size of a table in a schema and size of the schema also.

    Try out with the help of this package, which will give out the total bytes, unused bytes, calculate the free bytes from total byes-unused bytes.
    total_blocks, total_bytes,
    unused_blocks, unused_bytes,
    last_used_extent_file_id ,

  • To know the size of multiple tables

    Hi Oracle Dons:
    I need to check the size of multiple tables via a SQL query. The way I would do this for a single table is
    select bytes from dba_segments where segment_name='table_name';
    But I need to do this for about 4 dozen tables.
    Can someone point me along the right corridor?
    RHLE 5

    If you want separate sizes by table and type of segment:
    select segment_name,segment_type,sum(bytes)
      from dba_segments
    where segment_name in ('TABLE1','TABLE2','TABLE3')
    group by segment_name,segment_type;If you want the total and don't care about individual sizes or types of segments
    select sum(bytes)
      from dba_segments
    where segment_name in ('TABLE1','TABLE2','TABLE3');

  • Since i have upgraded my i phone5 to 7.0.3 it has problem with 3g it display the service message every time, it reduce the battery life also.

    since i have upgraded my i phone5 to 7.0.3 it has problem with 3g it display the service message every time, it reduce the battery life also.

    Try using Settings > General > Reset > Reset All Settings.

  • How to decrease the size of a table

    Hi ,
    I have dropped a table on UI ... By default this table wont have any data .What i want that i should be able to decrease the size of table.
    I want that we should be able to show only 4-5 rows and have a scroll bar if we have more records.

    you need 16 pixel for each row, 14 pixel for the non-wrapped table header, and 16 pixel for the horizontal scroll bar, if it is displayed.
    so for your case you need to display 5 rows
    set the <b>inlineStyle</b> for your table from the property inspector to
    <b>Thank to Frank Nimphius for his book</b>

  • Increase the size of Virsa Table

    Hi gurus,
    We are in the process of uploading mitigating control description but the system showed maximum as 132 characters.
    Can we anyway increase the size of that field in virsa table

    Dear Praveen,
    In SE11 -> enter table name and choose database table radiobutton -> Choose display or enter key -> Check the filed type and length.
    You would need to create a new data element (with required type and length) and assign the same to the field or use Predefined Type (Not recommended).
    Allowed maximum length's for Numeric (NUMC) - 255, and Character (CHAR) - 30000.

  • Displaying the contents of internal table- in email Step of workflows

    Hello Folks,
    I wanted to display the contents of an internal table ( would contain a list of opportunites ), in an email sent throught the workflow:
    My idea was to LOOP AT <ITAB> into <WA> from an external program and then call the workflow for each content of the <WA>. This will be a problem as, if there are like 1000 records in the internal table, then workflows will be called 1000 times...sending 1000 emails..
    My requirement is that we need to send a single email to the single person, displaying the content of the internal table in the email body......
    My question
    1) Is this scenario possible through worflows ?
    2) If not, please provide an alternative ..

    Do you mean to say that just by inserting the multiline element
    within the body of the 'Send email' step type, the contents
    of the multiline element is displayed automatically without
    we having to loop at it somehow ?
    Follow the below apporach,
    1. First create a multiline container element in the workflow conatiner.
    2. Populate the internla table , by using the bor methods and pass back the populated ITAB to the WF by using the binding concept.
    3. Now create a mail step in the workflow, you have the option of inserting the workflow container elements into the mail conten, so insert the multiline container element , then it prompts to select the option like a) Do you liek to display only first line b) Display the ITAB line by line c) Display ITAB lines continuously with out line break.
    4. based upon the requirement select any one of the options.
    Note: Make sure the line length of the ITAB won't excced 132 charecters, because the send mail step will consider only 132 characters.

  • Read integer values from spreadsheet and display the values in a table

    Hi all,
    I have integer values to read from a spreadsheet and display them in a table. I am using 'Read from spreadsheet file' in 'integer' mode. I would like to display these values in a table. The problem is that the table takes only 2d-array of string as input but not integer.  
    It works fine if I change the mode of 'Read from spreadsheet file' from 'integer' to 'string' but I want to read integers and have to use the integer values for further calculations. Please give any suggestions on displaying integers to a table.
    Thank you. 
    Go to Solution.

    No don't take element by element just convert as a whole. See the attached example
    Good luck
    The best solution is the one you find it by yourself

  • Is it possible to display the size of a folder in a cell??

    i would like to know if there is any way or function to assign to a cell for display for example the size of a folder on the hard drive.....
    so whenever the folder size is changing, the cell is updated......
    another example, is to display the number of files inside a specific folder......
    Any way to do this????
    Thanks for your precious help.

    Hi everybody,
    i did some step forward, but i'm blocked in a step....
    this is the script I build so far:
    tell application "Finder"
              if disk "Data" exists then
                        set peso010 to get physical size of folder "010 - Foto" of disk "Data"
                        set peso010 to 0
              end if
              tell application "Numbers"
                        open "/Users/asialimarco/documents/test.numbers"
                        set the value of cell "B2" to peso010
              end tell
    end tell
    The first portion is getting correctly the size of my folder on external drive, a value when the disk is plugged in, 0 when is not.
    The second portion is where i get an error. It does open Numbers, it does open my file, it selects (the blue square) the right cell, but doesn't write on it anything. The Apples script returns an error which is:
    error "Numbers founds an error: Can't set cell \"B2\" at 0." number -10006 from cell "B2"
    I tried many times by also setting the value of the variable manually, but the error is always the same.
    What I'm missing? why i can't write on that cell (or anyother), with the on-line documentation it semas i need to open the file with write permissions, but i can't figure out how to do that.
    Anyone can help me?
    Thanks to all of you.

  • How to measure the size of a table ?

    Dear all,
    May I know how to measure the size of a customized table. I have a list of customized table and I want to monitor the growth of the table size on daily basis.
    Please advise how do I do it.
    Your advice and input will be appreciated.

    Go to DB02 -> Detailed Analysis -> Enter the table name under "Object Name" -> Click history to see  the changes in size by day.

  • Display the size of attached PDF form

        I created a form and allow the user to attach an file.No probs with tat.Now i want to dispaly the size of an attached pdf and also want to save a form in local machine.Could anyone help me to come out of this.

    Hi Prabu,
    you can use the pdf viewer or any other (freeware) pdf installed on your client (PC) for display. There is no way to display a pdf inside the smartform.

  • How can I know the size of DB Table

    Hi, Guys,
    1. How can I know the size of the DB Table in terms of kb
    2. If I delete some records from the Table, does the actual size of the Table remains  same or will it be reduced.
    3. If size remains same after deletion, how to reduce the size ( i.e. occupied space).

    1. How can I know the size of the DB Table in terms of kb
    There is no precise method/tcode/program to know the Table size of a tables.
    Just based on the record size of a table(say for example 2kb), and if 200 records are there then, we roughly assume that it occupied 400 kb.
    All the tables are stored in Table spaces.
    2. If I delete some records from the Table, does the actual size of the Table remains same or will it be reduced.
    Time being it remains same. it won't get reduced immediately
    during some next DB reorganisation it gets reorganised by reducing it.
    3. If size remains same after deletion, how to reduce the size ( i.e. occupied space).
    during next DB reorganisation it gets reorganised by reducing it.
    Reward points if useful

  • How to reduce the size of System tables(RS*) in SAP BW?

    Hi All,
    We need to reduce the size of a system tables(RS*) in SAP BW system without impacting anything to system.
    Could you please let us know is there any Global program/Function module to do the same.
    If not if you know any individual program or other way to reduce the system table size it will be very much useful.
    Sample System tables(RS*) are given below.

    There are tables you can archive / clean up and then there are tables you cannot do anything about. For example - if your system has a million queries - the RSRREPDIR , RZCOMPDIR tables will be large.
    The tables that typically get archived are :
    1. BALDAT / BALHDR - application log tables
    2. Monitor tables - search for Request archiving which will tell you how to archive the same
    The other tables -
    First you would have to understand why they are large in the first place ... if you have too many hierarchies - then some tables can be huge - delete some of the hierarchies you do not need and the table sizes should come down.
    RSRWBSTORE - this is the internal store for workbooks - this will have the last executed version of the workbook stored in the table. This information is called when the workbook is executed without refreshing the variables - which is why you get the workbook output first and then get prompted to refresh the variables.

  • I want to display the Employee details in table format without using iGrid

    Hi all,
    Can anybody help me that I want to display the Employee details return by transaction in table  format without using iGrid.

    Hi, view the link below.
    Hope this help.
    Danilo Santos

Maybe you are looking for

  • Battery drain after downloading free apps BUT never launched them

    I have searched all 7 pages of iPhone 3G section, any topic with "battery" in subject line, did not find a match, so posting new question. I'm a new 3G owner; use wifi and bluetooth, fetch mail manually (no push); battery life easily holds 2-3 days w

  • Using Keynote Cool Picture Frames between Apps

    Hi - is there a way to grab the "Keynote" picture frames/borders for use in other apps. I can't seem to find them even when I show contents of the "keynote" package. Thanks for any and all help:) Shelley

  • How to create an Equipment Address via BAPI or FM?

    Hi all, I have to create/update Equipments via RFC including Address data. For the Equipment master data, I use BAPI_EQUI_CREATE, but it has no address data as import parameter. To add the address data, I don't seem to find a suitable BAPI/FM: BAPI_A

  • Won't let me copy books to a nook.

    I have two nooks. One ADE sees and will let me copy books to. The other one it sees, but won't let me copy books to. I've deleted the manifest file multiple times. I've re-installed ADE. What next?

  • Gray Screen after I log in to MacBook Pro

    Hello, I have got MacBookPro 2009 Model. It was running fine till yesterday. I was watching a youtube video and I paused it and went away. After I came back the screen froze so I did the restart. Initially, there was some issues with booting up. I us