File Data Sources

On Windows operating systems, ODBC data sources are typically stored in the system registry. File data sources are an alternative, which are stored as files. File data sources are supported on both Windows and UNIX systems.

In Windows, file data sources typically have the extension .dsn. They consist of sections, each section starting with a name enclosed in square brackets. DSN files are very similar in layout to initialization files.

To connect using a File Data Source, use the FileDSN connection parameter. You cannot use both DSN and FileDSN in the same connection.

File Data Sources Can Be Distributed

One benefit of file data sources is that you can distribute the file to users, so that connection information does not have to be reconstructed on each machine. If the file is placed in the default location for file data sources, it is picked up automatically by ODBC. In this way, managing connections for many users can be made simpler.

Note: Because DSNs are stored in the Windows registry, they are public information. For this reason you should not put a password in a DSN, unless you encrypt it. If you want to store your password in your data source, use a File DSN.

Embedded SQL applications can also use ODBC file data sources.

Related concepts
Ways to Connect
Supported Connection Interfaces
Connection Status
How Connection Parameters Work
Connection Parameters in ODBC Data Sources
Interactive SQL Connections
Connections from Other Databases
How to Test Connections
Integrated Logins
Connection Pooling
Temporary Connections
Logical Server Configuration
How to End Connections
Connection Logging
Related reference
Roadmap for Connections