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: DDL for triggers.

Re: DDL for triggers.

From: joel garry <joel-garry_at_home.com>
Date: 26 Oct 2006 16:41:50 -0700
Message-ID: <1161906110.314193.183680@h48g2000cwc.googlegroups.com>

joel garry wrote:
> Maxim Demenko wrote:
> > joel garry schrieb:
> >
> > I don't have 9i actually to test, but i doubt, it would behave
> > differently. Here is for 10gR2
> >
> > SQL> select * from v$version
> > 2 /
> >
> > BANNER
> > --------------------------------------------------------------------------------
> > Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
> > PL/SQL Release 10.2.0.2.0 - Production
> > CORE 10.2.0.2.0 Production
> > TNS for Linux: Version 10.2.0.2.0 - Production
> > NLSRTL Version 10.2.0.2.0 - Production
> >
> > SQL> set long 1000000 pages 0
> > SQL> select dbms_metadata.get_ddl('TRIGGER','FILES_TRG') from dual;
> >
>
> Thank you Maxim, that is indeed what I was missing.
>
> D'Oh!
>

Actually, I D'Oh'd too soon. dbms_metadata actually is breaking up the first variable after the BEGIN statement in the trigger.

The first few characters are like this (as displayed in EM or trigger_body in user_triggers):

BEGIN :new.GL_BALANCE_00 :=

>From dbms_metadata, it's coming out like this:

 BEFORE INSERT OR UPDATE ON <obscured for posting> FOR EACH ROW BEGIN :ne
w.
GL_BALANCE_00 := (If newsreaders are reformatting, there is a newline before GL_BALANCE_00 and BEFORE through new. is on one line.)

It's not linesize, as I can set linesize to 12000 or whatever, then strip out pairs of blanks with sed and it still seems to be putting out <80 character lines, breaking in the middle of whatever it is printing.  trimspool on doesn't help either. Something I'm still not understanding about sql*plus, I guess. Or is there something I need to be telling dbms_metadata? Or am I forced to utl_file.put?

jg

-- 
@home.com is bogus.
http://www.jacksonpollock.org/
Received on Thu Oct 26 2006 - 18:41:50 CDT

Original text of this message

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