SQL SERVER - Find the Size of Database
I encountered the situation recently where I needed to find the size of the database log file while doing baseline.
Here is the script, if you remove the WHERE condition you will find the result for all the databases.
SELECT DB_NAME(database_id) AS DatabaseName,Name AS Logical_Name,Physical_Name, (size*8)/1024 SizeMBFROM sys.master_filesWHERE DB_NAME(database_id)='AdventureWorks'--substitute the name of DB hereGO
Comments
Post a Comment