Granting Rights on Stored Procedure to another user of Oracle

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

    I'm not sure that I understand what you mean by "rights of ownership".

    If User B owns a stored procedure, User B can grant User A permission to run the stored procedure

    GRANT EXECUTE ON b.procedure_name TO a
    

    User A would then call the procedure using the fully qualified name, i.e.

    BEGIN
      b.procedure_name( <> );
    END;
    

    Alternately, User A can create a synonym in order to avoid having to use the fully qualified procedure name.

    CREATE SYNONYM procedure_name FOR b.procedure_name;
    
    BEGIN
      procedure_name( <> );
    END;
    

提交回复
热议问题