PRIVILEGE NAME PROPERTY
--------- ---------------------------------------- ----------
-140 CREATE PROCEDURE 0
-141 CREATE ANY PROCEDURE 0
-142 ALTER ANY PROCEDURE 0
-143 DROP ANY PROCEDURE 0
-144 EXECUTE ANY PROCEDURE 0
-241 DEBUG ANY PROCEDURE 0
如上所示,关于存储过程的系统权限一般有六种: CREATE PROCEDURE、CREATE ANY PROCEDURE、 ALTER ANY PROCEDURE、DROP ANY PROCEDURE、 EXECUTE ANY PROCEDURE、DEBUG ANY PROCEDURE. 那么关于存储过程的对象权限又有那些呢? 如下例子所示,在用户ESCMUSER下创建存储过程PROC_TEST
CREATE OR REPLACE PROCEDURE ESCMUSER.PROC_TEST
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('It is only test');
END;
使用system用户创建用户TEMP,如下所示
SQL> create user temp identified by temp;
User created.
SQL> grant connect,resource to temp;
Grant succeeded.
SQL> COL GRANTEE FOR A12;
SQL> COL TABLE_NAME FOR A30;
SQL> COL GRANTOR FOR A12;
SQL> COL PRIVILEGE FOR A8;
SQL> SELECT * FROM USER_TAB_PRIVS_MADE WHERE GRANTEE='TEMP';
GRANTEE TABLE_NAME GRANTOR PRIVILEGE GRA HIE
---------- --------------------- ------------ --------------------------- --- ---
TEMP PROC_TEST ESCMUSER DEBUG NO NO
TEMP PROC_TEST ESCMUSER EXECUTE NO NO
SQL>