Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick SQL script or OSQL command table size

Status
Not open for further replies.

steveot

IS-IT--Management
Joined
Oct 27, 2003
Messages
1,635
Location
US
Anybody know if a quick OSQL command or query to determine the table size of all tables in a give database?
 
The procedure sp_spaceused will give you the space used and available within the current database.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
I don't know if it's possible to stack 2 procedures like this, but if it is then you can probably do this:
Code:
exec sp_msforeachtable 'exec sp_spaceused ''?'''

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B> bites again.[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top