Skip to main content
GrowthBook runs SELECT queries against Microsoft SQL Server to compute experiment results. Create a dedicated read-only login, allow network access from GrowthBook, then add the connection in Metrics and DataData Sources.

1. Create a read-only login

Grant SELECT only on the schema that holds experiment assignment and metric events.
Replace dbo with your analytics schema if events live elsewhere.

2. Allow network access

If you use GrowthBook Cloud, whitelist 52.70.79.40 in your SQL Server firewall, security group, or Azure allowlist. SQL Server typically listens on port 1433. Self-hosted GrowthBook runs in Docker. To reach a database on the host machine, use host.docker.internal as the server instead of localhost.

3. Add SQL Server in GrowthBook

  1. Go to Metrics and DataData Sources.
  2. Choose MS SQL Server (guided setup if you use a supported event tracker, or manual setup for a custom schema).
  3. Enter the connection fields:
  1. Save. GrowthBook runs a SELECT 1 query to confirm the connection.

4. Map assignments and metrics

After the connection succeeds, define experiment assignment queries and Fact Tables. SQL Server supports the Schema Browser, so you can inspect tables and columns while writing SQL.