Granting Rights on Stored Procedure to another user of Oracle

前端 未结 5 1678
余生分开走
余生分开走 2020-12-28 20:54

I am a student of Undergraduate studies , and I am facing little problem in granting rights of ownership to a user A to a stored procedure being owned by user B in database

5条回答
  •  旧巷少年郎
    2020-12-28 21:12

    You can't do what I think you're asking to do.

    The only privileges you can grant on procedures are EXECUTE and DEBUG.

    If you want to allow user B to create a procedure in user A schema, then user B must have the CREATE ANY PROCEDURE privilege. ALTER ANY PROCEDURE and DROP ANY PROCEDURE are the other applicable privileges required to alter or drop user A procedures for user B. All are wide ranging privileges, as it doesn't restrict user B to any particular schema. User B should be highly trusted if granted these privileges.

    EDIT:

    As Justin mentioned, the way to give execution rights to A for a procedure owned by B:

    GRANT EXECUTE ON b.procedure_name TO a;
    

提交回复
热议问题