Home » SQL & PL/SQL » SQL & PL/SQL » Granting privileges on trigger
Granting privileges on trigger [message #219376] Wed, 14 February 2007 03:32 Go to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member

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 integer;

begin
c := dbms_sql.open_cursor();
dbms_sql.parse(c, stmt, dbms_sql.native,
-- edition in which to fire - null is current edition
null,
-- which trigger
trig,
-- fire_apply_trigger
true);
dbms_sql.bind_variable(c, ':r1', s_rowid);
dbms_sql.bind_variable(c, ':r2', e_rowid);
rows := dbms_sql.execute(c);

commit;

dbms_sql.close_cursor(c);
end;
/

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 ?
Re: Granting privileges on trigger [message #219384 is a reply to message #219376] Wed, 14 February 2007 03:46 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Please do not post the same question to multiple forums.
Your query is being answered in the Newbies forum.
Previous Topic: Updation Problem
Next Topic: duplicate values
Goto Forum:
  


Current Time: Thu Dec 12 22:58:30 CST 2024