A: Open SQL Server Management Studio and expand Databases, then right-click the database you want to run queries for. Select New Query from the context menu, which opens a new query window.
You can use the built-in stored procedure sp_spaceused to find the space used for a database or table within a database. For example, if I just run the following:
it shows me the total size of my database. To see the size of a particular table I can pass the name of the table:
<code>EXEC sp_spaceused 'Catalog'</code>
To see a list of the sizes of all tables in the database I can combine sp_spaceused with the sp_MSforeachtable stored procedure to run the space used stored procedure for every table:
<code>EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?'"</code>
You can now see the size of every table in the database.
Get more help from John Savill on everything Microsoft--and more--at John Savill's FAQS for Windows.