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.
- Launch the ODBC Data Source Administrator.
-
On the System DSN tab, click Add.
The Create a New Data Source dialog is displayed.
- Select SQL Server Native Client 11.0 .
-
Click Finish.
The Create a New Data Source to SQL Server dialog is displayed.
-
In the Name and Description fields, type an appropriate name and description for the data source, for example,
mmsdata1.
- From the Server list, select (local) or the appropriate server name.
-
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.
- Click Next.
- Select the Change the Default Database to check box and select the corresponding database name from the list; for example, mmsdata1.
- Click Next.
- (If applicable) Complete the fields in the succeeding screen that allow you to add to the database settings, for example, language for system messages.
-
Click Finish.
The ODBC Microsoft SQL Server Setup dialog is displayed.
-
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.
- In the ODBC Data Source Administrator dialog, click OK to complete the connection.