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)

sp_spaceused2

By Clinton Herring,

An update to sp_spaceused2. This update fixes some problems related to dbs that are non-accessible such being offline. This stored proc can be run from any database when compiled in master and can report information on all databases at once. Get information on all dbs, one db, one db and all its tables or one db and one table. Use sp_spaceused2 'all' to get all dbs. Use sp_spaceused2 '?' to get back syntax information, a list of other databases on the server and a list of tables in the current db. Also, load the results periodically into a table created in msdb. There is a SQL 2K version and a SQL 70 version. Both are included below.

Total article views: 268 | Views in the last 30 days: 1
 
Related Articles
SCRIPT

sp_spaceused2

The sp_spaceused procedure does not provide schema name in return. Here is sp_spaceused2 that does.

SCRIPT

Find information about all databases

ALL database information

FORUM

sp_spaceused2

Comments posted to this topic are about the item [B]sp_spaceused2[/B]

FORUM

sp_spaceused2

Comments posted to this topic are about the item [B]sp_spaceused2[/B]

FORUM

Copy a Database with out information

Copy a Database with out information

 
Contribute