Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

error in executing trigger ddl

hi,

When executing trigger say TRG_XYZ  following error coming like

ORA-04042: procedure, function, package, or package body does not exist
grant execute on TRG_XYZ  to LMN_rolename_ROLE

can you please suggest. Any links, resources ideas highly appreciated. Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

Actually all the roles are empty as of now which were created using command
create role LMN_rolename_ROLE;
They are not pointing to any table, or package or function etc as of now.

Trigger code also pretty simple as of now looks like

DROP TRIGGER TRG_XYZ ;

CREATE OR REPLACE TRIGGER TRG_XYZ
   BEFORE INSERT
   ON abc_tableName
   FOR EACH ROW
BEGIN
   IF :NEW.lmn_id IS NULL
   THEN
      SELECT seq_lmn_id.NEXTVAL
        INTO :NEW.lmn_id
        FROM DUAL;
   END IF;
END;



Please advise. can I  ignore trigger errors as of now ?. Or what is the best work around to avoid these errors. These ddls were generated in the first place from the toad etc db client  tool by  generating ddls of entire schema.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

I gave already select, update, insert, delete at the start of this script file like
grant select,insert,update,delete on abc_tableName to LMN_rolename_ROLE
even before running statement
grant execute on TRG_XYZ  to LMN_rolename_ROLE

So this case I can igore and remove
the below  statement right
grant execute on TRG_XYZ  to LMN_rolename_ROLE ?
Please advise
Avatar of Sean Stuber
Sean Stuber

yes remove

grant execute on TRG_XYZ  to LMN_rolename_ROLE
Avatar of gudii9

ASKER

Thank you very much.  I appreciate it.