August 22, 2011 at 12:40 am
I tried in many ways...but its showing for only one instance.....
Can anyone please specify exact query to list all user databases size in central management server
Sagar Sonawane
** Every DBA has his day!!:cool:
August 22, 2011 at 1:04 am
You could use the following,
SELECT name FROM master..sysdatabases
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
August 22, 2011 at 1:15 am
Might want to add the state_desc & recovery model to the above list as well.
select * from sys.sysaltfiles
Gives you the size per database
http://msdn.microsoft.com/en-us/library/bb964743.aspx
Shows you how to execute a query against more than 1 instance at a time
August 22, 2011 at 1:57 am
create table test
([name] sysname,db_size nvarchar(13),
[owner] sysname null,[dbid] smallint,
created nvarchar(11),[status] nvarchar(600),
compatibility tinyint)
insert into test exec sp_helpdb
select name ,db_size,owner from test where name not in ('master','model','msdb','tempdb')
exact answer...
Sagar Sonawane
** Every DBA has his day!!:cool:
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply