A file that is used to record transactions against a database as they occur and is distinct from the database itself. Update transactions must be recorded to provide for database recovery. The information written to the log file usually also includes before and after images of the database records (or pages) changed. Information on query-only transactions may also be recorded. The log file will be used to create a recovery log, to provide an audit trail, and by database administration for performance monitoring and improvement.
The recording of information on a log file is known as logging.