Home » SQL & PL/SQL » SQL & PL/SQL » Trigger issue..
Trigger issue.. [message #35864] Fri, 19 October 2001 12:19 Go to next message
GK
Messages: 22
Registered: January 2001
Junior Member
Understand this scenario:
There's a table A in schema SA.
I am connected to Oracle in schema SB. There's a synonym for SA.A in the my schema SB named A.

I run the following code for creating a trigger:

create trigger abc
before insert on A
for each row
begin
-- any statement goes here
dbms_output.put_line('hello');
end;

As u can see, this is a simple create trigger statement. Yet, it gives me an error saying "ORA-00942: table or view does not exist!". I can see that the table A exists. I can even do a "select * from A;"... and that works!!

Can someone help me figure out what it might be?? And yes, I have CREATE TRIGGER privileges for my userid too!! Please help me out...

<script language=Javascript>alert('Please help me out! Thanks!!');</script>

----------------------------------------------------------------------
Re: Trigger issue.. [message #35868 is a reply to message #35864] Sat, 20 October 2001 04:33 Go to previous messageGo to next message
Milan Kumar Barui
Messages: 16
Registered: October 2001
Junior Member
Hi GK,
As you are creating trigger in your schema on the objects existing in other's schema, you must have CREATE ANY TRIGGER system privilleges. So, connect as system and grant create any trigger to SB. then it will work.
Thanks
Milan
Oracle DBA

----------------------------------------------------------------------
Re: Trigger issue.. [message #35877 is a reply to message #35864] Mon, 22 October 2001 01:41 Go to previous message
murarishettysrinivas
Messages: 9
Registered: July 2001
Junior Member
Hello Gk

i would like to say only one thing...
Trigger can be written either for tables or views or schema or database but not for synonyms.

----------------------------------------------------------------------
Previous Topic: Re: Using Connect inside a PL/SQL procedure.
Next Topic: top urgent help needed for SQL plus
Goto Forum:
  


Current Time: Sun Mar 29 09:35:02 CDT 2020