SlideShare a Scribd company logo
Managing Oracle Streams 10g Using Oracle Grid Control Scott R Baker 8/24/2009 This presentation can be viewed at: http://www.slideshare.net/scottb411
Scott R Baker Fall 1999: - Graduated from the University of Central Florida with BS Management information Systems Fall 1999 – August 2005: Senior Support Engineer with Oracle Corporation (Orlando) 2002 – Oracle Certified DBA in 8i August 2005 - May 2009: Senior Oracle DBA; DBA Manager with Bonnier Corporation (Formerly World Publications) May 2009 - Present: Development Manager -  (DBA / Quality Assurance / Support) with Bonnier Corporation
Bonnier Corporation Bonnier Corporation is one of the largest consumer-publishing groups in America, and with nearly 50 special-interest magazines and related multimedia projects and events, it is the leading media company serving passionate, highly engaged audiences. With over 1,000 employees and more than $350 million in annual revenue, Bonnier Corp. ranks in the top 10 nationally among publishing companies.  Headquarters are in Winter Park, FL http://www.bonniercorp.com
Bonnier Corporation’s Use of Oracle Streams Bonnier Corporation’s use of Oracle Streams was featured in Oracle Magazine in June 2008: http://www.oracle.com/technology/oramag/oracle/08-jul/o48linuxsupport.html In December 2008, Oracle released a case study of our use of Oracle Streams at Bonnier: http://www.oracle.com/technology/deploy/availability/pdf/bonnier_casestudy.pdf
Bonnier Corporation’s Use of Oracle Streams
Streams Replication Overview
Streams Replication Logical Replication vs Physical Replication Streams is logical-based replication Rule-Based Replication Positive Rules of Replication What do you want to replicate? Negative Rules of Replication What don’t you want to replicate? Streams Administrator Streams environment self-contained within it’s own schema and administrator
Streams Replication Processes: Capture: A Streams capture process mines redo logs to create one or more logical change records (LCRs) and queues them to a Capture Queue. An LCR is a message with a specific format that describes a database change Propagation: Streams propagation propagates the staged LCR to another queue residing in the destination database where apply will occur. Apply: Once the LCR has reached the destination database, a Streams apply process consumes the change by applying the LCR to the shared database object. Source: Oracle Streams Concepts and Administration
Source: Oracle® Database High Availability Overview 10 g  Release 2 (10.2)
Oracle Streams Demonstration
Prerequisites Database must be in archivelog mode archive log list; Undo_retention must be set to 86400 select name, value from v$parameter where name like '%global%'; alter system set global_names=TRUE scope=both; Global_name must be set to true select name, value from v$parameter where name like '%undo%'; alter system set undo_retention=86400 scope=both;
Global Names must be used for each database From each database: SQL> select * from global_name; GLOBAL_NAME (Source) -------------------------------------------------------------------------- RUNI.DOMAIN GLOBAL_NAME (Destination) -------------------------------------------------------------------------- TICKET.DOMAIN
Create streams administrator in both the source and destination database > CREATE USER strmadmin identified by streams default tablespace USERS temporary tablespace TEMP; >grant dba to strmadmin; >alter user strmadmin quota unlimited on USERS;
Configure streams administrator in both environments: BEGIN   DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE(   grantee => 'strmadmin',   grant_privileges => TRUE); END; / select * from dba_streams_administrator;
Create a database link from the source to destination and vice-versa On Source: create database link ticket.DOMAIN connect to strmadmin identified by streams using 'TICKET'; select * from streams_apply_qt@ticket.DOMAIN On Destination: create database link RUNI.DOMAIN connect to strmadmin identified by streams using 'RUNI'; select * from streams_apply_qt@RUNI.DOMAIN
Directories must be setup for export and import  ($ ls -al | grep exp_dir) In /home/oracle: [oracle]$ mkdir src_exp_dir [oracle]$ chmod 777 src_exp_dir [oracle]$ mkdir dst_exp_dir [oracle]$ chmod 777 dst_exp_dir On source as strmadmin user: ---------------------------- SQL> connect strmadmin/streams >create directory src_exp_dir as '/home/oracle/src_exp_dir'; On destination as strmadmin user: --------------------------------- SQL> connect strmadmin/streams >create directory dst_exp_dir as '/home/oracle/dst_exp_dir';
Begin Using Enterprise Manager
Log out of Enterprise Manager for the source database and log back into the source database as the strmadmin user
In Enterprise Manager, Click on the Maintenance Tab Source (Runi) / Destination (Ticket) Under Data Movement, click on the “Setup” link under Streams
Select:  Streams Global, Schema, Table and Subset Replication Wizard
Provide strmadmin for source/destination
For this demonstration, we will select “Schema Rule” Important: Go to next slide before hitting the “Next” button
Leave Processes to their default values Capture Propagate Apply Important: Go to next slide before hitting the “Next” button
Use flashlights to select directory objects These are the directories we created in our prerequisites Important: Go to next slide before hitting the “Next” button
Choose to propagate DDL Capturing DDL changes will apply structural changes to tables and indexes to the destination database. If you create a new table, it will be created in the destination database as well. Click the “Next” button in the Wizard
Include the Schema “SCOTT” by using the flashlight or typing in directly. Click on the “Exclude Tables” Button at the bottom of the page.  Proceed to next slide
Use the Flashlight to exclude the table “Bonus” in the Scott/Tiger schema
Review the replication settings that you have made.
Streams Rules Selecting the Scott/Tiger schema to replicate was a  positive  rule Choosing to not replicate the BONUS table from the Scott/Tiger schema was a  negative  rule.
You need to submit the job in order for the replication to take place. Make sure that you provide the host credentials prior to submitting the job.  This is the Oracle account that you authenticate to the database server as.
We are now Streaming! In the source database, execute the following: SQL> CREATE TABLE SCOTT.streams_demo ( demo_pk  NUMBER, demo  NUMBER ); SQL> ALTER TABLE SCOTT.STREAMS_DEMO ADD ( CONSTRAINT STREAMS_DEMO_PK PRIMARY KEY (demo_pk)); SQL> insert into scott.streams_demo values (5,5); SQL> insert into scott.bonus values ('demo','teacher',200, 10); SQL> commit; Verify the table and record is showing up in the streams_demo destination database but not the bonus table (Negative Rule).
Let’s Break Streams On destination database, execute the following: SQL> update scott.streams_demo set demo = 6; SQL> commit; On the source database, execute the following: SQL> update scott.streams_demo set demo = 7 where demo=5; SQL> commit;
On the destination database In Enterprise Manager, Click on the Maintenance Tab Destination (Ticket) Under Data Movement, click on the “Management” link under Streams
We can see that the Apply process is having errors. Click on the “Apply” link to look into it
We can see that the Apply process has a status of “ABORTED” Click on the “Errors” button to look into the problem.
Click on the icon for “View Error LCRs” The operation failed on an update. Click on the “Compare Value” button.   We can see what changed and what the different values are
Let’s correct the record in the destination database: SQL> update scott.streams_demo set demo = 7 where demo_pk = 5; SQL> commit; Select the record and click on the “DELETE” button In the Source database, insert a new record SQL> insert into scott.streams_demo values (8,8); SQL> commit;
Check the destination database for the new record. What happened? Why did it happen?
The Apply process is still aborted Click on the “Start” button to enable it Check the STREAMS_DEMO table on the destination database again. The record now shows up. It was saved in the queue until the apply process was enabled.
By Default, the streams apply process will stop all replication until the problem record(s) are cleaned up. If you want replication to continue even if there is a problem, click on the “Edit” button for the apply process…
…  and change the parameter DISABLE_ON_ERROR from “Y” to “N” and click “Apply”. In the previous scenario, the new record would have been  inserted, regardless of the previous error message, and the  apply process would not have been aborted.
Go back to the source database and click on the Streams “Management” link
Under the Caputure section, click on the link under the “Negative Rule Set” column Click on the “Create” button
Select “Table Rule” and both DML and DDL Changes
Enter Schema: SCOTT Table: STREAMS_DEMO Click on the “Go” button and “OK”
Under the Search Box, select Table for the Rule Type and click on the “Go” button We can see that there is now a negative DML rule and DDL rule for the BONUS and STREAMS_DEMO table.
Insert a new record into the STREAMS_DEMO table on the source database: SQL> insert into scott.streams_demo values (9,9); SQL> commit; As expected, the record does not get copied over.
Remove Streams From the Streams Dashboard, you can completely remove your streams environment by clicking on the “Remove Streams Configuration” link shown below.
Good to Know Streams Healthcheck Metalink Doc ID:   273674.1 Streams Configuration Report and Health Check Script  (Equivalent to AWR/Statspack report built to diagnose Streams issues). Error Logs not showing up in Enterprise Manager If you are having errors for the streams processes but the logs aren’t showing up in Enterprise Manager, log out of Enterprise Manager and log back in. Enterprise Manager doesn’t always show the latest logs unless you log out and back in. Sequences If you are setting up master to master replication, be sure sequences are even numbers on source and odd numbers on destination or vice-versa. Oracle Text The Oracle text index will break if using streams when it is refreshed. Manage the indexes locally.
Questions? Scott Baker Email:  [email_address] Linked In:  http://www.linkedin.com/in/scottbakerprofile This presentation can be viewed at: http://www.slideshare.net/scottb411

