 |
|
ss
Oracle Tips by Burleson |
Oracle Streams
Chapter 6 -
Apply Handlers
Update DML handler
In order to show the use of the Update DML
handler, a stored procedure called NY4.WRITE_UPD_LCRS has been
created and the Update DML handler has been set up using this
procedure. A new table named NY4.HIST_UPD has been created at
DNYOIP20 where the DML handler writes the details about the update
operation.
The following SQL statements show the creation
and setting up of the Update DML handler:
-- Create a Table to record Update DML history
(at DNYOIP20)
CREATE TABLE NY4.hist_upd (
timestamp DATE,
source_database_name VARCHAR2(40),
command_type VARCHAR2(30),
object_owner VARCHAR2(32),
object_name VARCHAR2(32),
tag RAW(10),
transaction_id VARCHAR2(10),
scn NUMBER,
commit_scn NUMBER,
username varchar2(30),
tx_name varchar2(20),
source_session# number(6),
old_values SYS.LCR$_ROW_LIST,
new_values SYS.LCR$_ROW_LIST)
NESTED TABLE old_values STORE AS
hist_upd_old_ntable
NESTED TABLE new_values STORE AS
hist_upd_new_ntable
/
The above text is
an excerpt from:
Oracle Streams
High Speed Replication and Data
Sharing
ISBN 0-9745993-5-2
by Madhu Tumma
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|