|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
view code from triggers
Is there a way that I am able to view the code of the triggers that are currently on my server. Someone else created a trigger for me and I would like to view the code of this. Are their any commands or scripts out there?
Dave |
|
#2
|
|||
|
|||
|
Dave,
you could use a free tool like toad or the standard dba studio provided by oracle and easily view the source. if you do not have access to such tools and you need queries.. user_triggers is the view that will be able to show you the src for a particular trigger. however keep in mind in order to use user_triggers you need to be logged in the schema where the trigger was created...lets say if it was created under the scott schema u need to run the query as scott/tiger. also the field that stores the body of the trigger is a long field so you might need to convert it b4 you can see all of it. also you can always lookup the tables that create the view in the first place...depends how deep you want to go . hth, Jiggee |
|
#3
|
|||
|
|||
|
No need to use user_triggers. The view all_triggers should work as well:
Code:
SELECT trigger_name, trigger_body FROM all_triggers WHERE owner = 'the_user_for_which_the_trigger_was_created' AND table_name = 'the_table' |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > view code from triggers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|