Add Everyone To Cognos Role SystemAdministrator SQL script

In Cognos 8.1 and Reportnet it was possible to delete the group Everyone from the Systemadministrators role in the Cognos namespace. In Cognos 8.2 and higher, it is not possible to delete the group Everyone, before you add another user, group or role to the role Systemadministrators. If you are somehow not able to get Systemadministrator permissions in the content store use the following script:

select¬†27, (select cmid from cmobjprops1 where objid=’::System Administrators’),
coalesce((select max(ord) from CMREFORD1 where propid=27 and cmid=(select cmid from cmobjprops1 where objid=’::System Administrators’)), -1)+1,
from CMOBJPROPS1 where OBJID=’::Everyone’

This script is called AddSysAdminMember.sql and can be found for SQL, Oracle, DB2, Sybase and Derby in the directory C:\Program Files\COGNOS\c8\configuration\schemas\content\

Run this script in MS SQL Query Analyzer for your Content Store database and you can log in as SystemAdministrator to fix the security.