Showing posts with label DBA ADMIN. Show all posts
Showing posts with label DBA ADMIN. Show all posts

Friday, January 21, 2011

To Find the SQL SERVER DATABASE SIZES AND LOCATIONS

select d.name,round(sum(mf.size) * 8 /1024,0) from sys.master_files mf
inner join sys.databases d
on d.database_id = mf.database_id
where d.database_id > 4
group by d.name
order by d.name


SELECT name, physical_name AS current_file_location
FROM sys.master_files