Data Files and Transaction Logs
SQL Server utilizes two main files to store data and transactions on disks.
- Data File (.mdf or .ndf extensions by default) – This is the
physical storage for all of the data on disk. Pages are read into the
buffer cache when users request data for viewing or modification. After
data has been modified in memory (the buffer cache), it is written back
to the data file during the checkpoint process.
- Primary Data File - Each database has exactly one
primary data file (.mdf extension by default). This datafile is
generated when you first create a database.
- Secondary Data File - Databases may also have secondary data files (.ndf extension by default).
- Transaction Log (.ldf extension by default) – The transaction log contains transactional information that is required to recover the database.
No comments:
Post a Comment