---
title: Multi-receiver configuration for MSSQL with NRDOT
source: https://docs.newrelic.com/docs/opentelemetry/database/mssql/multi-receiver
---

> #### 💡 PREVIEW
>
> We're still working on this feature, but we'd love for you to try it out!
>
> This feature is currently provided as part of a preview pursuant to our [pre-release policies](https://docs.newrelic.com/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy/).

You can configure the NRDOT Collector to monitor multiple MSSQL instances from one collector. This is useful if you have multiple MSSQLs running on different hosts and want to collect metrics from all of them using a single NRDOT Collector instance.

## Prerequisites [#prerequisites]

-   NRDOT is installed and configured for your MSSQL instances:
    -   [Linux RDS](https://docs.newrelic.com/docs/opentelemetry/database/mssql/linux-rds)
    -   [Linux Hosted](https://docs.newrelic.com/docs/opentelemetry/database/mssql/linux-hosted)
    -   [Windows Hosted](https://docs.newrelic.com/docs/opentelemetry/database/mssql/windows-hosted)
    -   [Windows RDS](https://docs.newrelic.com/docs/opentelemetry/database/mssql/windows-rds)

## Add multi-receiver configuration [#multi]

The following examples show how to configure the NRDOT Collector to monitor multiple MSSQL instances using a multi-receiver configuration. Select the deployment type that matches your environment. You can add more receivers as needed for additional instances.

```yaml
receivers:
  nrsqlserver/1: &nrsqlserver-common
    username: "<YOUR_DB_USERNAME>"
    password: "<YOUR_DB_PASSWORD>"
    server: "<YOUR_SERVER_1>"
    port: <YOUR_PORT_1>
    collection_interval: 30s
    # Add any additional configuration here (metrics, events, query collection, etc.)
    # All settings are automatically inherited by additional receiver instances.
  nrsqlserver/2:
    <<: *nrsqlserver-common
    username: "<YOUR_DB2_USERNAME>"
    password: "<YOUR_DB2_PASSWORD>"
    server: "<YOUR_SERVER_2>"
    port: <YOUR_PORT_2>
  # Add more instances as needed:
  # nrsqlserver/3:
  #   <<: *nrsqlserver-common
  #   username: "<YOUR_DB3_USERNAME>"
  #   password: "<YOUR_DB3_PASSWORD>"
  #   server: "<YOUR_SERVER_3>"
  #   port: <YOUR_PORT_3>

service:
  pipelines:
    metrics:
      receivers: [nrsqlserver/1, nrsqlserver/2]  # Add nrsqlserver/3, nrsqlserver/4, ... as needed
      processors: [<YOUR_PROCESSORS>]
      exporters: [otlp]
    logs:
      receivers: [nrsqlserver/1, nrsqlserver/2]  # Add nrsqlserver/3, nrsqlserver/4, ... as needed
      processors: [<YOUR_PROCESSORS>]
      exporters: [otlp]
```

The `<<: *nrsqlserver-common` merge key inherits all settings from `nrsqlserver/1`. Any field you explicitly set after it, such as `username`, `password`, `server`, and `port`, overrides the inherited value for that specific receiver instance.

> #### ⚠️ IMPORTANT
>
> Each time you add a new receiver instance (for example, `nrsqlserver/3`), also add it to the `receivers` list in both the `metrics` and `logs` pipelines under `service.pipelines`. A receiver defined in the `receivers` block but missing from `service.pipelines` won't collect any data.

## Restart NRDOT Collector [#restart]

Restarting is required, not optional — the collector loads its configuration once at startup and doesn't hot-reload. Any configuration change has no effect until you restart the process.

```bash
sudo systemctl restart nrdot-collector
```

## Related documentation [#related-docs]

[Linux instrumentation for self-hosted environments](https://docs.newrelic.com/docs/opentelemetry/database/mssql/linux-hosted)

Learn how to set up MSSQL monitoring in self-hosted Linux environments with New Relic.

[Windows instrumentation for self-hosted environments](https://docs.newrelic.com/docs/opentelemetry/database/mssql/windows-hosted)

Learn how to set up MSSQL monitoring in self-hosted Windows environments with New Relic.

[Set up APM-database correlation](https://docs.newrelic.com/docs/opentelemetry/database/capabilities/db-apm)

Learn how to correlate your application performance with database operations in New Relic.
