Understanding database files

A database file is nothing more than an operating system file. (In addition to database files, SQL Server also has backup devices, which are logical devices that map to operating system files or to physical devices such as tape drives. This chapter won’t discuss files used to store backups.) A database spans at least two, and possibly several, database files, which are specified when a database is created or altered. Every database must span at least two files: one for the data (as well as indexes and allocation pages) and one for the transaction log.

SQL Server 2012 allows the following three types of database files.

  • Primary data files. Every database has one primary data file that keeps track of all the rest of the ...

Get Microsoft SQL Server 2012 Internals 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.