Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Get all user def table info

By Mohit Nayyar,

"sp_spaceused" procedure is really handy to get the updated information about space usage by database or tables.

I combined the same with another very useful procedure "sp_MSforeachtable" to get this information for all user-defined tables.

If you see any problem with the information then just change the last parameter and set it to TRUE (FALSE in the script). That will update the space usage and then report updated details.


Thanks
Mohit Nayyar
http://mohitnayyar.blogspot.com

Total article views: 7374 | Views in the last 30 days: 37
 
Related Articles
FORUM

Updating blank information

Updating multiple fields with info from a different table

BLOG

SQLDIY: Statistics Information Including Last Update

One of the most important aspects of keeping your system running well is updating and managing your ...

BLOG

SQL Server 2005 Diagnostic Information Queries

Here is an updated version of my diagnostic information queries for SQL Server 2005. You can get the...

BLOG

SQL Server Diagnostic Information Queries for August 2013

I have gone through and made some minor updates and bug fixes for all of my SQL Server Diagnostic ...

BLOG

SQL Server Diagnostic Information Queries for July 2013

I have gone through and made some minor updates and bug fixes for all of my SQL Server Diagnostic In...

 
Contribute