You suspect unauthorized data manipulation language (DML) operations on a particular table. You want to track users who performing the transactions and the values used in the transactions. Also you plan to transfer these values to another table for analysis. How would you achieve this?

  1. By auditing the all DML operations on table.

  2. By using external table

  3. By using triggers.

  4. By using anonymous PL/SQL blocks


Correct Option: C
Explanation:

To achieve the given objective, you can use triggers, which are special PL/SQL programs that are automatically executed in response to specific DML events.

Option A: Auditing the DML operations on the table would provide information about who performed the transactions, but it would not capture the values used in the transactions. Additionally, the auditing information may not be easily transferable to another table for analysis.

Option B: Using an external table would not help in tracking users who performed the transactions and the values used in the transactions. External tables are used to map data in flat files into database tables, or to query data in external sources as if it were in a table. They are not designed for capturing transaction details.

Option C: Using triggers would help you track the users who performed the transactions and the values used in the transactions. You can create a trigger to automatically insert a row into another table, such as an audit table, when a DML operation occurs on the original table. The inserted row can contain information such as the user who performed the transaction, the type of transaction (insert, update, or delete), the date and time of the transaction, and the values used in the transaction. This information can be used for analysis and to detect unauthorized activity.

Option D: Using anonymous PL/SQL blocks would not help in tracking users who performed the transactions and the values used in the transactions. Anonymous PL/SQL blocks are used to execute a sequence of SQL and PL/SQL statements and are not designed for capturing transaction details.

Therefore, the correct option is:

The Answer is: C. By using triggers.

Find more quizzes: