Monday, March 12, 2012

query to give me db sizes

Id like to have a query that gives me the all the total db data sizes such
as
DB1 100GB
DB2 25GBHassan,
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
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23pg5sXlXFHA.2540@.tk2msftngp13.phx.gbl...
> Id like to have a query that gives me the all the total db data sizes such
> as
> DB1 100GB
> DB2 25GB
>|||Hi,
Execute the below stored procedure from Query analyzer.
sp_databases
Thanks
Hari
SQL Server MVP
"Steve Kass" <skass@.drew.edu> wrote in message
news:OaOELKoXFHA.2128@.TK2MSFTNGP14.phx.gbl...
> 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
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%23pg5sXlXFHA.2540@.tk2msftngp13.phx.gbl...
>

No comments:

Post a Comment