SQL Monitor 5

These pages cover SQL Monitor 5, which is not the latest version. Help for other versions is also available.

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 Toggle source code

    1. INSERT settings.ActiveDirectoryPrincipal
    2. (Name,
    3. PrincipalType,
    4. PrincipalRole,
    5. [All]
    6. )
    7. VALUES (N'user.name@example.com',
    8. 1, -- PrincipalType - 1 = User, 2 = Group
    9. 1, -- PrincipalRole - 1 = Administrator, 2 = Standard user
    10. 1 -- All
    11. )
  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:

    1. INSERT settings.ActiveDirectoryPrincipal
    2. (Name,
    3. PrincipalType,
    4. PrincipalRole,
    5. [All]
    6. )
    7. VALUES (N'groupname',
    8. 2, -- PrincipalType - 1 = User, 2 = Group
    9. 1, -- PrincipalRole - 1 = Administrator, 2 = Standard user
    10. 1 -- All
    11. )
  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?