I encountered the situation recently where I needed to find the size of the database.
--size of databaseSELECT DB_NAME(database_id) AS DatabaseName,SUM((size*8)/1024) SizeInMBFROM sys.master_filesGROUP BY DB_NAME(database_id)-- size of individual db filesSELECT DB_NAME(database_id) AS DatabaseName,Name AS Logical_Name,Physical_Name, (size*8)/1024 SizeInMBFROM sys.master_files
Post a Comment
Post a Comment