AUTHID property

The AUTHID property of a stored PLSQL unit, determines the authorization under which a PLSQL subprogram operates at run-time.
You can use two clause:
 . CURRENT_USER : when the subprogram is executed , it will run using the rights of the person that invoked the code, not with the creator’s rights
 . DEFINED : when the subprogram is executed , it will run using the rights of the person that created the code, not with the invoker’s rights (triggers and views always behave in                         this way). This is the Default value for AUTHID.
 Below there’s an example of program created using AUTHID property.
CREATE OR REPLACE PROCEDURE create_emp ( ... parameters ... )
AUTHID CURRENT_USER AS
BEGIN
   -- PLSQL CODE --
END;

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *