1Z0-052 · Question #130
You suspect unauthorized data manipulation language (DML) operations on a particular table. You want to track users who are performing the transactions and the values used in the transactions. You…
The correct answer is A. by using triggers. DML triggers are the correct Oracle mechanism to automatically intercept DML operations, capture row values and user context, and write that data to a separate analysis table.
Question
You suspect unauthorized data manipulation language (DML) operations on a particular table. You want to track users who are performing the transactions and the values used in the transactions. You also plan to transfer these values to another table for analysis. How would you achieve this?
Options
- Aby using triggers
- Bby using Data Pump
- Cby using external tables
- Dby using anonymous PL/SQL blocks
How the community answered
(53 responses)- A91% (48)
- B2% (1)
- C2% (1)
- D6% (3)
Why each option
DML triggers are the correct Oracle mechanism to automatically intercept DML operations, capture row values and user context, and write that data to a separate analysis table.
BEFORE/AFTER INSERT, UPDATE, and DELETE triggers fire automatically on the target table without requiring any explicit call, and they expose :OLD and :NEW pseudorecords containing the affected column values. Within the trigger body you can reference USER or SYS_CONTEXT('USERENV','SESSION_USER') to identify the acting user, then INSERT the captured data into a separate audit table. This satisfies all stated requirements: automatic interception, transaction value capture, user identification, and transfer to another table for analysis.
Data Pump is a bulk export/import utility for moving data between schemas or databases and has no capability to intercept or log live DML transactions.
External tables provide read-only access to data in flat files outside the database and cannot monitor or react to DML events on internal tables.
Anonymous PL/SQL blocks must be explicitly executed by a caller and have no mechanism to fire automatically in response to DML events on a table.
Concept tested: DML triggers for auditing user activity and capturing row values
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/lnpls/plsql-triggers.html
Topics
Community Discussion
No community discussion yet for this question.