SQL Monitor 11

Unable to access administrator account

If SQL Monitor is configured to authenticate users with Active Directory, 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 SQL Monitor database.

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

    Script to add new administrator

    INSERT settings.AuthPrincipals
            (Name,
             PrincipalType,
             PrincipalRole,
             [All],
             AuthenticationType
            )
    VALUES  (N'user.name@example.com', 
             1, -- PrincipalType - 1 = User, 2 = Group
             1, -- PrincipalRole - 1 = Administrator, 2 = Standard user
             1  -- All,
             2  -- Active Directory
            )
  3. Replace user.name@example.com with the user or group you want to use as the SQL 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:

    INSERT settings.AuthPrincipals
            (Name, 
             PrincipalType, 
             PrincipalRole, 
             [All],
             AuthenticationType
            ) 
    VALUES (N'groupname', 
             2, -- PrincipalType - 1 = User, 2 = Group 
             1, -- PrincipalRole - 1 = Administrator, 2 = Standard user 
             1 -- All,
             2  -- Active Directory
            ) 
  5. Run the script.


Do you have any feedback on this documentation?

Let us know at sqlmonitorfeedback@red-gate.com


Didn't find what you were looking for?