Identifying a Database's Files, Filegroups

How can I identify all the files and filegroups in a particular database?

Running sp_helpdb <dbname> will give you the information you need. By supplying the database name in this procedure, you get a result set that shows the file allocation for the specified database, including logical file name, file ID, OS file name (physical file name), the filegroup the file belongs to, file size, the maximum size to which the file can grow, and the growth increment of the file.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish