To add an Object Group one has to use the script API_SCURTY.ADD_OBJECT_GROUP and provide a name for the object group as well as if this Object Group should have only read or also write privileges. Furthermore, one can add a description for the Object Group.
EXECUTE SCRIPT API_SCURTY.ADD_OBJECT_GROUP (
'TEST_OG' -- p_object_group
,'Description 1' -- p_description
,null -- p_read_write
);
After adding an Object Group using the script above, one can see the added entry in the table SCURTY.REP_OBJECT_GROUPS.
OBJECT_GROUP | OG_ID | DESCRIPTION | READ_WRITE |
---|---|---|---|
TEST_OG | 152 | Description 1 | false |
To change one or more parameters of an Object Group one can use the script API_SCURTY.CHANGE_OBJECT_GROUP. One has to provide the name of the object group exactly to the script as well as any parameter values that should be changed. By entering a NULL-value the parameter value, which is already saved, will be used.
EXCUTE SCRIPT API_SCURTY.CHANGE_OBJECT_GROUP (
'TEST_OG' -- p_object_group
,'Description 530' -- p_description
,true -- p_read_write
);
After successfully changing some of the Object Group parameters, this changes can be found in the entry 'TEST_OG' in the table SCURTY.REP_OBJECT_GROUPS.
OBJECT_GROUP | OG_ID | DESCRIPTION | READ_WRITE |
---|---|---|---|
TEST_OG | 152 | Description 530 | true |
To remove an Object Group one can use the API_SCURTY.REMOVE_OBJECT_GROUP script. For this script one only has to provide the exact name of the Object Group.
EXECUTE SCRIPT API_SCURTY.REMOVE_OBJECT_GROUP (
'TEST_OG' -- p_object_group
);
No entry for the Object Group name 'TEST_OG' should be found in the SCURTY.REP_OBJECT_GROUPS table, after issuing this command.