|Granting privileges on trigger [message #219376]
||Wed, 14 February 2007 03:32
Registered: February 2007
The following procedure cons_execute is created with invoker rights .
I am calling this procedure from apps schema .
The trigger and the table which is used in dbms_sql.parse is present in applsys schema , since the procedure should be generic and work across schemas I cannot modify it with definers rights.
create or replace procedure cons_execute(stmt in long, trig in varchar2,
s_rowid in rowid, e_rowid in rowid,
rows out number)
authid current_user is
c := dbms_sql.open_cursor();
dbms_sql.parse(c, stmt, dbms_sql.native,
-- edition in which to fire - null is current edition
-- which trigger
dbms_sql.bind_variable(c, ':r1', s_rowid);
dbms_sql.bind_variable(c, ':r2', e_rowid);
rows := dbms_sql.execute(c);
Now when i execute this procedure from apps schema I get the following error.
ORA-04070: invalid trigger name
ORA-06512: at "SYS.DBMS_SQL", line 1035
ORA-06512: at "APPS.CONS_EXECUTE", line 8
ORA-06512: at line 42
Now is there any way through which I can execute this procedure from apps schema itself by granting privileges from applsys schema to apps schema ?