Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "alter table..." in a trigger
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 - 16:58:22 CST
![]() |
![]() |