nerdexam
Oracle

1Z0-147 · Question #20

Examine this code: CREATE OR REPLACE PROCEDURE audit_action (p_who VARCHAR2) AS BEGIN INSERT INTO audit(schema_user, VALUES(p_who); END audit_action; / CREATE OR REPLACE TRIGGER watch_it AFTER LOGON…

The correct answer is D. The trigger invokes the procedure audit_action each time a user logs on to the database and adds the username to the audit table. See the full explanation below for the reasoning.

Question

Examine this code: CREATE OR REPLACE PROCEDURE audit_action (p_who VARCHAR2) AS BEGIN INSERT INTO audit(schema_user, VALUES(p_who); END audit_action; / CREATE OR REPLACE TRIGGER watch_it AFTER LOGON ON DATABASE CALL audit_action(ora_login_user) / What does this trigger do?

Options

  • AThe trigger records an audit trail when a user makes changes to the database.
  • BThe trigger marks the user as logged on to the database before an audit statement is issued.
  • CThe trigger invokes the procedure audit_action each time a user logs on to his/her schema and adds the username to the audit table.
  • DThe trigger invokes the procedure audit_action each time a user logs on to the database and adds the username to the audit table.

How the community answered

(52 responses)
  • A
    12% (6)
  • B
    6% (3)
  • C
    4% (2)
  • D
    79% (41)

Community Discussion

No community discussion yet for this question.

Full 1Z0-147 Practice