More Related Content

PPT
Oracle streams-step-by-step-ppt
PPT
Oracle Streams
PPTX
Oracle database 12c new features
PPTX
Sql Server 2008 New Programmability Features
PDF
241 Pdfsam
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
PDF
Oracle 21c: New Features and Enhancements of Data Pump & TTS
TXT
oracle dba
Oracle streams-step-by-step-ppt
Oracle Streams
Oracle database 12c new features
Sql Server 2008 New Programmability Features
241 Pdfsam
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Oracle 21c: New Features and Enhancements of Data Pump & TTS
oracle dba

What's hot (14)

ODP
Ldap Synchronization Connector @ 2011.RMLL
PDF
301 Pdfsam
DOC
Steps for upgrading the database to 10g release 2
DOCX
Enable archivelod mode in oracle rac12cR1 with asm location
PDF
Enteros StarWest 2012 - Database load testing
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PPT
7\9 SSIS 2008R2_Training - Script Task
PPTX
SQL Server 2012 Best Practices
PPTX
The fifth database - ISUG 101
PDF
quickguide-einnovator-8-spring-cloud
PPTX
How to think like the engine
PDF
PDF
TXT
Oracle11g notes
Ldap Synchronization Connector @ 2011.RMLL
301 Pdfsam
Steps for upgrading the database to 10g release 2
Enable archivelod mode in oracle rac12cR1 with asm location
Enteros StarWest 2012 - Database load testing
Oracle Database 12c - New Features for Developers and DBAs
7\9 SSIS 2008R2_Training - Script Task
SQL Server 2012 Best Practices
The fifth database - ISUG 101
quickguide-einnovator-8-spring-cloud
How to think like the engine
Oracle11g notes
Ad

