Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Check RI on Commit
Dag Arne Matre wrote:
>
> I believe there is an option in ANSI-SQL (don't know whether it is SQL2
> or the SQL3 proposal, don't know which level) that says: wait for commit
> to check referential integrity. Normally, this would fail:
> INSERT INTO Detail (DetailPK, MasterPK) values (1,1)
> INSERT INTO Master (MasterPK) values (1)
> COMMIT
> but with the option set, it would be OK.
> Basically, this means that you can do whatever you want inside your
> transaction, just make sure the db is consistent when you COMMIT your
> WORK.
>
> I think both Informix and SQL Anywhere support this feature.
>
> Is there any option like this in Oracle and/or MS SQL Server?
>
> D A
At least in Oracle8 you can say something like ALTER SESSION SET CONSTRAINTS {IMMEDIATE | DEFERRED} Immediate checks constraints on statement level and deferred on transaction level.
-- Timo Haatainen TT-Tieto OyReceived on Mon Jan 19 1998 - 00:00:00 CST