Creating ODBC Connections for SQL

You must first create a data source name (DSN) , which contains the information on how to connect to the database.

  1. Launch the ODBC Data Source Administrator.
  2. On the System DSN tab, click Add.
    The Create a New Data Source dialog is displayed.
  3. Select SQL Server Native Client 11.0 .
  4. Click Finish.
    The Create a New Data Source to SQL Server dialog is displayed.
  5. In the Name and Description fields, type an appropriate name and description for the data source, for example,

    mmsdata1.

  6. From the Server list, select (local) or the appropriate server name.
  7. Click Next. Another screen is displayed asking you to define how SQL Server will verify authenticity of the login ID.
    By default, the following options: With Integrated Windows authentication and Connect to the SQL Server to obtain the default settings for the additional configuration options are selected.
  8. Click Next.
  9. Select the Change the Default Database to check box and select the corresponding database name from the list; for example, mmsdata1.
  10. Click Next.
  11. (If applicable) Complete the fields in the succeeding screen that allow you to add to the database settings, for example, language for system messages.
  12. Click Finish.
    The ODBC Microsoft SQL Server Setup dialog is displayed.
  13. To ensure that the connection is working, click Test Data Source.
    A message box indicates whether or not the test was successful. Click OK. If there is an error, resolve the problem indicated in the error message.
  14. In the ODBC Data Source Administrator dialog, click OK to complete the connection.