Where are you using Redgate Monitor? (pick the closest answer)

Unable to access administrator account

If Redgate Monitor is configured to authenticate users with Active Directory or OpenID Connect, and you're locked out of your Active Directory administrator account – for example, if the administrator leaves the company – you need to manually add a new administrator to the Redgate Monitor database.

  1. In Management Studio, connect to the SQL Server instance that hosts the Redgate Monitor database.
  2. Paste the following SQL script into a new query window: 

    Script to add new administrator Toggle source code

    1. INSERT settings.AuthPrincipals
    2. (Name,
    3. PrincipalType,
    4. PrincipalRole,
    5. [All],
    6. AuthenticationType
    7. )
    8. VALUES (N'user.name@example.com',
    9. 1, -- PrincipalType - 1 = User, 2 = Group
    10. 1, -- PrincipalRole - 1 = Administrator, 2 = Standard user
    11. 1, -- All
    12. 2 -- Active Directory
    13. )
  3. Replace user.name@example.com with the user or group you want to use as the Redgate Monitor administrator account. It must be an existing Active Directory user or group.
    If you're adding a group, don't include @example.com.

  4. If you're adding a user group, change the PrincipleType value to 2.

    For example:

    1. INSERT settings.AuthPrincipals
    2. (Name,
    3. PrincipalType,
    4. PrincipalRole,
    5. [All],
    6. AuthenticationType
    7. )
    8. VALUES (N'groupname',
    9. 2, -- PrincipalType - 1 = User, 2 = Group
    10. 1, -- PrincipalRole - 1 = Administrator, 2 = Standard user
    11. 1, -- All
    12. 2 -- Active Directory
    13. )
  5. Run the script.


Didn't find what you were looking for?