Hi,
I'm a developer for a software application vendor, and our application
makes use of a customer-maintained Oracle 8i/9i database. We've had a
customer request to support DB2 database, and I'm looking into the
feasibility of migration. Our application runs on NT Server and, the
DB2 database would be in some cases on a separate AIX machine, in
other cases on an AS/400.
There are two problems we are running into, both relating to our use
of Oracle Supplied Packages:
First, we make use of the DBMS_PIPE Oracle Supplied Package to
communicate from a trigger back to our application via named pipes. Is
there a way to do this in DB2?
Second, we want that communication to be transactionally controlled.
Of course, even in Oracle, communicating out of the trigger back to
the application happens immediately, not on the COMMIT. The way we
handle this in Oracle is by making use of the DBMS_TRANSACTION Oracle
Supplied Package. This allows us to retrieve a unique identifier for
the current transaction in the trigger, send it to the application via
DBMS_PIPE, and later check that transaction id against the data
dictionary table V$TRANSACTION to determine the state of the
transaction. The application then is able to apply the update only
after a COMMIT. So in DB2 how would I find a unique identifier for the
current transaction, and then how would I find out the state of a
transaction later from a different session?
Thanks in advance,
Abram Friesen