What is DSN

What is DSN ? DSN stands for Data Source Name. DSN is a data structure containing the information about the database required by the ODBC Open database connectivity drivers for creating a connection with the database. After we create a DSN, the DSN is used from the application to call information from the database or send information to the database.

A DSN consists of the information related to the database driver type, database name, the directory and the user name and password to connect to a database. For each database a separate DSN needs to be created. DSN are stored in the system registry in the Microsoft system while they are stored as files with extension as .ini in the UNIX systems.

Three kinds of DSN:
1. User DSN – only accessible by the user who created the DSN from the computer.
2. System DSN – accessible to all the users who log into the computer from which the DSN has been created.
3. File DSN – The DSN information stored on a text file with an extension as .dsn and the file could be shared , used by other users who has the same driver installed in their machined

We also have the option to have no DSN connection to perform a database call. They are called “DSN less Connections”. The developer could code the information about the database in the program directly and it is possible to avoid ODBC drivers and DSN to make a call to the database.

How to create a DSN connection:

Open your control panel and open the ODBC administrator console.

  • Step 1: Choose the type of DSN
  • Step 2: Click add to create new DSN
  • Step 3: Choose the ODBC driver to be used
  • Step 4: Provide the DSN name, description and the database server location
  • Step 5: Provide the user credentials for the specific database
  • Step 6: Click Test connection to complete setting up the DSN. You would get the message as test succeeded.
  • You are good to use this DSN from you application to make a call to the database.

    Related posts:

    1. Get MySQL ODBC Driver MySQL provides standards based ODBC drivers for all programmers to...
    2. What is ODBC What is ODBC ? ODBC abbreviation for Open Database Connectivity...
    3. What is JDBC JDBC is the Java owned java developed API alternative to...
    4. Where can i get ODBC driver ODBC is the Open Database Connectivity software component which requires...
    5. Oracle ODBC Driver ODBC is the industry standard way to connect to SQL...


    Liked this post ? Subscribe to MWolk Blog via RSS Feed or via Email and receive free daily Tech and Money making tips.

    No Responses to “What is DSN”

    No feedback yet.

    Leave a Reply

    Name Email Website URI