Skip to main content

Connecting SQL Server

Connect a Microsoft SQL Server database to FreshGuard for monitoring.

SQL Server requires a Starter plan or higher. Starter+

Connection Fields

FieldDescriptionExample
ServerHostname or IP addresssql.example.com
PortSQL Server port (default 1433)1433
DatabaseDatabase nameAnalytics
UsernameSQL Server loginfreshguard_reader
PasswordLogin password
EncryptRequire encrypted connectiontrue
Trust Server CertificateTrust the server’s TLS certificatefalse

Setup Steps

  1. In the FreshGuard dashboard, go to Sources and click Add Source.
  2. Select SQL Server.
  3. Enter the server address, port, database name, username, and password.
  4. Set Encrypt to true for production servers (recommended).
  5. Click Test Connection to verify access.
  6. 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\INSTANCENAME

When 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.

Create a dedicated read-only login for FreshGuard. See the SQL Server: Read-Only Login guide for the exact T-SQL commands.