Submit a ticketCall us

WebinarWebinar: A checklist for planning your Network Performance Monitor (NPM) upgrade

Are you ready for your next upgrade? To help you plan smoothly, join this webcast to learn more about, SolarWinds® Orion® Installer, SolarWinds Upgrade Advisor, Upgrades Guides, Training Videos, and other resources available. We’ll share key upgrade planning considerations, lessons learned from customers with practical advice from SolarWinds Product Experts. We’ll also give practical tips to identify the estimated time needed and resources, how to prepare the business and IT staff for changes, ways to plan for required system changes, and more.

Register now.

Home > Success Center > Database Performance Analyzer (DPA) > DPA - Knowledgebase Articles > Create the DPA Monitoring Login for SQL Server AG Listener Registrations

Create the DPA Monitoring Login for SQL Server AG Listener Registrations

Updated May 19, 2017


If you are monitoring a SQL Server availability group (AG), you must manually create SQL Server logins on secondary replicas when both of the following conditions are met:

  1. You specified an AG listener during DPA registration, and
  2. The DPA monitoring login does not exist on all replicas.

In most cases, the monitoring login will not exist on the replicas if you chose to have DPA create the monitoring user during registration. If you are using a monitoring login that you know already exists on all replicas, these instructions do not apply.

For information about the options for monitoring SQL Server AGs, see License types.


SQL Server logins are stored on the [master] database, and therefore logins created on the primary replica are not automatically propagated to secondary replicas. Database users, however, are replicated to secondary replicas because replication occurs at the database level.  

This is important when you have registered using an AG listener because the DPA monitoring login needs to continue to work when a primary failover occurs. The login is created on the primary replica during registration. However, because the login is not replicated to other AG replicas, the login will not exist when the primary fails over, and DPA will not be able to monitor. Therefore, you must manually create the login on each secondary replica that the listener's AG can fail over to.


  • DPA, all versions


Get the list of AG replicas

To display a list of secondary replicas that the AG could fail over to:

  1. In DPA, select a SQL Server instance from the DPA home page.
  2. Click on the AG Status tab in the upper-right corner.
  3. Click on the listener's AG (the one in bold).

    The Replicas section lists the replicas that need the DPA monitoring login and permissions.

Create the monitoring login

Create the login on each secondary replica using the same credentials as the monitoring login on the primary replica.

  1. On each secondary replica, log in as a SYSADMIN user.
  2. Run the following commands. Substitute the correct monitoring login and password.
USE [master]

-- Create DPA monitoring login on each Secondary replica.
CREATE LOGIN [<DPA monitoring login>] WITH
  PASSWORD=N'<DPA monitoring login password>',

-- Give rights to monitor the replica.
ALTER SERVER ROLE [sysadmin] ADD MEMBER [<DPA monitoring login>]


Last modified