Oracle caller and definer permissions 1. In the first case, the owner or definer of the PL/SQL program reserves all permissions for program execution. You can use the authid definer keyword in the nameprogram www.2cto.com header to enable any user to receive the permission to run the program compiled in this way, the program will run as the program owner. -- Grant the definer permission to create as replace function hr. quarterly_sales authid definer as Begin end; in the second case, using the AUTHID CURRENT_USER keyword in the program header indicates that Oracle uses the caller's permission to execute the program. <Pre class = "SQL" name = "code"> Save point, commit, and transaction rollback DECLARE cursor c_nums is select * from tb_ SQL; BEGIN savepoint assign_nums; for r_num in c_nums loop update tb_ SQL set num5 = num5 + 10000 where id = r_num.id; end loop; Exception when others then rollback to assign_nums; END; lock select for update set transaction read only set transaction isolation level serializable lock table declare lv_num1 number; CURSOR c_nu MS is select * from tb_ SQL for update; begin update tb_ SQL set num4 = num4 + 40000; end; Oracle caller and definer permissions 1. First case, the owner or definer of the PL/SQL program reserves all permissions for executing the program. You can use the authid definer keyword in the naming program header to enable any user to receive the permission to run the program compiled in this way, and then run the program as the program owner. -- Grant the definer permission to create as replace function hr. quarterly_sales authid definer as Begin end; in the second case, using the AUTHID CURRENT_USER keyword in the program header indicates that Oracle uses the caller's permission to execute the program. -- Grant the caller permission to create as replace function hr. quarterly_sales AUTHID CURRENT_USER as Begin end; </pre> <br> -- Grant the caller permission to create as replace function hr. quarterly_salesAUTHID CURRENT_USERasBegin end; <pre> </pre> <br>