Connecting SQL Server
Connect a Microsoft SQL Server database to FreshGuard for monitoring.
SQL Server requires a Starter plan or higher. Starter+
Connection Fields
| Field | Description | Example |
|---|---|---|
| Server | Hostname or IP address | sql.example.com |
| Port | SQL Server port (default 1433) | 1433 |
| Database | Database name | Analytics |
| Username | SQL Server login | freshguard_reader |
| Password | Login password | — |
| Encrypt | Require encrypted connection | true |
| Trust Server Certificate | Trust the server’s TLS certificate | false |
Setup Steps
- In the FreshGuard dashboard, go to Sources and click Add Source.
- Select SQL Server.
- Enter the server address, port, database name, username, and password.
- Set Encrypt to
truefor production servers (recommended). - Click Test Connection to verify access.
- Save.
Info
Set Trust Server Certificate to true only if your server uses a self-signed certificate. For production environments with valid certificates, leave it as false.
Named Instances
If your SQL Server uses a named instance, include the instance name in the Server field:
sql.example.com\INSTANCENAMEWhen using a named instance, the port is typically determined automatically via the SQL Server Browser service. You can leave the port field at the default if the Browser service is available.
Common Issues
Connection Timeout
- Verify TCP/IP is enabled in SQL Server Configuration Manager.
- Check that the SQL Server port (default 1433) is open in your firewall.
- Ensure SQL Server Browser service is running if you’re connecting to a named instance.
Authentication Failed
- Confirm SQL Server authentication is enabled (mixed mode authentication).
- Verify the login exists and has access to the target database.
Encryption Errors
- If you see TLS/SSL errors, try setting Trust Server Certificate to
true(for self-signed certificates only). - For production, use a valid TLS certificate and keep Trust Server Certificate as
false.
Recommended Setup
Create a dedicated read-only login for FreshGuard. See the SQL Server: Read-Only Login guide for the exact T-SQL commands.