Home » SQL & PL/SQL » SQL & PL/SQL » Trigger
Trigger [message #266061] Sun, 09 September 2007 08:05 Go to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

I have an update trigger on a table.

In the body of the trigger i am trying to fetch values from another schema. It gives an error saying table or view doesnt exist.

Mudabbir.
Re: Trigger [message #266064 is a reply to message #266061] Sun, 09 September 2007 08:31 Go to previous messageGo to next message
Michel Cadot
Messages: 64110
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Roles are not enabled in triggers.

Regards
Michel
Re: Trigger [message #266066 is a reply to message #266064] Sun, 09 September 2007 08:35 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

what can be done in this case?
Re: Trigger [message #266067 is a reply to message #266066] Sun, 09 September 2007 08:38 Go to previous messageGo to next message
Michel Cadot
Messages: 64110
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Get privileges directly.

Regards
Michel
Re: Trigger [message #266068 is a reply to message #266067] Sun, 09 September 2007 08:46 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Quote:
Get privileges directly.

I did not understand .Can you please explain.
Mudabbir
Re: Trigger [message #266069 is a reply to message #266068] Sun, 09 September 2007 08:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64110
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You need privileges to query the table in the other schema, so get them.

Regards
Michel
Re: Trigger [message #266072 is a reply to message #266069] Sun, 09 September 2007 09:03 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

both the schemas have DBA roles assigned
Re: Trigger [message #266076 is a reply to message #266072] Sun, 09 September 2007 09:17 Go to previous messageGo to next message
Michel Cadot
Messages: 64110
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Back to my first answer.

Regards
Michel
Re: Trigger [message #266092 is a reply to message #266076] Sun, 09 September 2007 12:14 Go to previous messageGo to next message
imtiazmasud
Messages: 49
Registered: May 2005
Location: Bangladesh
Member

you can try with
schema_name.table_name

imtiaz
Re: Trigger [message #266102 is a reply to message #266092] Sun, 09 September 2007 13:57 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
imtiazmasud wrote on Sun, 09 September 2007 19:14
you can try with
schema_name.table_name

imtiaz

No, that will not help.
See Michel's first answer: any privilege granted through roles are not used when creating stored procedures or triggers. You need the privileges (for example select on table x, or select any table) granted directly to the user.
Re: Trigger [message #266166 is a reply to message #266102] Mon, 10 September 2007 01:32 Go to previous message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Thanks Guys,

I understand perfectly....

Previous Topic: WITH CHECK OPTION !!!!!
Next Topic: whats the maximum columns in oracle 9i
Goto Forum:
  


Current Time: Mon Dec 05 10:52:51 CST 2016

Total time taken to generate the page: 0.06023 seconds