• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Windows RDS MSSQL monitoring with NRDOT

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.

Set up Microsoft SQL Server monitoring using the NRDOT collector on Windows environments to monitor AWS RDS for SQL Server instances.

Based on your RDS SQL Server security configuration, you can choose from three authentication methods to connect the NRDOT Collector to your RDS instance:

Prerequisites

Ensure your environment meets our compatibility and prerequisites.

Setup the NRDOT Collector

Install the NRDOT Collector on an EC2 Windows instance or a local Windows machine that 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:

    [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
  2. Ensure your security group allows inbound connections from the NRDOT Collector host to your RDS instance on port 1433 (or your custom port).

Configure database user

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

Run the following script to create the newrelic monitoring user with appropriate permissions:

USE [master];
GO
CREATE LOGIN [newrelic] WITH PASSWORD = '<PASSWORD>';
GO
GRANT VIEW SERVER STATE TO [newrelic];
GRANT VIEW ANY DEFINITION TO [newrelic];
GRANT VIEW ANY DATABASE TO [newrelic];
GO
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 = ''newrelic'')
BEGIN
CREATE USER [newrelic] FOR LOGIN [newrelic];
END;
GRANT VIEW DATABASE STATE TO [newrelic];');
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

Tip

For RDS: Use your RDS master username (or a user with rds_superuser role) to execute these commands. The script automatically excludes the rdsadmin database which is reserved by AWS.

Configure NRDOT Collector

Select your configuration type based on your monitoring needs:

Configuration parameters

The following table describes the key configuration parameters for the nrsqlserver receiver:

ParameterDescription
usernameEnter your database username for authentication
passwordEnter your database password for authentication
serverEnter your RDS SQL Server endpoint
portEnter your SQL Server port number. The default value is 1433.
endpointEnter the New Relic OTLP endpoint . For more information, refer to New Relic OTLP endpoints documentation.
licenseKeyEnter your New Relic license key.

Tip

Note: The max_concurrent_queries option controls how many metric queries the receiver executes in parallel against SQL Server during each scrape cycle.

receivers:
nrsqlserver:
max_concurrent_queries: 4 # default is 4 if omitted or set to 0

Tip

Note: If you enable all available metrics, increase the limit_mib value (e.g., 1000) to prevent the memory limiter from dropping data.

Update Windows Service Registry

Update the Windows Service Registry to use the new mssql-config.yaml file.

Method 1: PowerShell

Run the following command in PowerShell as Administrator:

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"'

Method 2: Command Prompt (Alternative)

If PowerShell is not available, you can use Command Prompt instead:

  1. Open your Start Menu, type cmd
  2. Right-click Command Prompt and choose Run as administrator
  3. Copy and paste this exact command into the black CMD window and hit Enter:
sc config "nrdot-collector" binPath= "\"C:\Program Files\nrdot-collector\nrdot-collector.exe\" --config \"C:\Program Files\nrdot-collector\mssql-config.yaml\""

Validate NRDOT Collector Configuration

Validate the NRDOT Collector configuration to ensure it's correctly formatted and will work properly.

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

Restart NRDOT collector

After updating your configuration, restart the NRDOT Collector service on your EC2 or local Windows machine:

net stop nrdot-collector
net start nrdot-collector

Tip

Always restart the NRDOT collector service after making configuration changes to ensure the new settings take effect.

(Optional) Set up APM-database correlation

To correlate your application performance with database operations, you can set up database service identification. This feature allows you to see exactly which applications are generating specific database workloads. For more information, refer to set up database service identification to get APM-database correlation in New Relic.

Important

To view database performance data in APM, both entities must be in the same New Relic account. If the entities are in different New Relic accounts, you must have access to both accounts to view the data.

(Optional) Configure secret management

The secret management feature allows you to securely manage sensitive information, such as database credentials. This helps to enhance the security of your monitoring setup by avoiding hardcoding sensitive data in configuration files. For more information, refer to secret management.

Find and use your data

Once your data is being collected, you can access comprehensive SQL Server database monitoring through New Relic's 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.

Prerequisites

Ensure your environment meets our compatibility and prerequisites.

Additional requirements for Windows Domain Authentication with RDS:

  • Windows domain environment with Active Directory
  • Domain-joined Windows EC2 instance or local machine
  • RDS SQL Server configured to accept Windows Authentication
  • Domain user account with appropriate SQL Server permissions
  • Security group configured to allow connections on SQL Server port (default 1433)

Enable your Microsoft SQL Server

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

Run the following script to create a Windows domain login and grant necessary permissions:

USE master;
CREATE LOGIN [DomainName\DomainUser] FROM WINDOWS;
GRANT VIEW ANY DATABASE TO [DomainName\DomainUser];
GRANT VIEW SERVER STATE TO [DomainName\DomainUser];
GRANT VIEW ANY DEFINITION TO [DomainName\DomainUser];
GO

