Hi All,
I have a before update trigger for a local table. I know Oracle does not
commit the inserting audit entry into the audit log table until the user
commits the changes on the audited table. Can I assume Oracle issues one
commit for both changes? When commit fails, both changes will be
A two-phase commit is simply a way to make sure that commits happen in a distributed
transaction the same way that they do in a local transaction. The absolute rule is:
Everything commits or Nothing does. In-between, with some parts committed and some
not, is NOT tolerable. So in your
John,
Thanks for your very detail explanation.
From: John Flack [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Subject: RE: commit for triggers
Date: Fri, 23 Jan 2004 09:09:34 -0800
A two-phase commit is simply a way to make sure
John,
I agree w/ everything you said, except for the autocommit functionality.
Autocommit setting has no impact on whether DDL will commit or rollback
any in progress transaction. DDL always commits an in-progress
transaction. The short example below speaks for itself. (8.1.7.4 on
Solaris 2.8)
Perhaps I got it wrong, but, John - are you saying that the entries are part
of the rollback, i.e. if the transaction that caused the audit trail entries
to be created is rolled back, the audit trail enries are rolled back as
well?
The auditing entry is NOT part of the transaction, it's created
Mark - Thanks for the correction. When I looked at what I said about the transaction
before a DDL command a second time, I myself wondered if I'd gotten it right. If
you've tested it, and the transaction is always committed, I'll take your word for it.
Arup - I don't normally use Oracle's