Home Search

DriveWorks Pro 21
How To: Troubleshoot SQL Connection (KB13103032)

Send Feedback

How To: Troubleshoot SQL Connection

This article discusses issues relating to connecting to a SQL database.

Could not connect to the database or #DBCONNECT!

When attempting to connect to a SQL database that is hosted on a network you may get the message:

  • Could not connect to the database

    Or

  • #DBCONNECT!

The following may resolve connection issues.

Ensure SQL Services are running and have the correct permissions

On the machine hosting the SQL database:

  1. Open Windows Services (in the Windows search type Services).
  2. Scroll down the list of installed Services until you see the following:
    • SQL Server (suffixed with the installed edition)
    • SQL Server Browser (suffixed with the installed edition)
  3. Ensure the status of both of the above are Running and the Startup Type is Automatic.

To change the Status:

  1. Select the Service from the list of services.
  2. Select the link to Start the service.

To change the Startup Type:

  1. Select the Service from the list of services.
  2. Right click and select Properties.
  3. From the General tab change the Startup Type to Automatic.

    This will ensure that if the machine reboots the service will start automatically.

To check permissions:

  1. Select the Service from the list of services.
  2. Right click and select Properties.
  3. From the Log On tab ensure Local System account is selected.

    This ensures the account used to log onto the machine, hosting SQL, can access the database.

Enable Remote Access for SQL Server

It could be that SQL Server is not configured for remote access.

To change this setting please refer to the article How To: Configure SQL Server for Remote Access.

Check if Windows Firewall is blocking the connection

The advice below is specifically for Windows Defender Firewall.

Other Firewalls will have similar features to diagnose SQL connection issues.

Temporarily turn off Windows Firewall:

This is a temporary measure only to determine if Firewall is the issue.

Please restore the Firewall to its original state once troubleshooting has been done.

  1. Open Windows Defender Firewall.
  2. Click the link to Turn Windows Defender Firewall on or off.
  3. Select the options to Turn off Windows Defender Firewall for each type of network that you use.
  4. Test connection to SQL Server can now be established from the machine it previously failed on.

Configure Windows Firewall:

If connection to the SQL Server is now available, Windows Firewall can be turned back on and configured to allow access to SQL Server.

There are two methods for configuring Windows Firewall for SQL Server.

Choose one of the two methods below, that best suits your IT policy:


Knowledge Base Article Ref:KB13103032