How to set up an ODBC Data Source for a SQL Server database on a Windows Server

Many web applications require that you set up an ODBC Data Source which serves as a sort of pointer to a particular database which specifies which driver and credentials to use to connect. Here’s how to set up one for SQL Server/SQL Server Express on a Windows 2003 server.

  1. Select Start > Administrative Tools > Data Sources(ODBC)

     odbc data sources


  2. Select the System DSN tab, and click the Add button.

    2010-08-18_17.58.49.jpg


  3. Select the SQL Server driver, and click Finish.

    2010-08-18_17.59.40.jpg


  4. The Create a New Data Source to SQL Server wizard will launch. Type a name for the data source, and a description. Then select the SQL Server name from the dropdown menu.

    2010-08-18_18.00.41.jpg


  5. If you are using a domain account to log in to SQL server, select the first option and the account name you are logged in to the Windows server with will be shown. In this example, I’m using a local SQL Server account, entered as shown. Enter the appropriate database administrator credentials and click Next.

    2010-08-18_18.01.33.jpg


  6. You’ll be returned to the Create a New Data Source window. Click Next.

    2010-08-18_18.03.31.jpg


  7. The name you chose for the database will show up as the default. Click Next.

    2010-08-18_18.06.21.jpg


  8. Leave the settings at the defaults, unless you want to log queries or statistics to a file. Click Finish.

    2010-08-18_18.06.40.jpg


  9. Your chosen settings will be displayed. Test the Data Source to make sure it will connect, then click “OK.”

    2010-08-18_18.07.06.jpg