Database Administration (MOSC)

MOSC Banner

Unified audit does not log updates executed inside forall

edited Oct 12, 2022 2:52PM in Database Administration (MOSC) 2 comments

Hi

Oracle 19.16

SQL> select * from audit_unified_policies where policy_name = 'OKIS_POLICY' and object_name = 'MENETLUSED' order by policy_name, object_schema, object_name;
-- This update will be logged by the policy
UPDATE Menetlused SET LoppKP = LoppKP WHERE iD = 6168856; 
commit;

-- This will not be logged with the same policy
set serveroutput on;
DECLARE   
  TYPE c1 IS RECORD (
     id NUMBER
  );
  TYPE t1 IS TABLE OF c1;
  t t1;
   
BEGIN
  select 6168857 as id
  BULK COLLECT INTO t
  FROM dual;
   
  -- Uuendame menetluste küljes andmed
  FORALL I IN INDICES OF t
    UPDATE Menetlused SET loppkp = loppkp WHERE ID = t(I).id;
  dbms_output.put_line('Updated ' || SQL%ROWCOUNT || ' table row.');
  commit;
END; 
/

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center