nerdexam
Oracle

1Z0-067 · Question #32

In your multitenant container database (CDB) that contains pluggable databases (PDBs), the hr user executes the following commands to create and grant privileges on a procedure…

The correct answer is C. Create the create_test procedure with invoker's rights. You can control access to privileges that are necessary to run user-created procedures by using definer's rights, which execute with the privileges of the owner, or with invoker's rights, which execute with the privileges of the user running the procedure.

New Features for PL/SQL

Question

In your multitenant container database (CDB) that contains pluggable databases (PDBs), the hr user executes the following commands to create and grant privileges on a procedure:

CREATEORREPLACEPROCEDUREcreate_test_v(v_emp_idNUMBER,v_enameVARCHAR2,v_ S ALARYNUMBER,v_dept_idNUMBER) BEGIN INSERT INTO hr.test VALUES (v_emp_id, v_ename, v salary, v_dept_id); END; / GRANT EXECUTE ON CREATE_TEST TO John, jim, smith, king; How can you prevent users having the execute privilege on the create_test_v procedure from inserting values into tables on which they do not have any privileges?

Options

  • ACreate the create_test procedure with definer's rights.
  • BGrant the execute privilege to users with grant option on the create_test procedure.
  • CCreate the create_test procedure with invoker's rights.
  • DCreate the create_test procedure as part of a package and grant users the execute privilege on

How the community answered

(57 responses)
  • A
    2% (1)
  • B
    5% (3)
  • C
    82% (47)
  • D
    11% (6)

Explanation

You can control access to privileges that are necessary to run user-created procedures by using definer's rights, which execute with the privileges of the owner, or with invoker's rights, which execute with the privileges of the user running the procedure.

Topics

#invoker's rights#definer's rights#PL/SQL security#privilege management

Community Discussion

No community discussion yet for this question.

Full 1Z0-067 Practice