Viewers also liked (20)

PDF
070613 Managing P6 Database Security Using RMC
PPTX
The database applications
PPTX
Managing Your Database Using Microsoft Outlook
PPT
Emerging DB Technologies
PPT
Emerging database technology multimedia database
PDF
Oracle Enterprise Manager 12c - OEM12c Presentation
PDF
Tutorial Instalisasi Oracle 10g dan Setting User
PPT
Intro oracle10gexpress
PPT
Intro to Application Express
PPTX
Step By Step How To Install Oracle XE
PPT
IBM Informix Database SQL Set operators and ANSI Hash Join
PDF
Oracle intro to designer abridged
PPTX
Sql server ___________ (advance sql)
PPT
Time-Based Blind SQL Injection using Heavy Queries
PPTX
Oracle database introduction
PPT
PPTX
T sql語法之 cte 20140214
PDF
C1 oracle's cloud computing strategy your strategy-your cloud_your choice
PDF
Latest trends in database management
PPT
Transaction
070613 Managing P6 Database Security Using RMC
The database applications
Managing Your Database Using Microsoft Outlook
Emerging DB Technologies
Emerging database technology multimedia database
Oracle Enterprise Manager 12c - OEM12c Presentation
Tutorial Instalisasi Oracle 10g dan Setting User
Intro oracle10gexpress
Intro to Application Express
Step By Step How To Install Oracle XE
IBM Informix Database SQL Set operators and ANSI Hash Join
Oracle intro to designer abridged
Sql server ___________ (advance sql)
Time-Based Blind SQL Injection using Heavy Queries
Oracle database introduction
T sql語法之 cte 20140214
C1 oracle's cloud computing strategy your strategy-your cloud_your choice
Latest trends in database management
Transaction
Ad

