11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

354 CHAPTER 8 ■ ORACLE STREAMSSplitting and Merging of a DestinationAs with any kind of day-to-day operational support, rare but unfortunate situations will arisewhere the target server or database incurs an outage. In a hub-and-spoke configuration, if adestination in a Streams replication environment becomes unavailable, it can cause file systemissues or possible performance degradations on the source system.Splitting a StreamFor such situations, DBAs can split (temporarily offline) the unavailable destination from aStream configuration using the DBMS_STREAMS_ADM.SPLIT_STREAMS procedure. The split_streamsprocedure creates cloned capture queue and processes on the source. In addition, a propagationis created with a disabled status. The split_streams procedure has these parameters:PROCEDURE split_streams (propagation_name IN VARCHAR2,cloned_propagation_name IN VARCHAR2 DEFAULT NULL,cloned_queue_name IN VARCHAR2 DEFAULT NULL,cloned_capture_name IN VARCHAR2 DEFAULT NULL,perform_actions IN BOOLEAN DEFAULT TRUE,script_name IN VARCHAR2 DEFAULT NULL,script_directory_object IN VARCHAR2 DEFAULT NULL,auto_merge_threshold IN NUMBER DEFAULT NULL,schedule_nameIN OUT VARCHAR2,merge_job_nameIN OUT VARCHAR2);The AUTO_MERGE_THRESHOLD is by default set to NULL or 0, which means the split stream is notautomatically merged back with the original stream. If the result of CAPTURE_MESSAGE_CREATE_TIMEin the V$STREAMS_CAPTURE view is within seconds of the AUTO_MERGE_THRESHOLD of thesplit_streams procedure with the original capture process, the two streams are automaticallymerged.Merging the StreamsOnce the issue on the target is resolved, you can merge the split stream back with the originalstream using the merge_streams procedure in the same package:PROCEDURE merge_streams (cloned_propagation_name IN VARCHAR2,propagation_name IN VARCHAR2 DEFAULT NULL,queue_nameIN VARCHAR2 DEFAULT NULL,perform_actionsIN BOOLEAN DEFAULT TRUE,script_nameIN VARCHAR2 DEFAULT NULL,script_directory_object IN VARCHAR2 DEFAULT NULL);As mentioned, this merge can be automated by setting the auto_merge_threshold parameterof the split_streams procedure to a nonzero value.Once a fault is detected at a target destination, you can query the V$BUFFERED_QUEUESview to identify how many messages are in a buffered queue and how many of these messageshave spilled to disk.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!