zoukankan      html  css  js  c++  java
  • 052-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.

    A: 错误,应创建调用者权限,而不是定义者权限
    B: 正确
    C: 错误,默认是以定义者权限创建存储过程,那么有 execute 权限就可以向部门表 insert 数据 不能实现需求 grantoption 权限是指可以把存储过程权限授权给其它人
    D: 错误,存储过程可单独创建,不需要放到包里,这样也不能实现题里的需求

  • 相关阅读:
    Codeforces Round #750 (Div.2) A~F1题解
    ICPC2020南京站 M Monster Hunter
    Codeforces Round #749 A~E题解
    CF1396B Stoned Game
    CF1338D Nested Rubber Bands
    HDU7134 Public Transport System
    ASP.NET Core 404错误(转自其它网站)
    测试用例你了解多少
    软件测试的基本过程有几个步骤
    软件测试相关知识
  • 原文地址:https://www.cnblogs.com/Babylon/p/8042865.html
Copyright © 2011-2022 走看看