When a database shuts down cleanly, the database file holds a complete and current copy of all the data in the database. When a database is running, however, the database file is generally not current or complete.
The only time a database file is guaranteed to hold a complete and current copy of all data is immediately after a checkpoint completes. Following a checkpoint, all the contents of the database cache are on disk.
The database server checkpoints a database under the following conditions:
As part of the database shutdown operations
When the amount of time since the last checkpoint exceeds the database option checkpoint_time
When the estimated time to do a recovery operation exceeds the database option recovery_time
When the database server is idle long enough to write all dirty pages
When a connection issues a CHECKPOINT statement
When the database server is running without a transaction log and a transaction is committed
Between checkpoints, you need both the database file and another file, called the transaction log, to ensure that you have a complete copy of all committed transactions.