Granting Rights on Stored Procedure to another user of Oracle

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

    On your DBA account, give USERB the right to create a procedure using grant grant create any procedure to USERB

    The procedure will look

    CREATE OR REPLACE PROCEDURE USERB.USERB_PROCEDURE
    --Must add the line below
    AUTHID CURRENT_USER AS
      BEGIN
      --DO SOMETHING HERE
      END
    END
    

    GRANT EXECUTE ON USERB.USERB_PROCEDURE TO USERA

    I know this is a very old question but I am hoping I could chip it a bit.

提交回复
热议问题