If the database option wait_for_commit is On, or if a foreign key is defined using CHECK ON COMMIT in the CREATE TABLE statement,
you can update the database and cause a referential integrity violation if the violations are resolved before the changes
are committed.

You can use the sa_check_commit system procedure to check whether there are any outstanding referential integrity violations
before attempting to commit your changes.

The returned parameters indicate the name of a table containing a row that is currently violating referential integrity, and
the name of the corresponding foreign key index.

The following set of commands can be executed from Interactive SQL. Rows are deleted from the Departments table in the sample
database and a referential integrity violation occurs. The call to the sa_check_commit system procedure checks which tables
and keys have outstanding violations, and the rollback cancels the change: