Troubleshooting Streams Chen Shapira .

28
Troubleshooting Streams Chen Shapira http:// prodlife.wordpress.com
  • date post

    15-Jan-2016
  • Category

    Documents

  • view

    220
  • download

    0

Transcript of Troubleshooting Streams Chen Shapira .

Page 1: Troubleshooting Streams Chen Shapira .

Troubleshooting Streams

Chen Shapirahttp://prodlife.wordpress.com

Page 2: Troubleshooting Streams Chen Shapira .

B.Sc. in CS and StatisticsOCP10 years of production IT experienceOracle Ace

Five successful Streams implementations last year.

Page 3: Troubleshooting Streams Chen Shapira .

Goal:

Prevent the “Streams not working – HELP”

syndrome

Page 4: Troubleshooting Streams Chen Shapira .

Streams not working – Help!

Page 5: Troubleshooting Streams Chen Shapira .

Action Plan1. Understand the architecture <- Start here2. Design3. Configure <- That’s easy! 4. Monitoring5. Troubleshooting <- If we designed right,

that’s easy too!

Page 6: Troubleshooting Streams Chen Shapira .

• Redo from SRC• To LCRs• Using rules

Capture

Page 7: Troubleshooting Streams Chen Shapira .

Understand the Architecture

1.Read the documentation

2.Implement 2-5 variations

3.Hide (Oracle University OR offsite)

4.Look for bugs

Page 8: Troubleshooting Streams Chen Shapira .

DesignProactive Troubleshooting

Page 9: Troubleshooting Streams Chen Shapira .

Begin with the end in mind

Business goals should

drive your design

Page 10: Troubleshooting Streams Chen Shapira .

• Reporting database• ETL for Data Warehouse• Gold-Standard-DB for developers• Migration/Upgrade• High Availability• Event Notification

Page 11: Troubleshooting Streams Chen Shapira .

Constraints and Limitations will

drive your design

IT is a Business

Page 12: Troubleshooting Streams Chen Shapira .

• Impact on production• Type of Workload• Disk space• SLA• Replication Lag

Page 13: Troubleshooting Streams Chen Shapira .

Configuration is Easy

Page 14: Troubleshooting Streams Chen Shapira .

Just run few scripts!

•DBMS_STREAMS_ADM.SETUP_QUEUE•DBMS_CAPTURE•DBMS_STREAMS_ADM.ADD_*_RULES•DBMS_APPLY

Page 15: Troubleshooting Streams Chen Shapira .

Or even fewer scripts

• DBMS_STREAMS_ADM.MAINTAIN_*• Grid Control 10.2.0.5 <- 100% Non-scary GUI!

Page 16: Troubleshooting Streams Chen Shapira .

Few extra tips

• Use a script you understand• 10.2.0.4 or 11g• Expect more redo• We don’t use archive logs• Error Handler• Logminer Purging

Page 17: Troubleshooting Streams Chen Shapira .

The Show Must Go On

Page 18: Troubleshooting Streams Chen Shapira .

Monitor:

• Processes• Latency• Errors• Heartbeat monitor

Page 19: Troubleshooting Streams Chen Shapira .

HeartBeat Monitor

It is worth it. Trust me.

Page 20: Troubleshooting Streams Chen Shapira .

Streams is not working!HELP!

Page 21: Troubleshooting Streams Chen Shapira .

“If we knew what we were doing, it would not be called research,

would it?“

Attributed to Albert Einstein

Page 22: Troubleshooting Streams Chen Shapira .

Scientific Troubleshooting

• Define the problem• Gather facts <- I’ll talk mostly about this• Possible causes• Action plan• Problem solved?• Document!

Page 23: Troubleshooting Streams Chen Shapira .

Wrong approach:

Going over a list of things that sometimes go wrong, one by one.

Page 24: Troubleshooting Streams Chen Shapira .

Check the Alert Log

No need to explain this one

Page 25: Troubleshooting Streams Chen Shapira .

These are a few of my favorite V$

• DBA_CAPTURE• V$STREAMS_CAPTURE• DBA_APPLY_ERROR• DBA_REGISTERED_ARCHIVED_LOG• DBA_RULE_SETS, DBA_RULES,

DBA_RULE_SET_RULES

Page 26: Troubleshooting Streams Chen Shapira .

Apply Errors

• DBA_APPLY_ERRORS• Primary key• Instantiation SCN• Conflicts

Page 27: Troubleshooting Streams Chen Shapira .

Tuning Advice

• Slow rules (using “like” and “in”)• Multiple Apply Processes• Asynchronous commit• White paper by MAA

Page 28: Troubleshooting Streams Chen Shapira .

Questions?