Что такое формат файла DSN?
.dsn files are used by various database programs to connect to databases. A .dsn file stores information necessary for establishing a remote connection with a database, including server address, driver name, user ID, and database name - though credentials stored in the file remain in clear text, which is a security consideration.
Data in text format
Data in .dsn files is saved in plain-text INI-style format, organized under an [ODBC] section header with key=value pairs such as DRIVER=, SERVER=, and DATABASE=. A typical .dsn file is under 1 KB. However, some database applications instead of .dsn files use entries in the Windows registry (System or User DSNs) - only File DSNs exist on disk as .dsn files.
.dsn files as a means of connecting to a database
ODBC (Open Database Connectivity) application drivers use .dsn files for establishing connections to databases - for example, Microsoft Access (.accdb / .mdb) or Microsoft SQL Server. The .dsn file itself contains no table data; it is a small connection pointer that tells the ODBC driver how to locate and authenticate to the target database. Beyond Windows, macOS (via iODBC) and Linux (via unixODBC) can also read .dsn files. A .udl file serves a similar purpose for OLE DB connections.
Безопасность и защита
РИСК: MEDIUMA .dsn is plain text and contains no executable code, so opening it cannot run anything. The real risk is confidentiality, not malware: a File DSN stores connection details in clear text - server name, database, login, and depending on the driver sometimes a password - so treat .dsn files like credentials. Don't email them around, don't commit them to public repos, and remove or mask passwords before sharing. If you received an unexpected .dsn, inspect it in a text editor before using it to see exactly what server it points at.
Детали формата
в двух словах- OrCAD / Allegro PCB schematic design (.dsn) - Cadence OrCAD Capture design file (and Specctra/Allegro routing .dsn); an electronics CAD design, not an ODBC config.
- Design Compiler / EDA design files - Some electronic-design-automation tools use .dsn for circuit/board design data.
Программы, открывающие файлы DSN
Технические подробности
глубокая спецификация| Format type | Plain-text INI-style connection configuration file |
| MIME type | text/plain |
| File encoding | ASCII / ANSI; no Unicode requirement |
| Typical file size | Under 1 KB - a few lines of key=value pairs |
| File structure | INI file with an [ODBC] section listing DRIVER=, SERVER=, DATABASE=, UID= and driver-specific keys |
| Binary signature | None - plain text; typically begins with the [ODBC] INI section header at offset 0 |
| Encryption | None - credentials stored in clear text (security risk if file is shared or left unprotected) |
| Platform support | Windows (native ODBC), macOS (iODBC, unixODBC), Linux (unixODBC) |
| Data content | Connection metadata only - no table data, rows, or schema |
| DSN storage types | File DSN (.dsn on disk), System DSN (Windows registry HKLM), User DSN (Windows registry HKCU) - only File DSN produces a .dsn file |
| Common connection keys | DRIVER, SERVER, DATABASE, UID, PWD, DBQ (for Access path), PORT - plus driver-specific keys |
| Managed by | ODBC Data Source Administrator (odbcad32.exe) on Windows, iODBC Administrator on macOS, or any plain-text editor |
| Common alternatives | UDL files (OLE DB), DSN-less connection strings embedded in application config |
| Выпущен | Microsoft ODBC (early 1990s); File DSN since ODBC 3.0 (1996) |
| Последняя версия | N/A - tied to the ODBC driver/spec, not separately versioned |
| Открыть стандартное | Да · без роялти |
| Спецификация | learn.microsoft.com |