Views:
Scenario:
When attempting to log into DocuWare Administration, the following error message is displayed, and the login attempt fails;
 
"An error occurred please contact the administrator with the following information: System administrator role was already set!"
 
Solution:
This error can occur due to a duplicate System Administrator Role entry in your DocuWare database. To resolve this, we will need to delete the duplicate entry. Please refer to the following on how to delete this duplicate entry from your DocuWare database;
Note: Please take a new backup of the DWsystem database before making any changes.
 
1. Select all the System Administrator rows using the following command:

MySQL:
SELECT * FROM dwsystem.dwsystemsettings WHERE settings LIKE '%SystemAdministratorRole%';
MSSQL:
SELECT * FROM [dwsystem].[dbo].[dwsystemsettings] WHERE settings LIKE '%SystemAdministratorRole%';
 
2. If there are multiple entries, check the settings column in each row and identify one that has a userName=".." entry that matches the username you are currently using to sign in to DocuWare Administration. That is the entry you will want to keep. Notate the guid row for any other SystemAdministratorRole rows.
 
3. Using the guid of the entry that doesn't match the DocuWare user account you are currently using to sign in to DocuWare Administration, delete the duplicate rows with the following command:

 
MySQL:
DELETE FROM dwsystem.dwsystemsettings WHERE guid = ' GUID OF DUPLICATE ROW ';
MSSQL:
DELETE FROM [dwsystem].[dbo].[dwsystemsettings] WHERE guid = ' GUID OF DUPLICATE ROW ';

If there is more than one duplicate, you will have to run this statement multiple times, changing the guid in the command for each duplicate row.
 
KBA is applicable for On-premise Organizations ONLY.