Error: You cannot connet to the SQL server. Please make sure the SQL Server is running and allows remote connection
All versions of supported DirectAudit collector on all supported platforms.
Collectors are unable to connect to SQL servers in a remote forest after following steps outlined in KB-4122. Configuring collectors and testing connection to SQL server may result in the following error:
You cannot connect to the SQL server. Please make sure the SQL Server is running and allows remote connection
Below are likely reasons for the error message.
1. Firewall issues.
If the database is a named instance running on a non-default port, the client will rely on SQL browser service when port number is not specified in the connection string.
a. Ensure that the SQL browser service is running. b. Ensure firewall is not blocking the incoming requests to SQL browser service. UDP port 1434 must be allow through firewall for SQL browser service to work. If Windows firewall is used, please ensure that firewall rules are applied to the correct network type, e.g. Domain/work, home, or public.
2. SQL login permission issues.
Ensure that the SQL user is assigned the collector role. In Audit Store databases, there is a role called "collector" and this role is needed for the collector to function correctly using a SQL login. The following command can be used to add a user to the collector database role.