Unable to access administrator account
Published 08 March 2018
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.
- In Management Studio, connect to the SQL Server instance that hosts the SQL Monitor database.
Paste the following SQL script into a new query window:
Script to add new administrator
INSERT settings.ActiveDirectoryPrincipal (Name, PrincipalType, PrincipalRole, [All] ) VALUES (N'user.name@example.com', 1, -- PrincipalType - 1 = User, 2 = Group 1, -- PrincipalRole - 1 = Administrator, 2 = Standard user 1 -- All )
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.
If you're adding a user group, change the
PrincipleType
value to2
.For example:
INSERT settings.ActiveDirectoryPrincipal (Name, PrincipalType, PrincipalRole, [All] ) VALUES (N'groupname', 2, -- PrincipalType - 1 = User, 2 = Group 1, -- PrincipalRole - 1 = Administrator, 2 = Standard user 1 -- All )
Run the script.