O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Primary Files

The primary data file is the data file that keeps track of all the other data files used by the database. It is an operating system file that typically has the file extension .mdf. SQL Server does not require that it have this .mdf extension, but it is recommended for consistency. The primary data file is the first file created for a database. Each database must have only one primary file. This file stores data for any database objects mapped to it, and it contains references to any other database files created.

In many cases, the primary data file is the only data file. There is no requirement to have more than one data file, and often, a database contains only one primary data file (for example, C:\mssql\mydb.mdf) and only one ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required