Database Management
Managing Permissions in SQL Sentry Portal with Feature Based Security in the SQL Sentry Database
The purpose of this how-to article is to provide resources on applying the proper administrator permissions for a Portal user via the SQL Sentry Database when the functionality is missing in the SQL Sentry Portal.
First published date
Last published date
Overview
To adjust Feature-Based Security for the Portal Feature, you must insert or update a record in Security.FeatureRoleAssignment table.
Once you have the Admin role assigned, that person can do it for anyone else through the Portal by directly clicking the icon, which should now be visible.
Portal version 2025.3 and below.
Portal version 2025.4 and up.
Product section
Cause
The user installing or configuring Portal does not have admin rights to provide access for other users.
Resolution
The following steps add the user to the admin role within Portal.
Gather the ObjectID for the contact that will be given admin rights in Portal.
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
SELECT ObjectID,FirstName,LastName from Contact
Update the user permissions to full admin in Portal, then refresh the Portal site once the update is complete.
-- Scripts are not supported under any SolarWinds support program or service. -- Scripts are provided AS IS without warranty of any kind. SolarWinds further -- disclaims all warranties including, without limitation, any implied warranties -- of merchantability or of fitness for a particular purpose. The risk arising -- out of the use or performance of the scripts and documentation stays with you. -- In no event shall SolarWinds or anyone else involved in the creation, -- production, or delivery of the scripts be liable for any damages whatsoever -- (including, without limitation, damages for loss of business profits, business -- interruption, loss of business information, or other pecuniary loss) arising -- out of the use of or inability to use the scripts or documentation. /* The intent of this script is to give full Feature Based Security Access to Portal for the User/Contact defined */ DECLARE @SiteID UNIQUEIDENTIFIER; Declare @ContactID UNIQUEIDENTIFIER;
DECLARE @getid CURSOR; Set @ContactID = '' --Add the ObjectID from the Contact table for your user. SET @getid = CURSOR FOR SELECT ObjectID
FROM Site WHERE Description LIKE '%Site%';
OPEN @getid;
FETCH NEXT FROM @getid INTO @SiteID;
WHILE @@FETCH_STATUS = 0 BEGIN IF NOT Exists (
Select *
From Security.FeatureRoleAssignment
Where PrincipalID = @ContactID
AND RoleID = '7E54B2ED-0BEC-4E83-A279-44E6F9BEF1C1'
AND ObjectID = @SiteID
) BEGIN INSERT INTO Security.FeatureRoleAssignment (PrincipalID, RoleID, ObjectID) VALUES (@ContactID, '7E54B2ED-0BEC-4E83-A279-44E6F9BEF1C1',@SiteID) INSERT INTO Security.FeatureRoleAssignment (PrincipalID, RoleID, ObjectID) VALUES (@ContactID, '696001B9-9E43-4753-90AE-CDA992685054',@SiteID) INSERT INTO Security.FeatureRoleAssignment (PrincipalID, RoleID, ObjectID) VALUES (@ContactID, 'D7975826-8502-4530-88D0-A1196DD5058A',@SiteID) INSERT INTO Security.FeatureRoleAssignment (PrincipalID, RoleID, ObjectID) VALUES (@ContactID, '7C23333F-94FD-4417-B0C7-23D8F798DF8B',@SiteID) END; FETCH NEXT FROM @getid INTO @SiteID; END; CLOSE @getid DEALLOCATE @getid