A data source name (DSN) is a data structure containing information about a specific database to which an Open Database Connectivity (ODBC) driver needs to connect. (Note: DSN also stands for Deep Space Network.)
The DSN, which resides either in the registry or as a separate text file, contains information such as the database name, directory and driver. Depending on the type of DSN, it can also contain information like the ID and password of the user.
A developer creates a separate DSN for each database and specifies its DSN within a program to connect to a particular database. In contrast, DSN-less connections require that all the necessary information be defined within the program.
There are three types of data source names:
The user DNS and system DSN are specific to a particular computer and store DSN data in the registry.
A user DSN allows database access for a single user on a single computer, and a system DSN for any user of a particular computer. A file DSN contains the relevant information within a text file with a .DSN file extension. Users of different computers with the same drivers installed can share this file.
In an Oracle database, an ODBC DSN stores the data required to connect to a database hosted on a remote database server. A DSN system enables access to multiple users, not just the user who created it.
In the enterprise accounting software QuickBooks, DSN is a text file that contains information required for the QuickBooks program to access QuickBooks company files.
See also: Java Database Connectivity driver, data management, database management system, relational database management system, object-oriented database management system, managing databases in a hybrid cloud, open source vs. proprietary database management
21 Dec 2022