Primary Data File

Every database has only one primary database file. The location of the primary database file is stored in the master database (visible via the filename column in the sys.master_files view). When SQL Server opens a database, it looks for this file and then reads from the file information on the other files defined for the database.

The file extension for the primary database file defaults to .mdf. The primary database file always belongs to the default filegroup. It is often sufficient to have only one database file for storing your tables and indexes (the primary database file). The file can, of course, be created on a RAID partition or SAN to help spread I/O across multiple physical drives. However, if you need finer control ...

Get Microsoft SQL Server 2014 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.