You are on page 1of 12

Oracle Streams

A Customer Perspective: TD Commerce Bank


Frank Ortega

The author is providing the following information exclusively and only as a reference. The author of this document is not liable in any way or circumstances for any damage caused directly or indirectly as the result of using this document. This document assumes you have basic Oracle knowledge and it is not intended to provide you with a complete detailed explanation of the features and their implementation. Please visit http://otn.oracle.com or http://metalink.oracle.com if you require further documentation or explanation.

Why we used Oracle Streams?


n

Needed to add triggers for enabling an Interface Restricted from adding triggers to Vendor Vanilla Schema Slow response time for users over WAN when application was later outsourced to ASP

Why Oracle Streams? (cont.)


n

2 Tables were initially replicated via Streams to secondary schema in same database where triggers where added Transformation Rules to rename schema On outsourcing to ASP, initial 2 tables plus additional 40 Replicated to resolve slow response time on reporting

Tips and Lessons Learned


n

Avoid Problems Caused By Missing Archive Logs


n

Capture process will abort on restart during database startup With Low/No activity (active Streams transactions) Streams metadata (applied_scn in DBA_CAPTURE) will not be updated. Streams Checkpoint occurs after every 10MB of redo Streams metadata only updated if there are active Streams transactions

Tips and Lessons Learned


n

Avoid Archive Log Problems (cont.)


n

Implement a Heartbeat Table


n

Insures active transactions during low activity periods applied_scn will be updated

Create/Replicate a table that includes date/timestamp and global db name & schedule a periodic update.

Tips and Lessons Learned


n

Avoid Archive Log Problems (cont.)


n

Force Capture to Checkpoint Periodically


n

use the capture parameter _CHECKPOINT_FORCE and set the value to YES ensures that the DBA_CAPTURE view columns CAPTURED_SCN and APPLIED_SCN are maintained.

Tips and Lessons Learned


n

Avoid Archive Log Problems (cont.)


n

Removing Archive Logs


n

10g RMAN is supposed to be Streams Aware? Query DBA_REGISTERED_ARCHIVED_LOG


n

Column PURGEABLE indicates if still needed for Capture

Query REQUIRED_CHECKPOINT_SCN in DBA_CAPTURE

Tips and Lessons Learned


n

Monitor Streams Environment


n

Capture Process - Query STATUS from DBA_CAPTURE for ABORTED Monitor Capture Process Queue Growth (V$BUFFERED_QUEUES)
n

Growth indicates destination DB down, network problems, propagation job disabled

Propagation Monitor Propagation DBMS_JOB for disabled status (destination unavailable)

Tips and Lessons Learned


n

Monitor Streams Environment (cont.)


n

Apply Process Check For Errors DBA_APPLY_ERROR Streams Health Check Script (Metalink Doc 273674.1) STRMMON monitoring tool (Metalink Doc 335516.1) Streams Performance Advisor (11g) Oracle Streams Commander (OSC)

Tips and Lessons Learned


n

Streams Cleanup/Removal
n

Streams objects can remain orphaned if removal is not properly performed, causing problems If removing via DROP USER CASCADE, make sure CAPTURE and APPLY processes are shutdown first.

Tips and Lessons Learned


n

Streams Cleanup/Removal (cont.)


n

Better option use Oracle supplied routines.

10g - DBMS_STREAMS_ADM.REMOVE_STREAMS_CONFIGURATION
You may want to make sure you drop your propagation first
select propagation_name from dba_propagation; exec dbms_propagation_adm.drop_propagation(PROPAGATION$_143); exec dbms_streams_adm.remove_streams_configuration;

9i - see Metalink Doc 276648.1

Helpful Docs
n

Oracle Streams Concepts and Administration Oracle Streams Replication Administrator's Guide 224255.1 Steps To Setup Replication Using Oracle Streams 418755.1 10.2 Streams Recommendations 273674.1 Streams Configuration Report and Health Check Script 335516.1 Streams Performance Recommendations

You might also like