Re: Possible to check whether a COMMIT will fail?



The only way I can think of is to go through all the constraints you
think might be involved in the transaction (use CONSTRAINT_TYPE,
SEARCH_CONDITION, STATUS, ... in *_CONSTRAINTS and everything in
*_CONS_COLUMNS). Since the current transaction sees all the data
(including the non-committed one), you should easily be able to tell
which constraints are currently violated. I'm not sure if you want a
generic script or a specific one, but I can tell you that a generic one
would be much harder to code (I tried at some point to do something
similar, and didn't achieve much success).

Daniel

.



Relevant Pages

  • Re: row vs row.column level locking ++ constraints and TAPIs
    ... Any transaction which would update ... >> in the year 2003 (deadline for the HIPPA implementation). ... column dependencies & constraints -- these don't violate relational ... Any database that does not have proper ...
    (comp.databases.oracle.server)
  • Re: Too much integrity?
    ... 'items' and the specialist lists' items... ... You can indeed explicitly start a transaction e.g. ANSI-92 Query Mode ... defer constraints (possible with full SQL-92 syntax SET CONSTRAINTS ... Further note that a Jet PROCEDURE can only comprise one SQL statement, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: isolation level serializable
    ... end loop; ... on to disable all constraints on the destination tables, ... set transaction isolation level serializable; ... Each transaction should commit or rollback itself when ...
    (comp.databases.oracle.server)
  • Re: Add columns to table, but in an order
    ... and also renames all constraints for the table by prefixing old_. ... In addition to what Hugo said: running all in one transaction is the ... DECLARE @const_name sysname, ... Links for SQL Server Books Online: ...
    (microsoft.public.sqlserver.server)
  • Re: isolation level serializable
    ... end loop; ... on to disable all constraints on the destination tables, ... set transaction isolation level serializable; ...
    (comp.databases.oracle.server)