Home » SQL & PL/SQL » SQL & PL/SQL » Trigger
Trigger [message #246618] Thu, 21 June 2007 08:44 Go to next message
kcjohn.lin
Messages: 8
Registered: June 2007
Location: london
Junior Member
hello

Woundering if anyone can help me on this aswell!!

How would you find if a trigger is affecting operations for any user specified table???

regards

John Razz
Re: Trigger [message #246621 is a reply to message #246618] Thu, 21 June 2007 08:51 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
How do you mean 'affecting'?

If you want to see what triggers (or other objects) there are that use the object in question, you can look at USER|ALL|DBA_DEPENDENCIES

SELECT owner,NAME 
FROM   ALL_DEPENDENCIES
WHERE  TYPE ='TRIGGER'
AND    referenced_name = '<table_name>'
Re: Trigger [message #246625 is a reply to message #246621] Thu, 21 June 2007 09:01 Go to previous messageGo to next message
kcjohn.lin
Messages: 8
Registered: June 2007
Location: london
Junior Member
thanks for your reply and sorry if my question was unclear!!

i'm using oracle 9i,

what i mean is if i go to work for a new company and i need to alter some data. i want to find out if i will activate any trigger which will affect operations for that user specified table.

some trigger will affect operations and some won't

thanks
John Razz
Re: Trigger [message #246628 is a reply to message #246625] Thu, 21 June 2007 09:07 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Not at all clear for me. Cool
Can you please elaborate with examples?

By
Vamsi
Re: Trigger [message #246630 is a reply to message #246625] Thu, 21 June 2007 09:09 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Recursively query dba_dependencies (hoping there is no dynamic SQL otherwise scan the code).

Regards
Michel

[Updated on: Thu, 21 June 2007 09:09]

Report message to a moderator

Re: Trigger [message #246641 is a reply to message #246628] Thu, 21 June 2007 09:27 Go to previous messageGo to next message
kcjohn.lin
Messages: 8
Registered: June 2007
Location: london
Junior Member


yepidee ireahkehrungah?

Razz
Re: Trigger [message #246647 is a reply to message #246641] Thu, 21 June 2007 09:38 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

./fa/1600/0/

Re: Trigger [message #246653 is a reply to message #246647] Thu, 21 June 2007 09:55 Go to previous messageGo to next message
kcjohn.lin
Messages: 8
Registered: June 2007
Location: london
Junior Member
sorry michel

i don't understand what you mean?

regards
john Razz
Re: Trigger [message #246688 is a reply to message #246653] Thu, 21 June 2007 11:30 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If your table has trigger then trigger is in the dependencies of the table.
If the trigger itself alter something then something is in the dependencies of the trigger.
Which may have trigger.
Which may...
And so on.

That's what I meant.

Regards
Michel
Previous Topic: output in a single row
Next Topic: about hierarchy
Goto Forum:
  


Current Time: Sat Dec 10 22:22:06 CST 2016

Total time taken to generate the page: 0.04826 seconds