Streams Topology - Oracle 11g

What makes up the Streams topology? It is composed of databases in the Streams configuration,the Streams components for each database,and the flow of messages between the components.In the Streams topology, messages flow from one component to another component.

This is referred to as a stream path.A path can be something as simple as a capture or synchronous capture process or an application enqueueing messages into a queue.Another path can be when the apply process dequeues the messages.

A message will go through several paths queues and propagations before it reaches the apply process.The stream path ends when messages are dequeued by the apply process.

Streams Topology

The Streams path begins from the capture process and ends with the apply process.Along the way,there can be multiple source/destinations before reaching the final apply process destination.

The Streams topology assigns a number to each path.This allows for easy monitoring of the paths and location of messages along the path.

The Streams topology also designates a number to a link between two compo nents in a path, the beginning component and an end component.The positions of the link in the overall Streams path can resemble what is listed here:

  1. The beginning component is the capture process,and the end component is the queue.
  2. The beginning component is the queue,and the end component is the propagation sender.
  3. The beginning component is the propagation sender,and the end component is the propagation receiver.
  4. The beginning component is the propagation receiver,and the end compo nent isthe queue.
  5. The beginning component is the queue,and the end component is the apply.

Streams Topology Views

Various Streams views provide detailed information and statistics about the Streams topology. Topology view information is gathered by executing theanalyze_ current_performance procedure as stated earlier. Table shows various Streams topology views.

Streams Topology Views

Some of the view information is temporary in nature and survives only the duration of the session. Views returning such temporary information includeDBA_STREAMS_ TP_COMPONENT_STAT, DBA_STREAMS_TP_PATH_BOTTLENECK, andDBA_STREAMS_ TP_PATH_STAT. When the user disconnects the session, the temporary information is purged.

With each of the components, you must determine the component ID. This ID is assigned to each component and used throughout the topology mapping to track information about the component and what information flows in and out of the component.

The component ID can be determined by querying the DBA_STREAMS_TP_COMPONENT view. You can query the DBA_STREAMS_TP_COMPONENT view on both the source and target databases to get a clear under standing of all the Streams components. The follow ing query is issued from a source database:

select component_id, component_name, component_type, component_db
from dba_streams_tp_component
order by component_id
/
ID Name Type Database
---- ------------------------------------------- -------------------- ---------
1 DBA11G2=>"STREAMS_ADMIN"."STREAMS_APPLY_Q" PROPAGATION RECEIVER DBA11G
2 "STREAMS_ADMIN"."STREAMS_CAPTURE_Q" QUEUE DBA11G2
3 "STREAMS_ADMIN"."STREAMS_CAPTURE_Q"=>DBA11G PROPAGATION SENDER DBA11G2
4 STREAMS_CAPTURE CAPTURE DBA11G2

On the target database system, you will get another result to indicate that it is the destination:

ID Name Type Database
---- ---------------------------------- -------- ----------
1 "STREAMS_ADMIN"."STREAMS_APPLY_Q" QUEUE DBA11G
2 STREAMS_APPLY APPLY DBA11G

You can view the path to determine where a message is queued. To view the path information,you can use the following query:

select path_id, source_component_id, destination_component_id, position, active
from dba_streams_tp_component_link
order by path_id, position
SQL> /
PATH_ID SOURCE_COMPONENT_ID DESTINATION_COMPONENT_ID POSITION ACT
---------- ------------------- ------------------------ -------- ---
1 1 2 1 YES

The Streams topology provides information about where a message resides and what component of the path it is at. Another view called STREAMS_TP_PATH_BOTTLENECK identifies Streams performance problems:

select component_id, component_name,component_type,component_db
from dba_streams_tp_path_bottleneck
where bottleneck_identified ='YES'
order by component_id
SQL> /
no rows selected

If you get the “no rows selected” output,then the Streams Performance Advisor could not identify any bottleneck components in your environment.If you get result sets returned from the query,this indicates you may have legitimate performance problems.

You should check the status of these components.Next,you will have to put on your trouble shooting hat to diagnose the performance bottlenecks.To dis play statistics for the components in the Streams topology,run the follow ing query:

select component_id, component_name, component_type,
statistic_name, statistic_value, statistic_unit
from dba_streams_tp_component_stat
order by component_id, component_name, component_type, statistic_name
SQL> /Streams topology

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 11g Topics