How to add a user and the associated roles

The following sample script is for adding a user and theirs roles into the CADORS database. (SHIRZAS is the following script should be replaced with the new username, also STAKEHOLDER_ID should be replaced with max id + 1 from the associated table)

--add user                           

insert into AC043_STAKEHOLDER_INTERNAL (stakeholder_id, TC_USER_ID, user_status_cd, date_created_dte, date_deleted_dte, date_last_update_dte, user_last_update_id)

   values (2756, 'SHIRZAS', 1, sysdate, null, sysdate, 1);

                               

 --add roles

insert into AA026_USER_ROLE(STAKEHOLDER_ID,USER_ROLE_TYPE_CD,DATE_CREATED_DTE,DATE_DELETED_DTE,DATE_LAST_UPDATE_DTE,USER_LAST_UPDATE_ID)

values(2756,1,sysdate,null,sysdate,2756);

 

insert into AA026_USER_ROLE(STAKEHOLDER_ID,USER_ROLE_TYPE_CD,DATE_CREATED_DTE,DATE_DELETED_DTE,DATE_LAST_UPDATE_DTE,USER_LAST_UPDATE_ID)

values (2756,2,sysdate,null,sysdate,2756);

 

insert into AA026_USER_ROLE(STAKEHOLDER_ID,USER_ROLE_TYPE_CD,DATE_CREATED_DTE,DATE_DELETED_DTE,DATE_LAST_UPDATE_DTE,USER_LAST_UPDATE_ID)

values(2756,3,sysdate,null,sysdate,2756);

 

insert into AA026_USER_ROLE(STAKEHOLDER_ID,USER_ROLE_TYPE_CD,DATE_CREATED_DTE,DATE_DELETED_DTE,DATE_LAST_UPDATE_DTE,USER_LAST_UPDATE_ID)

values(2756,4,sysdate,null,sysdate,2756);