• /
  • EnglishEspañolFrançais日本語한국어Português
  • Se connecterDémarrer

Install & configure NRDOT for MSSQL on Windows RDS: Domain auth

|View as Markdown (English)

Set up Microsoft SQL Server monitoring using the NRDOT Collector on Windows environments to monitor AWS RDS for SQL Server instances, using Windows Domain authentication. To monitor in a self-hosted environment, refer to Windows self-hosted instrumentation.

To install this through the New Relic UI instead, go to one.newrelic.com > Integrations & Agents > MSSQL (OpenTelemetry) . Follow the on-screen instructions to set up the integration. This page covers manual installation only.

This page covers Windows Domain authentication. If your environment uses a different authentication method, see SQL Server Authentication or gMSA.

Prerequisites

Before monitoring your Microsoft SQL Server with NRDOT using Windows Domain Authentication, make sure your environment meets these requirements:

  • A New Relic account with a valid license key.
  • Network connectivity to the New Relic OTLP endpoint for your region.
  • SQL Server requirements:
    • SQL Server 2017 or later on Amazon RDS.
    • RDS master user credentials or credentials for a SQL Server login with the rds_superuser role.
    • RDS Security Group configured to allow connections on port 1433 or a custom port.
    • SQL Server Management Studio (SSMS) or the sqlcmd utility.
    • RDS instance associated with the AWS Active Directory service.
  • Windows Domain Authentication requirements:
    • A Windows domain environment with Active Directory.
    • A domain-joined Windows EC2 instance.
    • RDS SQL Server configured to accept Windows Authentication.
    • A domain user account for the NRDOT Collector to use.
  • Your RDS SQL Server endpoint URL, which can be found in your AWS RDS Console under Connectivity & security. For more information, refer to AWS RDS documentation.

Install NRDOT Collector

Install the NRDOT Collector on a domain-joined EC2 Windows instance or a local Windows machine that is part of the same domain and can connect to your RDS SQL Server instance.

Important

For RDS monitoring, install the NRDOT Collector on an EC2 instance in the same VPC as your RDS instance for optimal network connectivity and lower latency.

  1. Download and install the NRDOT Collector using PowerShell:

    bash
    $
    [Net.ServicePointManager]::SecurityProtocol = 'tls12, tls'; $NRDOT_VERSION = (Invoke-RestMethod -Uri "https://api.github.com/repos/newrelic/nrdot-collector-releases/releases/latest").tag_name; $WebClient = New-Object System.Net.WebClient; $WebClient.Headers.Add("User-Agent", "Mozilla/5.0"); $WebClient.DownloadFile("https://github.com/newrelic/nrdot-collector-releases/releases/download/$NRDOT_VERSION/nrdot-collector_${NRDOT_VERSION}_windows_x64.msi", "$env:TEMP\nrdot-collector.msi"); Start-Process msiexec.exe -ArgumentList "/i `"$env:TEMP\nrdot-collector.msi`" /qn /norestart /L*V `"$env:TEMP\nrdot_install.log`"" -Wait; Get-Service nrdot-collector -ErrorAction SilentlyContinue

Create Windows domain login

Connect to your RDS SQL Server instance using SQL Server Management Studio (SSMS) or sqlcmd with administrative privileges.

In your SQL Server Management Studio (SSMS), run the following script to create a login for your gMSA account and grant the necessary permissions. Replace all occurrences of <YOUR_DOMAIN>\<YOUR_DOMAIN_USER> with your actual domain and account name.

