Granting Rights on Stored Procedure to another user of Oracle

前端 未结 5 1680
余生分开走
余生分开走 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:30

    Packages and stored procedures in Oracle execute by default using the rights of the package/procedure OWNER, not the currently logged on user.

    So if you call a package that creates a user for example, its the package owner, not the calling user that needs create user privilege. The caller just needs to have execute permission on the package.

    If you would prefer that the package should be run using the calling user's permissions, then when creating the package you need to specify AUTHID CURRENT_USER

    Oracle documentation "Invoker Rights vs Definer Rights" has more information http://docs.oracle.com/cd/A97630_01/appdev.920/a96624/08_subs.htm#18575

    Hope this helps.

提交回复
热议问题