Data Source Name (DSN)

DSN, or Data Source Name, is a unique name used to create a data connection to a database using open database connectivity (ODBC).

What is Data Source name (DSN)?

A unique name used to create a data connection to a database using open database connectivity (ODBC). The data source name (DSN) is used by applications that need to access or manage data in the database.

All ODBC connections require that a DSN be configured to support the connection. When a client application wants to access an ODBC-compliant database, it references the database using the DSN.

Graphic D-7. Data source name (DSN).

You can configure a DSN for an ODBC-compliant database using the Microsoft Windows NT ODBC or the Windows 2000 Administrative Tools\Data Sources (ODBC) utility in Control Panel. You can create three kinds of DSNs:

  • A user DSN, which is visible only to the user who creates it and can be used only on the current machine.
  • A system DSN, which is visible to all users on the machine and is also accessible to Windows NT and Windows 2000 services. A system DSN is stored in the registry.
  • A file DSN, which can be shared by users who have the same ODBC drivers installed. A file DSN is stored in a file.
TIP

When you design Web applications that use Microsoft ActiveX Data Objects (ADO) for accessing database information, be sure to use either a file DSN or a system DSN because ADO does not work with user DSNs.