Oracle procedure within package with alter table throws ORA-01031:insufficient privileges -
i insufficient privileges error when executing procedure inside package, though appropriate access has been granted.
create or replace package developer.ddl_packs procedure disbcons begin execute immediate 'alter table tester.address disable constraint pk4'; end; end; grant alter on tester.address developer; exec developer.ddl.disbcons
edit: tried adding authid definer
in package header. still ora-01031:insufficient privileges
error when executed developer
. user
execution works if add authid current_user
, execute same developer
user. not understand why oracle not consider relevant access when executed authid definer
@vivek can add authid definer/current_user within package specification only, think work after that, below package specification should be:
create or replace package developer.ddl_packs authid current_user procedure disbcons; end;
Comments
Post a Comment