Similar to Managing Oracle Streams Using Enterprise Manager Grid Control (20)

PPTX
Admin High Availability
PPT
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
PDF
Presentation sql server to oracle a database migration roadmap
PDF
Oracle10g New Features I
PDF
Conquering Data Migration from Oracle to Postgres
 
PDF
Migrate database to Exadata using RMAN duplicate
DOC
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
PPT
All Change
PPT
SetFocus SQL Portfolio
PPTX
IDUG 2015 NA Data Movement Utilities final
PPT
5 backuprecoveryw imp
PDF
Delivering changes for applications and databases
PDF
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
PDF
59597874043496781074_2024_10_11_MigratingTheBeast.pdf
DOC
Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
PDF
It symposium 2011-ods821_data_replication_04-11-2011
PPTX
Oracle Database Administration backup and recovery
PPTX
Sql Stream Intro
Admin High Availability
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Presentation sql server to oracle a database migration roadmap
Oracle10g New Features I
Conquering Data Migration from Oracle to Postgres
 
Migrate database to Exadata using RMAN duplicate
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
All Change
SetFocus SQL Portfolio
IDUG 2015 NA Data Movement Utilities final
5 backuprecoveryw imp
Delivering changes for applications and databases
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
59597874043496781074_2024_10_11_MigratingTheBeast.pdf
Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
It symposium 2011-ods821_data_replication_04-11-2011
Oracle Database Administration backup and recovery
Sql Stream Intro

Recently uploaded (20)

PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Cloud computing and distributed systems.
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
A Presentation on Artificial Intelligence
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Monthly Chronicles - July 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Cloud computing and distributed systems.
CIFDAQ's Market Insight: SEC Turns Pro Crypto
A Presentation on Artificial Intelligence
Chapter 3 Spatial Domain Image Processing.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MYSQL Presentation for SQL database connectivity

