Add security role "admin" on user in Dev environment using SQL/X++
Whenever we are trying to restore DB from PROD to dev instance. After DB restore sometimes we don't have admin access in dev instance and we can't access all Dev instance module/data or we don't have super admin access.
To access all module/table/data in dev instance we required Admin role. We can assign admin role using
SQL script.
The following script would help us to add admin/any role using SQL
Execute following script to know role specific "RecId"
Select Recid , * from SecurityRole where name like 'system%'
Run following script to know what role are assigned to specific user
select * from SECURITYUSERROLE where user_ like 'paras%'
Following script will help to add additional role on specific user.
insert into SECURITYUSERROLE(SECURITYROLE,USER_, ASSIGNMENTSTATUS,ASSIGNMENTMODE) values (162,'parashuram',1,1)
insert into SECURITYUSERROLE(SECURITYROLE,USER_, ASSIGNMENTSTATUS,ASSIGNMENTMODE) values (8,'parashuram',1,1)
Now user have "System administrator" and "System user" role access and he/she super admin now.
Comments
Post a Comment