Why am I receiving "Could not connect to SQL" the first time I try and launch Acctivate?

For some users, they may receive a "Could not connect to SQL" message on their workstations the first time they try and launch Acctivate. The second attempt usually works. This article will tell you how to fix this so that the first try works.

If your workstations are struggling to connect to SQL their first time, more than likely this is caused by the incorrect protocol setting on your firewall.

Both SQL Server and the SQL Browser should have exclusions on the server. The SQL Server service is the master service which runs SQL and the databases. The SQL Browser service is how workstations connect to the database and perform tasks within Acctivate. 

Any of the suggestions and steps in this article should be taken only by an IT professional within your company. The Acctivate support team is unable to advise on the specific security needs of your server.

Ensure that both of the following are true:

  • SQL Server Browser Service is allowed through the firewall.
  • SQL Server Browser Service protocol is set to "Any"

If SQL Browser is NOT allowed through the firewall take these steps:

(Please Note: These steps are for the default Window's firewall. If you are using a different one, please refer to their documentation/support team)

  1. Open the "Services" app on your server. You can do this by searching "Services" on the taskbar.
  2. Locate the "SQL Server Browser" service and right click it then select "Properties."
  3. Copy the "Path to executable: …"
    1. This should be something similar to "C:\Program Files (x86)\Microsoft SQL Server\90\Shared\sqlbrowser.exe"
  4. Open the "Windows Defender Firewall with Advanced Security" app on your database server computer. This is the main computer for Acctivate.
  5. Create a new rule by right clicking the "Inbound Rules" on the left side and selecting "New Rule."
  6. Select the "Program" rule for the rule type and click "Next"
  7. Enter in the path you copied in step 3 without the quote marks.
  8. Select "Allow the connection"
  9. Select the network type in which this applies too. Most likely Domain or Private.
  10. Give the Rule a name and optionally a description. 

If SQL Browser is allowed through the firewall, then ensure that the "Protocol" is set to "Any" so that workstations can connect with whichever protocol is needed:

firewall

If the Protocol is NOT set to "Any" then take these steps:

  1. Double click on the "SQL Browser" rule.
  2. In the "Properties" window that appears, click on the "Protocols and Ports" tab.
  3. Change the "Protocol" type to "Any"
  4. Click OK.