Important

Replace DomainName\DomainUser with your actual domain and username (e.g., CORP\SQLMonitor).

Grant READ access privileges

Use the following statements to grant READ access privileges to the domain user across all databases:

-- 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 = ''DomainName\DomainUser'')
BEGIN
CREATE USER [DomainName\DomainUser] FOR LOGIN [DomainName\DomainUser];
END;
GRANT VIEW DATABASE STATE TO [DomainName\DomainUser];');
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

Tip

For RDS: The script automatically excludes the rdsadmin database which is reserved by AWS. Ensure you replace DomainName\DomainUser with your actual domain credentials.

Set up the 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:

    [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
  2. Change Service Logon to Domain Account (Using PowerShell):

    Configure the NRDOT Collector service to run as your domain user using PowerShell:

    # Configure service to use domain account
    # The space after obj= and password= is required syntax for sc.exe
    sc.exe config "nrdot-collector" obj= "DomainName\DomainUser" password= "<password>"
    # Restart the service
    Restart-Service nrdot-collector

    Verify the service identity:

    Get-WmiObject Win32_Service -Filter "Name='nrdot-collector'" | Select Name, State, StartName
    # Expected: StartName = DomainName\DomainUser

    Important

    Replace DomainName\DomainUser with your actual domain and username (e.g., CORP\SQLMonitor), and <password> with the domain user's password.

  3. Ensure your security group allows inbound connections from the NRDOT Collector host to your RDS instance on port 1433 (or your custom port).

Configure NRDOT Collector

Select your configuration type based on your monitoring needs:

Configuration parameters

The following table describes the key configuration parameters for the nrsqlserver receiver:

ParameterDescription
serverEnter your RDS SQL Server endpoint
portEnter your SQL Server port number. The default value is 1433.
endpointEnter the New Relic OTLP endpoint (e.g., https://otlp.nr-data.net). For more information, refer to New Relic OTLP endpoints documentation.
licenseKeyEnter your New Relic license key.
collection_intervalInterval in seconds to collect database metrics. Default: 15s

Update Windows Service Registry

Update the Windows Service Registry to use the new mssql-config.yaml file.

Method 1: PowerShell

Run the following command in PowerShell as Administrator:

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"'

Method 2: Command Prompt (Alternative)

If PowerShell is not available, you can use Command Prompt instead:

  1. Open your Start Menu, type cmd
  2. Right-click Command Prompt and choose Run as administrator
  3. Copy and paste this exact command into the black CMD window and hit Enter:
sc config "nrdot-collector" binPath= "\"C:\Program Files\nrdot-collector\nrdot-collector.exe\" --config \"C:\Program Files\nrdot-collector\mssql-config.yaml\""

Validate NRDOT Collector Configuration

Validate the NRDOT Collector configuration to ensure it's correctly formatted and will work properly.

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

Restart NRDOT collector

After updating your configuration, restart the NRDOT Collector service on your domain-joined EC2 Windows instance:

net stop nrdot-collector
net start nrdot-collector

Tip

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 (e.g., CORP\SQLMonitor).

(Optional) Set up APM-database correlation

To correlate your application performance with database operations, you can set up database service identification. This feature allows you to see exactly which applications are generating specific database workloads. For more information, refer to set up database service identification to get APM-database correlation in New Relic.

Important

To view database performance data in APM, both entities must be in the same New Relic account. If the entities are in different New Relic accounts, you must have access to both accounts to view the data.

(Optional) Configure secret management

The secret management feature allows you to securely manage sensitive information, such as database credentials. This helps to enhance the security of your monitoring setup by avoiding hardcoding sensitive data in configuration files. For more information, refer to secret management.

Find and use your data

Once your data is being collected, you can access comprehensive SQL Server database monitoring through New Relic's 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.

Prerequisites

Ensure your environment meets our compatibility and prerequisites.

Additional requirements for gMSA (Group Managed Service Account) with RDS:

  • Active Directory environment with gMSA support
  • gMSA account created and configured for SQL Server access
  • Domain-joined Windows EC2 instance authorized to use the gMSA account
  • Security group configured to allow connections on SQL Server port (default 1433)

Enable your Microsoft SQL Server

Connect to your RDS SQL Server instance and run the following SQL commands to create a login for the gMSA account and grant necessary permissions:

USE master;
CREATE LOGIN [DomainName\gMSA] FROM WINDOWS;
GRANT VIEW ANY DATABASE TO [DomainName\gMSA];
GRANT VIEW SERVER STATE TO [DomainName\gMSA];
GRANT VIEW ANY DEFINITION TO [DomainName\gMSA];

Important

Replace DomainName\gMSA with your actual domain name and gMSA account name (e.g., CORP\SQL-gMSA$). Note that gMSA accounts typically end with a $ symbol.

Grant READ access privileges

Use the following statements to grant READ access privileges to the gMSA account across all databases:

-- 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 = ''<DOMAIN>\<gMSA_NAME>$'')
BEGIN
CREATE USER [<DOMAIN>\<gMSA_NAME>$] FOR LOGIN [<DOMAIN>\<gMSA_NAME>$];
END;
GRANT VIEW DATABASE STATE TO [<DOMAIN>\<gMSA_NAME>$];');
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

Important

Replace DomainName\gMSA with your actual domain name and gMSA account name (e.g., CORP\SQL-gMSA$). This script creates a database user for the gMSA account in all user databases, excluding system databases and RDS-specific databases.

Set up the NRDOT Collector

Install the NRDOT Collector on an EC2 Windows instance that is domain-joined and authorized to use the gMSA account.

Important

For RDS with gMSA, the NRDOT Collector must be installed on a domain-joined Windows EC2 instance that has permissions to use the gMSA account. Ensure your security group allows connections to RDS on port 1433.

  1. Download and install the NRDOT Collector using PowerShell:

    [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

Configure NRDOT Collector Service to Run as gMSA

After installing the NRDOT Collector, configure the service to run as your gMSA account using PowerShell:

# Stop the NRDOT Collector service
Stop-Service nrdot-collector
# Configure service to use gMSA account
# Use cmd /c to avoid PowerShell treating $ as a variable
cmd /c 'sc config nrdot-collector obj= "DomainName\gMSA" password= ""'
# Verify the configuration
Get-WmiObject Win32_Service -Filter "Name='nrdot-collector'" | Select Name, StartName
# Start the NRDOT Collector service
Start-Service nrdot-collector

Important

Replace DomainName\gMSA with your actual domain and gMSA account name (e.g., CORP\SQL-gMSA$). Note the empty password - gMSA accounts don't require passwords.

Configure NRDOT Collector

Select your configuration type based on your monitoring needs:

Configuration parameters

The following table describes the key configuration parameters for the nrsqlserver receiver:

ParameterDescription
serverEnter your RDS SQL Server endpoint
portEnter your SQL Server port number. The default value is 1433.
endpointEnter the New Relic OTLP endpoint. For more information, refer to New Relic OTLP endpoints documentation.
licenseKeyEnter your New Relic license key.
collection_intervalInterval in seconds to collect database metrics. Default: 15s

Tip

Note: The max_concurrent_queries option controls how many metric queries the receiver executes in parallel against SQL Server during each scrape cycle.

receivers:
nrsqlserver:
max_concurrent_queries: 4 # default is 4 if omitted or set to 0

Tip

Note: If you enable all available metrics, increase the limit_mib value (e.g., 1000) to prevent the memory limiter from dropping data.

Update Windows Service Registry

Update the Windows Service Registry to use the new mssql-config.yaml file.

Method 1: PowerShell

Run the following command in PowerShell as Administrator:

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"'

Method 2: Command Prompt (Alternative)

If PowerShell is not available, you can use Command Prompt instead:

  1. Open your Start Menu, type cmd
  2. Right-click Command Prompt and choose Run as administrator
  3. Copy and paste this exact command into the black CMD window and hit Enter:
sc config "nrdot-collector" binPath= "\"C:\Program Files\nrdot-collector\nrdot-collector.exe\" --config \"C:\Program Files\nrdot-collector\mssql-config.yaml\""

Validate NRDOT Collector Configuration

Validate the NRDOT Collector configuration to ensure it's correctly formatted and will work properly.

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

Restart NRDOT collector

After updating your configuration, restart the NRDOT Collector service on your domain-joined EC2 Windows instance:

net stop nrdot-collector
net start nrdot-collector

Tip

Verify the service is running under the gMSA account by checking Windows Services (services.msc). The "Log On As" column should show your gMSA account (e.g., CORP\SQL-gMSA$).

(Optional) Set up APM-database correlation

To correlate your application performance with database operations, you can set up database service identification. This feature allows you to see exactly which applications are generating specific database workloads. For more information, refer to set up database service identification to get APM-database correlation in New Relic.

Important

To view database performance data in APM, both entities must be in the same New Relic account. If the entities are in different New Relic accounts, you must have access to both accounts to view the data.

(Optional) Configure secret management

The secret management feature allows you to securely manage sensitive information, such as database credentials. This helps to enhance the security of your monitoring setup by avoiding hardcoding sensitive data in configuration files. For more information, refer to secret management.

Find and use your data

Once your data is being collected, you can access comprehensive SQL Server database monitoring through New Relic's 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.

Next steps

After setting up Windows RDS monitoring:

Copyright © 2026 New Relic Inc.

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