 delete from krim_entity_t where entity_id not in ('1', '1100', '1131', 'KR1000')
 /
 
-delete from krim_prncpl_t where prncpl_id not in ('1', 'admin', 'notsys', 'KR1000')
+delete from krim_prncpl_t where prncpl_id not in ('1', 'admin', 'notsys', 'guest')
 /
 
 delete from krim_role_perm_t where role_perm_id = '856'

-- delete all entity and principal data except for principalID/entityID = 1 which is the 'kr' system user
-- and principalID=admin/entityID = 1100 which is the 'admin' user
-- also keep the 'notsys' user, as it is required for KEN
-- also keep the 'guest' user (id='KR1000'), as it is required for guest user access (KULRICE-8349)

delete from krim_entity_addr_t where entity_id not in ('1', '1100', '1131')
/

drop table TRV_ATT_SAMPLE
/
drop sequence trv_fo_id_s
/

delete from krim_role_perm_t where perm_id in (select perm_id from krim_perm_t where nmspc_cd = 'KR-SAP')
