To list only user databases with the size for a instance in sql server 2005
hi,
i looking t-sql to list user databases size instance in sql server 2005
try code
select d.name,
round(sum(mf.size) * 8 / 1024, 0) size_mbs
sys.master_files mf
inner join sys.databases d on d.database_id = mf.database_id
d.database_id > 4 -- skip system databases
group d.name
order d.name
please click mark answer button , vote helpful if reply solves problem
SQL Server > Getting started with SQL Server
Comments
Post a Comment