Disabling constraints
Posted in 2015
Topics: General Discussion
Hi, I need tu upload to tables, without cheking constraints, so I use the Set constraints for tabName disabled, but got an the error 892 "cannot disable object objectname due the other active objects usong". Is there an statement to disable temporaly all constrainst and later enable again after upload the two tables ? Thanks in advance. Enviado desde mi iPhone
Set constraints all ... disabled, Art On Jul 15, 2015 12:21 PM, "Jorge Valenzuela" <jorgervt@gmail.com> wrote: > Hi, > I need tu upload to tables, without cheking constraints, so I use the > Set constraints for tabName disabled, but got an the error 892 "cannot > disable > object objectname due the other active objects usong". > Is there an statement to disable temporaly all constrainst and later enable > again after upload the two tables ? > > Thanks in advance. > > Enviado desde mi iPhone > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --089e0122e688f1d0aa051aec8ada
Jorge, You like have likely disabled a primary key of the table, but there are foreign keys on other tables that are using it. There is no command to automatically disable all objects that are dependent on that constraint. You will need to identify the foreign keys and disable those too. Also take care when disabling indexes upon which are being used by constraints, as you'll run into a similar dependency problem. Mike -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Jorge Valenzuela Sent: Wednesday, July 15, 2015 10:21 AM To: ids@iiug.org Subject: Disabling constraints [35461] Hi, I need tu upload to tables, without cheking constraints, so I use the Set constraints for tabName disabled, but got an the error 892 "cannot disable object objectname due the other active objects usong". Is there an statement to disable temporaly all constrainst and later enable again after upload the two tables ? Thanks in advance. Enviado desde mi iPhone **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
Thanks, very much, I use these commands
begin work;
set constraints all deferred;
load from file00729.unl insert into table;
load from file00270.unl insert into table;
commit work;
And it work very well. both tables has circular reference.
2015-07-15 9:35 GMT-07:00 Art Kagel <art.kagel@gmail.com>:
> Set constraints all ... disabled,
>
> Art
> On Jul 15, 2015 12:21 PM, "Jorge Valenzuela" <jorgervt@gmail.com> wrote:
>
> > Hi,
> > I need tu upload to tables, without cheking constraints, so I use the
> > Set constraints for tabName disabled, but got an the error 892 "cannot
> > disable
> > object objectname due the other active objects usong".
> > Is there an statement to disable temporaly all constrainst and later
> enable
> > again after upload the two tables ?
> >
> > Thanks in advance.
> >
> > Enviado desde mi iPhone
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --089e0122e688f1d0aa051aec8ada
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1147f0d8a9ed12051affd4e8