Simulating 2 phase commit

From: Andrew Goodchild <andrewg_at_cs.uq.oz.au>
Date: 10 Jan 94 04:46:47 GMT
Message-ID: <16941_at_uqcspe.cs.uq.oz.au>


I am trying to simulate 2PC in oracle transactions (without using distributed transactions), and I am not sure how to signal programs external to the oracle dbms before a transaction commits.

For example, how would I represent this pseudO Code transactioN in sqlplus for Oracle version 7:

	begin
		update TABLE_x set attr2 = "data" where attr1 = 5;
		send ready to external program;
		wait for COMMIT/ABORT message;
		IF message = "COMMIT"
			COMMIT
		ELSE
			ABORT
		ENDIF
	end

I know simulating 2PC is not as reliable as the real thing, so just humour me by telling me if this style of message passing can be done or not.

Thanks in advance

Andrew Goodchild (andrewg_at_cs.uq.oz.au) Department of Computer Science
The University of Queensland
Australia Received on Mon Jan 10 1994 - 05:46:47 CET

Original text of this message