1Z0-052 · Question #24
The HR user creates a stand-alone procedure as follows and grants the EXECUTE privilege on the procedure to many database users: CREATE OR REPLACE PROCEDURE create_dept ( v_deptno NUMBER, v_dname VARC
Sign in or unlock 1Z0-052 to reveal the answer and full explanation for question #24. The question stem and answer options stay visible for context.
Question
The HR user creates a stand-alone procedure as follows and grants the EXECUTE privilege on the procedure to many database users:
CREATE OR REPLACE PROCEDURE create_dept ( v_deptno NUMBER, v_dname VARCHAR2, v_mgr NUMBER, v_loc NUMBER) BEGIN INSERT INTO hr.departments VALUES (v_deptno, v_dname, v_mgr, v_loc); END; The users having permission to execute the procedure are able to insert records into the DEPARTMENTS table even though they do not have the INSERT privilege on the table. You want only those users who have privileges on the DEPARTMENTS table to be able to execute the procedure successfully. What would you suggest to the PL/SQL developers to achieve this?
Options
- ACreate the procedure with definer's right.
- BCreate the procedure with invoker's right.
- CGrant the EXECUTE privilege with GRANT OPTION on the procedure to selected users.
- DCreate the procedure as part of a PL/SQL package and grant the EXECUTE privilege on the package
Unlock 1Z0-052 to see the answer
You've previewed enough free 1Z0-052 questions. Unlock 1Z0-052 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.