The line number referenced by pl/sql for packages, stored procedures and functions is the dba_source.line column.
This won't work for triggers however, as they are stored in dba_triggers as long text: no line numbers. Jared On Fri, 2003-08-01 at 05:20, Charu Joshi wrote: > Is there any we way can see the 'line number' along with the > trigger code text. For ex. with stored procs, packages etc. we can > get the exact line number for a line of code. This helps greatly > when any error occurs, it mentions the line number which you can > jump to. Can we not do the same about triggers? > > Thanks & Regards, > Charu. > > -----Original Message----- > Behalf Of > Jesse, Rich > Sent: Friday, August 01, 2003 1:11 AM > To: Multiple recipients of list ORACLE-L > > > If you look at the source of the ALL_TRIGGERS view (at least in > 8i), you'll > see that the CREATE ANY TRIGGER priv is needed for a schema to see > triggers > of another schema. Since this probably isn't what you want, you > have some > options: > > 1) GRANT SELECT ON DBA_TRIGGERS TO your_schema; > > 2) Reverse engineer the ALL_TRIGGERS view, removing the > restriction and > calling it something else like OUR_TRIGGERS. Put this view in a > non-SYS/non-SYSTEM DBA schema of yours and GRANT SELECT where > necessary. > > 3) Modify the ALL_TRIGGERS view directly, removing the > restriction and > waiting for the appropriate rant from Mladen about not modifying > the data > dictionary. And I'd agree with him -- don't do this. > > Enjoy! > Rich > > Rich Jesse System/Database Administrator > [EMAIL PROTECTED] Quad/Tech Inc, Sussex, WI USA > > > > -----Original Message----- > > From: IT - Database (Do Not Use) > > [mailto:[EMAIL PROTECTED] > > Sent: Thursday, July 31, 2003 2:59 PM > > To: Multiple recipients of list ORACLE-L > > Subject: Viewing the trigger source code > > > > > > My brain is not working today....I cannot figure out how to > > allow one user > > to look at the source code (i.e. trigger_body) for a trigger > owned by > > another user. The fact that there is an all_triggers view leads > me to > > believe that it must be possible....but I can't figure out > > how to do it and > > I have RTFM and I can't find any references there either. > > Can anyone help > > me out? > > > > TIA > > Debbie > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.net > -- > Author: Jesse, Rich > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 > http://www.fatcity.com > San Diego, California -- Mailing list and web hosting > services > ------------------------------------------------------------------ > --- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and > in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You > may > also send the HELP command for other information (like > subscribing). > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.net > -- > Author: Charu Joshi > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jared Still INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
