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

Home -> Community -> Usenet -> c.d.o.misc -> Re: "alter table..." in a trigger

Re: "alter table..." in a trigger

From: Dave Marion <lmarion20_at_comcast.net>
Date: Wed, 20 Feb 2002 00:28:25 GMT
Message-ID: <J4Cc8.72864$8d1.23682962@news1.rdc1.md.home.com>


True, any DDL performs an auto commit. There is an exec_ddl procedure in one of the dbms packages, dbms_utility I think.

Dave Marion
SAIC Annapolis, MD

"Flavien" <flavien013_at_aol.com> wrote in message news:3c72d88e$0$23521$626a54ce_at_news.free.fr...
> I use 7.2 personal Oracle Version and don't know how to use dbms.sql...
>
> Someone told me to use Procedure :
>
> crate or replace procedure anyddl (s1 varchar2) as
> cursor1 integer;
> begin
> cursor1 := dbms_sql.open,_cursor;
> dbms_sql.parse(cursor1,s1,dbms_sql.v7);
> dbms_sql.close_cursor(cursor1);
> end;
> /
>
> but if i tried to insert this in my trigger :
>
> anyddl ('ALTER TABLE TEST.POIL DISABLE CONSTRAINT PK_ESSAI');
>
> Oracle return me error ORA_04092 : cannot COMMIT in a trigger
>
> Regards,
>
> Flavien
>
>
>
> Sybrand Bakker <postbus_at_sybrandb.demon.nl> a écrit dans le message :
> 79557u0t6rboofni6nf1j4uoev1jorm7h1_at_4ax.com...
> > On Tue, 19 Feb 2002 17:50:26 +0100, "auxitec e2ia"
> > <auxitec.e2ia_at_wanadoo.fr> wrote:
> >
> > >hi,
> > >
> > >is it possible to do an "ALTER TABLE TEST.POIL DISABLE CONSTRAINT
> PK_ESSAI"
> > >in a trigger ?
> > >
> > >Thanks
> > >
> > >
> > >Flavien,
> > >
> > >
> > >
> > You can do that using execute immediate (8i) or dbms_sql (8.0 and
> > before)
> > Your requests raises strong suspicions about the quality of your work.
> >
> >
> > Regards
> >
> > Sybrand Bakker, Senior Oracle DBA
> >
> > To reply remove -verwijderdit from my e-mail address
>
>
Received on Tue Feb 19 2002 - 18:28:25 CST

Original text of this message

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