all groups > sql server programming > may 2005 >
You're in the

sql server programming

group:

query to give me db sizes



Re: query to give me db sizes Steve Kass
5/21/2005 12:00:00 AM
sql server programming: Hassan,

This will give you some of the information you want:

exec sp_MSforeachdb N'exec ?..sp_spaceused'

Note that sp_MSforeachdb is undocumented and unsupported. Do
not use it in production code. Details about the system stored procedure
sp_spaceused can be found in Books Online.

Steve Kass
Drew University

[quoted text, click to view]

query to give me db sizes Hassan
5/21/2005 3:39:17 PM
Id like to have a query that gives me the all the total db data sizes such
as

DB1 100GB
DB2 25GB

Re: query to give me db sizes Hari Prasad
5/22/2005 12:00:00 AM
Hi,

Execute the below stored procedure from Query analyzer.
sp_databases

Thanks
Hari
SQL Server MVP

[quoted text, click to view]

AddThis Social Bookmark Button