USE [master];
GO
CREATE LOGIN [<YOUR_DOMAIN>\<YOUR_DOMAIN_USER>] FROM WINDOWS;
GO
GRANT VIEW ANY DATABASE TO [<YOUR_DOMAIN>\<YOUR_DOMAIN_USER>];
GRANT VIEW SERVER STATE TO [<YOUR_DOMAIN>\<YOUR_DOMAIN_USER>];
GRANT VIEW ANY DEFINITION TO [<YOUR_DOMAIN>\<YOUR_DOMAIN_USER>];
GO
-- Grant access to all databases (required for query monitoring and tempdb metrics)
DECLARE @name SYSNAME;
DECLARE db_cursor CURSOR READ_ONLY FORWARD_ONLY FOR
SELECT [name] FROM [master].[sys].[databases]
WHERE [name] NOT IN ('master','msdb','model','rdsadmin','distribution')
AND [state] = 0;
OPEN db_cursor;
FETCH NEXT FROM db_cursor INTO @name;
WHILE @@FETCH_STATUS = 0
BEGIN
BEGIN TRY
EXEC('USE [' + @name + '];
IF NOT EXISTS (SELECT 1 FROM sys.database_principals WHERE name = ''<YOUR_DOMAIN>\<YOUR_DOMAIN_USER>'')
BEGIN
CREATE USER [<YOUR_DOMAIN>\<YOUR_DOMAIN_USER>] FOR LOGIN [<YOUR_DOMAIN>\<YOUR_DOMAIN_USER>];
END;
GRANT VIEW DATABASE STATE TO [<YOUR_DOMAIN>\<YOUR_DOMAIN_USER>];');
END TRY
BEGIN CATCH
PRINT 'Error on ' + @name + ': ' + ERROR_MESSAGE();
END CATCH
FETCH NEXT FROM db_cursor INTO @name;
END
CLOSE db_cursor;
DEALLOCATE db_cursor;
GO

Conseil

To securely manage sensitive information, such as database credentials, store them in secret management tools.

Run as domain user

  1. Configure the NRDOT Collector service to run as your domain user using PowerShell. Replace YOUR_DOMAIN\YOUR_USER_ACCOUNT with your domain and account name:

    bash
    $
    # Configure service to use domain account
    $
    # The space after obj= and password= is required syntax for sc.exe
    $
    sc.exe config "nrdot-collector" obj= "YOUR_DOMAIN\YOUR_USER_ACCOUNT" password= "<YOUR_PASSWORD>"
    $
    $
    # Restart the service
    $
    Restart-Service nrdot-collector
  2. Validate the service identity:

    bash
    $
    Get-WmiObject Win32_Service -Filter "Name='nrdot-collector'" | Select Name, State, StartName
    $
    # Expected: StartName = YOUR_DOMAIN\YOUR_USER_ACCOUNT

Configure NRDOT Collector

  1. Create a configuration file named mssql-config.yaml in PowerShell as an Administrator:

    bash
    $
    New-Item -Path "C:\Program Files\nrdot-collector\mssql-config.yaml" -ItemType File
  2. Add the following configuration to the mssql-config.yaml file created in the previous step:

Important

Windows Domain Authentication uses integrated security, which uses the same configuration approach as gMSA authentication. Update the datasource server value to your RDS endpoint. The NRDOT service will authenticate using the domain account you configured in Create Windows domain login.

full configuration

This configuration focuses on essential database monitoring for your RDS environment. To enable comprehensive monitoring with all available metrics, refer to the configuration reference.

mssql-config.yaml
1
receivers:
2
nrsqlserver:
3
collection_interval: 15s
4
datasource: "server=mydb-instance.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com;port=1433;integrated security=true;encrypt=true;TrustServerCertificate=true;"
5
6
# Enable comprehensive database metrics
7
metrics:
8
sqlserver.database.count:
9
enabled: true
10
sqlserver.database.io:
11
enabled: true
12
sqlserver.database.latency:
13
enabled: true
14
sqlserver.database.operations:
15
enabled: true
16
sqlserver.database.tempdb.space:
17
enabled: true
18
sqlserver.database.tempdb.version_store.size:
19
enabled: true
20
sqlserver.deadlock.rate:
21
enabled: true
22
sqlserver.os.wait.duration:
23
enabled: true
24
sqlserver.processes.blocked:
25
enabled: true
26
sqlserver.memory.grants.pending.count:
27
enabled: true
28
sqlserver.database.file.size:
29
enabled: true
30
sqlserver.memory.area:
31
enabled: true
32
33
# Enable query sample, top query, query plan, and top procedure log collection
34
events:
35
db.server.query_sample:
36
enabled: true
37
db.server.top_query:
38
enabled: true
39
db.server.query_plan:
40
enabled: true
41
db.server.top_procedure:
42
enabled: true
43
44
# Top query collection configuration
45
top_query_collection:
46
lookback_time: 60s
47
max_query_sample_count: 1000
48
top_query_count: 250
49
collection_interval: 60s
50
collect_full_query_text: true
51
allowed_comment_keys:
52
- nr_service_guid
53
54
# Query sample collection configuration
55
query_sample_collection:
56
max_rows_per_query: 100
57
collect_full_query_text: true
58
allowed_comment_keys:
59
- nr_service_guid
60
61
# Top stored procedure collection configuration
62
top_procedure_collection:
63
max_procedure_sample_count: 1000
64
top_procedure_count: 250
65
collection_interval: 60s
66
67
resource_attributes:
68
db.system.version:
69
enabled: true
70
sqlserver.db.edition:
71
enabled: true
72
73
processors:
74
memory_limiter:
75
check_interval: ${env:NR_MEM_LIMITER_CHECK_INTERVAL:-1s}
76
limit_mib: ${env:NR_MEM_LIMITER_LIMIT_MIB:-200}
77
spike_limit_mib: ${env:NR_MEM_LIMITER_SPIKE_MIB:-50}
78
79
exporters:
80
otlp:
81
endpoint: https://otlp.nr-data.net:4318
82
headers:
83
api-key: YOUR_LICENSE_KEY
84
tls:
85
insecure: false
86
compression: gzip
87
88
sending_queue:
89
enabled: true
90
sizer: bytes
91
queue_size: 100_000_000
92
num_consumers: 10
93
batch:
94
sizer: bytes
95
max_size: 1_000_000
96
min_size: 0
97
flush_timeout: 5s
98
99
service:
100
telemetry:
101
metrics:
102
level: none
103
104
pipelines:
105
metrics:
106
receivers: [nrsqlserver]
107
processors: [memory_limiter]
108
exporters: [otlp]
109
110
logs:
111
receivers: [nrsqlserver]
112
processors: [memory_limiter]
113
exporters: [otlp]

Conseil

  • The logs pipeline doesn't carry collector debug or internal agent logs. It transmits SQL Server query telemetry, including query text, execution plans, and sample data. The nrsqlserver receiver captures this telemetry through db.server.query_sample, db.server.top_query, db.server.query_plan, and db.server.top_procedure events emitted as OpenTelemetry log records.

  • The db.server.top_procedure event requires SQL Server 2017 CU3 or later, which introduced support for sys.dm_exec_procedure_stats.total_spills. On earlier versions, this event doesn't emit data and logs an error. Other events remain unaffected. Accessing sys.dm_exec_procedure_stats requires VIEW SERVER STATE (or VIEW SERVER PERFORMANCE STATE, depending on the SQL Server version). Additionally, VIEW ANY DEFINITION is required for OBJECT_NAME and OBJECT_SCHEMA_NAME to resolve correctly across all user databases, and CONNECT SQL is needed to set up initial sessions. The account you configured in Create Windows domain login already has all 3 permissions.

Update Windows Service Registry

  1. Update the Windows Service Registry to use the new mssql-config.yaml file using one of the following methods:

    • For PowerShell: Run the following command as Administrator:

      bash
      $
      Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\nrdot-collector" -Name "ImagePath" -Value '"C:\Program Files\nrdot-collector\nrdot-collector.exe" --config "C:\Program Files\nrdot-collector\mssql-config.yaml"'
    • For Command Prompt: If PowerShell isn't available, use Command Prompt instead and run the following command as Administrator:

      bash
      $
      sc config "nrdot-collector" binPath= "\"C:\Program Files\nrdot-collector\nrdot-collector.exe\" --config \"C:\Program Files\nrdot-collector\mssql-config.yaml\""
  2. Validate the NRDOT Collector configuration to ensure it's correctly formatted and will work properly:

    bash
    $
    & "C:\Program Files\nrdot-collector\nrdot-collector.exe" validate --config="C:\Program Files\nrdot-collector\mssql-config.yaml"

Conseil

To correlate your application performance with database operations, you can set up database service identification. For more information, refer to database service identification setup guide.

Restart NRDOT Collector

After updating your configuration, restart the NRDOT Collector service:

bash
$
net stop nrdot-collector
$
net start nrdot-collector

Verify the service is running under the domain account by checking Windows Services (services.msc). The Log On As column should show your domain account. For example, CORP\SQLMonitor.

Find and use your data

Once your data is being collected, you can access comprehensive SQL Server database monitoring through the New Relic UI.

To find your SQL Server database entity in New Relic:

  1. Go to https://one.newrelic.com > All Capabilities > Databases.

  2. From the Entity type dropdown, select MSSQL instance, then click Apply.

  3. Select your SQL Server database from the list of entities.

    After setting up SQL Server monitoring with NRDOT, you can:

Set up APM-database correlation

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

Troubleshooting

Learn how to troubleshoot your MSSQL Windows monitoring setup in New Relic.

Metrics reference

Learn about the available metrics collected by the NRDOT Collector.

Droits d'auteur © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.