Book Image

Oracle 11g Streams Implementer's Guide

Book Image

Oracle 11g Streams Implementer's Guide

Overview of this book

From smaller businesses through to huge enterprises ñ users all over the world often require access to data 24 hours a day. Distributed database systems proliferate the world of data sharing providing an ability to access real-time data anywhere, anytime. Oracle Streams, a built-in feature of the Oracle database, is a data replication and integration feature critical to the success and wellbeing of enterprises in today's fast moving economy. This book provides the reader with solid techniques to master Oracle Streams technology and successfully deploy distributed database systems. This book quickly goes over the basics and gets you up and running with a simple Oracle 11g Streams environment. It will serve as an excellent companion to the Oracle Streams Administration Guide. It is intended for Oracle database architects and administrators, and provides in-depth discussion on must-know information for the design, implementation, and maintenance of an Oracle Streams environment. The book does not attempt to regurgitate all the information in the Oracle Streams Administration Guides, but rather provides additional clarification and explanation of design, implementation, and troubleshooting concepts that are often elusive in Streams documentation. It also identifies helpful tools and Oracle resources to add to your knowledge base, as well as tried and tested tricks and tips to help you tame Oracle Streams. The book starts by introducing and explaining the components of Oracle Streams and how they work together. It then moves on logically, helping you to determine your distributed environment requirements and design your Streams implementation to meet those requirements. Once these concepts are discussed, the book moves to configuration and basic implementation examples to help solidify those concepts. It then addresses advanced features such as tags, down-stream capture, and conflict resolution. You then move on to maintenance techniques such as documenting the environment, effectively planning and implementing changes to the environment, and monitoring and troubleshooting the environment. When you have studied the techniques and completed the hands-on examples, you will have an understanding of Oracle Streams' core concepts and functionally that will allow you to successfully design, implement, and maintain an Oracle Streamed environment.
Table of Contents (14 chapters)
Oracle 11g Streams Implementer's Guide
Credits
About the Authors
About the Reviewers
Preface

Streams Change tables


The current ethical climate of computing unfortunately mandates the need to identify who made what changes to what data, when and from where. Corporations must now comply with stringent data change auditing mandates associated with such regulations as SOX (Sarbanes Oxley Act), FISMA (Federal Information Security Management Act); to name a couple. Prior to Oracle 11gR2, the Capture and Propagation of data change audit information had to be manually included in Streamed environments. Oracle 11gR2 introduces the DBMS_STREAMS_ADM.MAINTAIN_CHANGE_TABLE procedure that allows the DBA to quickly configure a separate change audit table for a Streamed table, as well as to propagate the change audit data from the source site to all target destination sites. This procedure can also be used to create one-way replication of a table along with the change capture from a source to a destination database. Change tables can be implemented for local or downstream capture, and local or remote apply configurations.

The DBMS_STREAMS_ADM.MAINTAIN_CHANGE_TABLE procedure creates all the components necessary to capture, send, and record data change information to the change table.

The DBMS_STREAMS_ADM.MAINTAIN_CHANGE_TABLE procedure is run at the capture site and accomplishes the following:

  • Creates a separate change table for the change audit data

    • The change table can be located in the same database or a remote database

    • The change table columns tracked for its source table are based on the column_type_list

    • Additional audit data columns that can be added to the change table include:

      • value_type

      • source_database_name

      • command_type

      • object_owner

      • object_name

      • tag

      • transaction_id

      • scn

      • commit_scn

      • compatible

      • instance_number

      • message_number

      • row_text

      • row_id

      • serial#

      • session#

      • source_time

      • thread#

      • tx_name

      • username

  • Creates a Capture process to capture source table changes

  • Creates a Propagation process for remote apply

  • Creates an Apply process at the destination site

  • Creates and adds DML handlers to the specified Apply process that record change information in the change table based on row LCR information

  • Configures the Apply process to execute the row LCR on the remote source table if EXECUTE_LCR is TRUE

    This supports the optional one-way replication.

The following figure shows configuration with local capture, remote Apply with Source table replication.

Before configuring change tables, you want to make decisions as to:

  • The type of environment to configure

  • The source table columns to track

  • If/what metadata to record

  • The values to Track for Update Operations (old, new)

  • Whether to configure a KEEP_COLUMNS transformation

  • Whether to specify CREATE TABLE options for the Change Table

  • Whether to perform the Configuration Actions Directly or with a Script

  • Whether to replicate the Source Table as well

Note

For more information on Streams Change Tables, please refer to Chapter 20, Using Oracle Streams to Record Table Changes in the Oracle Streams Concepts and Administration 11g Release 2 Guide.

For more information on the MAINTAIN_CHANGE_TABLE procedure, please reference the Oracle PL/SQL Packages and Types Reference DBMS_STREAMS_ADM: subprogram MAINTAIN_CHANGE_TABLE.