What is the TRN file format?
A .trn file is a Microsoft SQL Server transaction log backup - a binary backup of all changes recorded in the database transaction log since the previous log or full backup. Log backups are created with the BACKUP LOG T-SQL statement or through SQL Server Management Studio (SSMS).
Despite having a dedicated extension, .trn files use the same underlying container as full backup .bak files: the Microsoft Tape Format (MTF), identifiable by the four-byte magic TAPE (hex 54 41 50 45) at the start of the file. The .trn extension is a widely adopted naming convention, not a format requirement - SQL Server accepts any extension, and many organizations use .bak for all backup types.
Transaction log backups are only available when the database uses the FULL or BULK_LOGGED recovery model. Databases on the SIMPLE recovery model cannot produce them. A point-in-time restore chain requires: a full backup → optionally one or more differential backups → a sequence of .trn log backups applied in Log Sequence Number (LSN) order.
SQL Server 2008 introduced optional backup compression (BACKUP WITH COMPRESSION), significantly reducing file sizes on busy systems. SQL Server 2014 added backup encryption using certificates or asymmetric keys. File size ranges from under 1 MB on quiet databases to hundreds of gigabytes on high-transaction-volume systems.
The format evolves with each SQL Server release and a .trn file cannot be restored to an older server version than the one that created it. Since SQL Server 2017, the format is also supported on Linux.
Security & safety
RISK: MEDIUMTRN files contain a complete record of all database transactions including the actual data values (INSERT/UPDATE contents). If a database contains PII, sensitive financial data, or secrets, a leaked .trn file exposes all of it. Store and transmit log backups with the same security controls as the database itself. SQL Server 2014+ supports backup-level encryption with a server certificate.
Format details
in a nutshell- Training data file (various apps) - Some simulation, language tool, and game software use .trn for training/localization data; unrelated to SQL Server.
- Translation/Locale File - Some software (Ulead, older CAD tools) uses .trn for translation or locale strings.
Programs that open TRN files
Technical details
deep spec| Container format | Microsoft Tape Format (MTF) - same binary container used by `.bak` full backups |
| Magic bytes at offset 0 | `TAPE` (hex 54 41 50 45) - original MTF tape device header signature |
| Recovery model requirement | FULL or BULK_LOGGED databases only; SIMPLE recovery model databases cannot produce log backups |
| LSN chain | Each backup covers a Log Sequence Number (LSN) range; log backups must be applied in strict LSN order during restore |
| Compression | Optional via `BACKUP WITH COMPRESSION` (SQL Server 2008+); no compression by default |
| Encryption | Optional certificate- or asymmetric key-based encryption (SQL Server 2014+); inherits Transparent Data Encryption if enabled |
| Typical file size | 1 MB - 100 GB+ depending on transaction volume since the previous log backup |
| Version stamp | Backup header embeds the originating SQL Server version; restore to an older server version is blocked |
| Integrity verification | Optional `WITH CHECKSUM` during backup; verifiable offline with `RESTORE VERIFYONLY` |
| Restore chain | Full backup → optional differential backups → sequential `.trn` log backups in LSN order |
| Extension convention | `.trn` is a naming convention only; SQL Server enforces no specific extension - many shops use `.bak` for all backup types |
| Platform support | Windows (native); Linux supported via SQL Server on Linux (SQL Server 2017+) |
| Released | ~1993 (SQL Server 6.0 era; .trn as convention established in SQL Server 7.0, 1998) |
| Latest version | Compatible with SQL Server 2022 (current); format evolves with SQL Server versions |
| Specification | learn.microsoft.com |
TRN conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about TRN files.