Database file size in MB in SQL Server 2005

Friday, March 27, 2009 |

I seen people ask in many forums that how can they find the size of their MDF and LDF file in MB by T-SQL so I thought to publish it here in my blog.

select ceiling(size/128) as 'fileSizeinMB',name as 'filename',physical_name from sys.database_files

It will return all available files for your database.

Reference: Ritesh Shah
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of


Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!