SQL Server – Get Physical Names and Attributes of Database Files

Posted October 17, 2006 by Rob Rogers in Database

Last Updated on

You can get the file location, size, maxsize, growth and usage attributes of a database without leaving your Enterprise Manager or Management Studio. To do this:

1. Open the query window.

2. Select the database that you will be requesting information on.

3. Type exec sp_helpfile.

4. Execute the query.

The results set will include the database name, fileid, filename, filegroup, size, maxsize, growth and usage for both the data file and the log file.


About Rob Rogers

Once a prolific author here on Tech-Recipes, Rob has moved on to greener pastures.
View more articles by Rob Rogers

The Conversation

Follow the reactions below and share your own thoughts.

Leave a Reply