Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Where is the executable code of a trigger stored in the DBMS?

Re: Where is the executable code of a trigger stored in the DBMS?

From: HansF <News.Hans_at_telus.net>
Date: Sun, 13 Nov 2005 00:09:29 GMT
Message-ID: <pan.2005.11.13.00.09.29.71508@telus.net>


On Sat, 12 Nov 2005 15:42:45 -0800, srivenu wrote:

>
> The source code for triggers is stored in source$

You should not be going to the underlying tables if you can avoid it. The table you reference, source$, is visible to sys only and we should avoid connect info as sys

SQL> connect system
Enter password:
Connected.
SQL> desc source$
ERROR:
ORA-04043: object source$ does not exist

SQL> connect / as sysdba
Connected.
SQL> desc source$

 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OBJ#                                      NOT NULL NUMBER
 LINE                                      NOT NULL NUMBER
 SOURCE                                             VARCHAR2(4000)

SQL> There is a reason Oracle has exposed the data dictionary views that are listed in the Reference manual. ;-}

However, you can use {DDV}_SOURCE as well as {DDV}_TRIGGERS to get at the info.

SQL> desc dba_source

 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OWNER                                              VARCHAR2(30)
 NAME                                               VARCHAR2(30)
 TYPE                                               VARCHAR2(12)
 LINE                                               NUMBER
 TEXT                                               VARCHAR2(4000)


-- 
Hans Forbrich                           
Canada-wide Oracle training and consulting mailto: Fuzzy.GreyBeard_at_gmail.com
*** Top posting relies guarantees I won't respond. *** Received on Sat Nov 12 2005 - 18:09:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US