This is a discussion on How to switch off constraints? within the Informix forums, part of the Database Server Software category; --> Hi, IMHO there is a command to switch off constraints for the purpose of import and so on. Anybody ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Joachim Engel wrote: > Hi, > > IMHO there is a command to switch off constraints > for the purpose of import and so on. > > Anybody can help me? > > We are using IDS 7.31. > Yes. Check your SQL Syntax Guide. Something like "SET CONSTRAINTS FOR table DISABLED" (??) But please remember that re-enabling them can take very long (the engine will have to check them as if it was the first time). Regards. |
| |||
| On Tue, 07 Oct 2003 11:48:27 -0400, Joachim Engel wrote: Rather than disable the constraints which would require rechecking the entire hierarchy of rows, try suspending the constraint checks for the rows added/updated until the end of the transaction: begin work; set constraints all deferred; ---work commit work; -- All constraint checking of inserted/updated/deleted rows happens now with an error and forced rollback if the constraints fail. Art S. Kagel > Hi, > > IMHO there is a command to switch off constraints for the purpose of import > and so on. > > Anybody can help me? > > We are using IDS 7.31. > > > Kind regards > Joachim Engel. |
| ||||
| On Fri, 10 Oct 2003 07:16:59 -0400, Joachim Engel wrote: That's exactly what the 'set constraints all deferred;' is for, as I detailed in my last. Art S. Kagel > Thanx for the infos, guys. > > It seems that there is no global switch for the whole database. We want to > import data without considering the order of Master-Detail relationships. > > Kind regards > Joachim Engel |