The HR user creates a stand-alone procedure as follows and grants the EXECUTE privilege on the procedure to many databas

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899559
Joined: Mon Aug 02, 2021 8:13 am

The HR user creates a stand-alone procedure as follows and grants the EXECUTE privilege on the procedure to many databas

Post by answerhappygod »

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_dnameVARCHAR2, 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 theDEPARTMENTS 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?

A. Create the procedure with definer's right.
B. Create the procedure with invoker's right.
C. Grant the EXECUTE privilege with GRANT OPTION on the procedure to selected users.
D. Create the procedure as part of a PL/SQL package and grant the EXECUTE privilege on the package to selected users.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!

This question has been solved and has 1 reply.

You must be registered to view answers and replies in this topic. Registration is free.


Register Login
 
Post Reply