ORA- Error:
SQL> exec dbms_fga.drop_policy('APPL_OWNER','MIS_CONDITION','FGA_MIS_CONDITION_SEL');
PL/SQL procedure successfully completed.
SQL> EXECUTE DBMS_FGA.ADD_POLICY(OBJECT_SCHEMA => 'APPL_OWNER',OBJECT_NAME => ', POLICY_NAME => 'FGA_MIS_CONDITION_SEL', AUDIT_CONDITION => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') IN (''APPL_XE_WRITER'',''APPL_READER'')', AUDIT_COLUMN => 'AGREEMENT_CODE', ENABLE => TRUE, STATEMENT_TYPES => 'SELECT');
BEGIN DBMS_FGA.ADD_POLICY(OBJECT_SCHEMA => 'APPL_OWNER',OBJECT_NAME => 'MIS_CONDITION', POLICY_NAME => 'FGA_MIS_CONDITION_SEL', AUDIT_CONDITION => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') IN (''APPL_XE_WRITER'',''APPL_READER'')', AUDIT_COLUMN => 'AGREEMENT_CODE', ENABLE => TRUE, STATEMENT_TYPES => 'SELECT'); END;
*
ERROR at line 1:
ORA-04022: nowait requested, but had to wait to lock dictionary object
ORA-06512: at "SYS.DBMS_FGA", line 20
ORA-06512: at line 1
Cause/Solution:
After deletion of FGA policy , new policy creation command is executed immediately which has not allowed to reflect changes in dictionary and dependent fixed objects caused error ORA-04022.
Solution will be to retry the FGA add policy command after at least 10-15 seconds.
No comments:
Post a Comment