Managing Oracle Streams Using Enterprise Manager Grid Control

  • 1. Managing Oracle Streams 10g Using Oracle Grid Control Scott R Baker 8/24/2009 This presentation can be viewed at: http://www.slideshare.net/scottb411
  • 2. Scott R Baker Fall 1999: - Graduated from the University of Central Florida with BS Management information Systems Fall 1999 – August 2005: Senior Support Engineer with Oracle Corporation (Orlando) 2002 – Oracle Certified DBA in 8i August 2005 - May 2009: Senior Oracle DBA; DBA Manager with Bonnier Corporation (Formerly World Publications) May 2009 - Present: Development Manager - (DBA / Quality Assurance / Support) with Bonnier Corporation
  • 3. Bonnier Corporation Bonnier Corporation is one of the largest consumer-publishing groups in America, and with nearly 50 special-interest magazines and related multimedia projects and events, it is the leading media company serving passionate, highly engaged audiences. With over 1,000 employees and more than $350 million in annual revenue, Bonnier Corp. ranks in the top 10 nationally among publishing companies. Headquarters are in Winter Park, FL http://www.bonniercorp.com
  • 4. Bonnier Corporation’s Use of Oracle Streams Bonnier Corporation’s use of Oracle Streams was featured in Oracle Magazine in June 2008: http://www.oracle.com/technology/oramag/oracle/08-jul/o48linuxsupport.html In December 2008, Oracle released a case study of our use of Oracle Streams at Bonnier: http://www.oracle.com/technology/deploy/availability/pdf/bonnier_casestudy.pdf
  • 5. Bonnier Corporation’s Use of Oracle Streams
  • 7. Streams Replication Logical Replication vs Physical Replication Streams is logical-based replication Rule-Based Replication Positive Rules of Replication What do you want to replicate? Negative Rules of Replication What don’t you want to replicate? Streams Administrator Streams environment self-contained within it’s own schema and administrator
  • 8. Streams Replication Processes: Capture: A Streams capture process mines redo logs to create one or more logical change records (LCRs) and queues them to a Capture Queue. An LCR is a message with a specific format that describes a database change Propagation: Streams propagation propagates the staged LCR to another queue residing in the destination database where apply will occur. Apply: Once the LCR has reached the destination database, a Streams apply process consumes the change by applying the LCR to the shared database object. Source: Oracle Streams Concepts and Administration
  • 9. Source: Oracle® Database High Availability Overview 10 g Release 2 (10.2)
  • 11. Prerequisites Database must be in archivelog mode archive log list; Undo_retention must be set to 86400 select name, value from v$parameter where name like '%global%'; alter system set global_names=TRUE scope=both; Global_name must be set to true select name, value from v$parameter where name like '%undo%'; alter system set undo_retention=86400 scope=both;
  • 12. Global Names must be used for each database From each database: SQL> select * from global_name; GLOBAL_NAME (Source) -------------------------------------------------------------------------- RUNI.DOMAIN GLOBAL_NAME (Destination) -------------------------------------------------------------------------- TICKET.DOMAIN
  • 13. Create streams administrator in both the source and destination database > CREATE USER strmadmin identified by streams default tablespace USERS temporary tablespace TEMP; >grant dba to strmadmin; >alter user strmadmin quota unlimited on USERS;
  • 14. Configure streams administrator in both environments: BEGIN DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE( grantee => 'strmadmin', grant_privileges => TRUE); END; / select * from dba_streams_administrator;
  • 15. Create a database link from the source to destination and vice-versa On Source: create database link ticket.DOMAIN connect to strmadmin identified by streams using 'TICKET'; select * from streams_apply_qt@ticket.DOMAIN On Destination: create database link RUNI.DOMAIN connect to strmadmin identified by streams using 'RUNI'; select * from streams_apply_qt@RUNI.DOMAIN
  • 16. Directories must be setup for export and import ($ ls -al | grep exp_dir) In /home/oracle: [oracle]$ mkdir src_exp_dir [oracle]$ chmod 777 src_exp_dir [oracle]$ mkdir dst_exp_dir [oracle]$ chmod 777 dst_exp_dir On source as strmadmin user: ---------------------------- SQL> connect strmadmin/streams >create directory src_exp_dir as '/home/oracle/src_exp_dir'; On destination as strmadmin user: --------------------------------- SQL> connect strmadmin/streams >create directory dst_exp_dir as '/home/oracle/dst_exp_dir';
  • 18. Log out of Enterprise Manager for the source database and log back into the source database as the strmadmin user
  • 19. In Enterprise Manager, Click on the Maintenance Tab Source (Runi) / Destination (Ticket) Under Data Movement, click on the “Setup” link under Streams
  • 20. Select: Streams Global, Schema, Table and Subset Replication Wizard
  • 21. Provide strmadmin for source/destination
  • 22. For this demonstration, we will select “Schema Rule” Important: Go to next slide before hitting the “Next” button
  • 23. Leave Processes to their default values Capture Propagate Apply Important: Go to next slide before hitting the “Next” button
  • 24. Use flashlights to select directory objects These are the directories we created in our prerequisites Important: Go to next slide before hitting the “Next” button
  • 25. Choose to propagate DDL Capturing DDL changes will apply structural changes to tables and indexes to the destination database. If you create a new table, it will be created in the destination database as well. Click the “Next” button in the Wizard
  • 26. Include the Schema “SCOTT” by using the flashlight or typing in directly. Click on the “Exclude Tables” Button at the bottom of the page. Proceed to next slide
  • 27. Use the Flashlight to exclude the table “Bonus” in the Scott/Tiger schema
  • 28. Review the replication settings that you have made.
  • 29. Streams Rules Selecting the Scott/Tiger schema to replicate was a positive rule Choosing to not replicate the BONUS table from the Scott/Tiger schema was a negative rule.
  • 30. You need to submit the job in order for the replication to take place. Make sure that you provide the host credentials prior to submitting the job. This is the Oracle account that you authenticate to the database server as.
  • 31. We are now Streaming! In the source database, execute the following: SQL> CREATE TABLE SCOTT.streams_demo ( demo_pk NUMBER, demo NUMBER ); SQL> ALTER TABLE SCOTT.STREAMS_DEMO ADD ( CONSTRAINT STREAMS_DEMO_PK PRIMARY KEY (demo_pk)); SQL> insert into scott.streams_demo values (5,5); SQL> insert into scott.bonus values ('demo','teacher',200, 10); SQL> commit; Verify the table and record is showing up in the streams_demo destination database but not the bonus table (Negative Rule).
  • 32. Let’s Break Streams On destination database, execute the following: SQL> update scott.streams_demo set demo = 6; SQL> commit; On the source database, execute the following: SQL> update scott.streams_demo set demo = 7 where demo=5; SQL> commit;
  • 33. On the destination database In Enterprise Manager, Click on the Maintenance Tab Destination (Ticket) Under Data Movement, click on the “Management” link under Streams
  • 34. We can see that the Apply process is having errors. Click on the “Apply” link to look into it
  • 35. We can see that the Apply process has a status of “ABORTED” Click on the “Errors” button to look into the problem.
  • 36. Click on the icon for “View Error LCRs” The operation failed on an update. Click on the “Compare Value” button. We can see what changed and what the different values are
  • 37. Let’s correct the record in the destination database: SQL> update scott.streams_demo set demo = 7 where demo_pk = 5; SQL> commit; Select the record and click on the “DELETE” button In the Source database, insert a new record SQL> insert into scott.streams_demo values (8,8); SQL> commit;
  • 38. Check the destination database for the new record. What happened? Why did it happen?
  • 39. The Apply process is still aborted Click on the “Start” button to enable it Check the STREAMS_DEMO table on the destination database again. The record now shows up. It was saved in the queue until the apply process was enabled.
  • 40. By Default, the streams apply process will stop all replication until the problem record(s) are cleaned up. If you want replication to continue even if there is a problem, click on the “Edit” button for the apply process…
  • 41. … and change the parameter DISABLE_ON_ERROR from “Y” to “N” and click “Apply”. In the previous scenario, the new record would have been inserted, regardless of the previous error message, and the apply process would not have been aborted.
  • 42. Go back to the source database and click on the Streams “Management” link
  • 43. Under the Caputure section, click on the link under the “Negative Rule Set” column Click on the “Create” button
  • 44. Select “Table Rule” and both DML and DDL Changes
  • 45. Enter Schema: SCOTT Table: STREAMS_DEMO Click on the “Go” button and “OK”
  • 46. Under the Search Box, select Table for the Rule Type and click on the “Go” button We can see that there is now a negative DML rule and DDL rule for the BONUS and STREAMS_DEMO table.
  • 47. Insert a new record into the STREAMS_DEMO table on the source database: SQL> insert into scott.streams_demo values (9,9); SQL> commit; As expected, the record does not get copied over.
  • 48. Remove Streams From the Streams Dashboard, you can completely remove your streams environment by clicking on the “Remove Streams Configuration” link shown below.
  • 49. Good to Know Streams Healthcheck Metalink Doc ID: 273674.1 Streams Configuration Report and Health Check Script (Equivalent to AWR/Statspack report built to diagnose Streams issues). Error Logs not showing up in Enterprise Manager If you are having errors for the streams processes but the logs aren’t showing up in Enterprise Manager, log out of Enterprise Manager and log back in. Enterprise Manager doesn’t always show the latest logs unless you log out and back in. Sequences If you are setting up master to master replication, be sure sequences are even numbers on source and odd numbers on destination or vice-versa. Oracle Text The Oracle text index will break if using streams when it is refreshed. Manage the indexes locally.
  • 50. Questions? Scott Baker Email: [email_address] Linked In: http://www.linkedin.com/in/scottbakerprofile This presentation can be viewed at: http://www.slideshare.net/scottb411