ITPub博客

首页 > 数据库 > Oracle > Oracle 11G OCP 1Z0-052 183

Oracle 11G OCP 1Z0-052 183

原创 Oracle 作者:LuiseDalian 时间:2014-07-28 09:01:59 0 删除 编辑
(183)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?

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.

答案:(B)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1239851/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-02-06

  • 博文量
    1986
  • 访问量
    6040856