Consultor Eletrônico



Kbase 18273: DBTASKID equivalent in Oracle for use with replication
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/25/1998
DBTASKID equivalent in Oracle for use with replication

Replication schemes typically include a requirement for transactional
integrity across the source and destination databases. In order to do
this within Progress, a function called DBTASKID was implemented in
version 8.1 which returns a unique integer associated with a transacti
on within the database. Multiple records updated within a transaction
can then be tagged with this transaction-id for later grouping when re
plicating into the target db. This DBTASKID function, however, is only
available within Progress; if the source DB is not Progress-based,
some equivalent method of grouping is necessary.

In Oracle, there are tables called Dynamic Performance tables which

correspond in some ways to our virtual system tables. You can
retrieve a unique transaction number for these tables using the
following query:
select ixdsqn from v$transaction where addr = ( select all taddr from
v$session
where audsid = userenv('sessionid') ) ;
In order to run this you will need to be graned SELECT permission on
the system tables sys.v_$transaction and sys.v_$session. (Note: the
underscores are not a typo. v_$* are tables, v$* are views; the views
are created, with public synonyms, through the Oracle-provided SQL
script $ORACLE_HOME/rdbms/admin/catalog.sql.)

This is known to run in Oracle version 7.3 and 8.
(FAH/9/25/98)