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_idAS 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

Popular posts from this blog

VS 2012: No exports were found that match the constraint : ContractName

How to Tweak the New Multi-Monitor Taskbar in Windows 8