-
Database Size
Hi,
I have 30 servers and about 600 databases. I want to know the size of databases ( data files as will log files) both used and allocated space.
Can any one tell me the easiest way to get this information?
Thanks.
-
There is no easy way, can run sp_spaceused for each db on every sevrer and run 'dbcc sqlperf(logspace)' on every server.
-
Run this command on all the 30 servers, which will list all the database sizes and log sizes
exec master.dbo.sp_msforeachdb 'sp_spaceused'
exec master.dbo.sp_msforeachdb 'dbcc sqlperf(logspace)'
-
Don't have to run 'dbcc sqlperf(logspace)' for each db since it gives you log size of all dbs on the server.
-
Hi,
Yeah!
When I execute this (below) as suggested by MAK, I get information about MASTER database only, that too so many times..( I guess it is executed n number of times where n is number of databases in my server ).
exec master.dbo.sp_msforeachdb 'sp_spaceused'
How can I get information about every database in the server?
I tried executing this in a separate query analyzer window also...
Thanks.
-
try this.
exec sp_msforeachdb 'exec ?.dbo.sp_spaceused'
-
Thanks Mak,
It works.
I have one doubt.
When I issue that command, I get reserved, and unused. Also I get unallocated. Unallocated space is still free, but don't understand what are unused and reserved?
Can you please give me some idea?
Thanks.
-
Reserved = data+indexsize+unused
unused is - out of the reserved space, the space that is not used.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|