How do I configure a DSN to connect to my MS SQL Express database on my Windows VDS?

The following article explains how to configure a DSN to connect to your SQL Express database on your Windows VDS. The DSN can be used within your code to link your website to your database. Through the DSN you can retrieve information from the database and add new information to the database.

To configure a DSN, please follow these steps:

1) Log into your server through Remote Desktop Connection (instructions for connecting to your server through RDC can be found here).

2) Click Start, Programs, Administrative Tools, and select Data Sources (ODBC).

3) On the SystemDSN tab, click Add.

4) Scroll through the list of drivers and select SQL Server.

5) Click Finish.

6) Enter the requested information:

  • Name: enter the name for the DSN
  • Description: enter a description for the DSN (Optional)
  • Server: enter the IP address of your server, followed by \SQLEXPRESS

7) Click Next.

8) Enter the requested information:

  • Select With SQL Server authentication
  • Login ID: enter the SQL username for the database
  • Password: enter the SQL password for the database

9) Click Client Configuration.

10) Uncheck Dynamically determine port and set the Port number to 1433.

11) Click OK.

12) Click the Next button twice and then click Finish.

13) Click Test Data Source to ensure the data source is configured properly.

14) Once the test completes, click OK.