20 Copyright © 2006, Oracle. All rights reserved. Best Practices and Operational Considerations.

Slides:



Advertisements
Similar presentations
17 Copyright © 2005, Oracle. All rights reserved. Performing Flashback.
Advertisements

Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 8 Application Data Auditing.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 8 Application Data Auditing.
Oracle Architecture. Instances and Databases (1/2)
High Availability Group 08: Võ Đức Vĩnh Nguyễn Quang Vũ
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Backup and Recovery Part 1.
Chapter 12 Performing Incomplete Recovery. Background Viewed as one of the more difficult chapters to write Thought it was important to put in material.
Oracle9i Database Administrator: Implementation and Administration
Introduction to Oracle Backup and Recovery
Adapted from Afyouni, Database Security and Auditing Database Application Auditing – Ch. 8.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
7 Copyright © 2006, Oracle. All rights reserved. Dealing with Database Corruption.
1 © 2006 Julian Dyke Streams Julian Dyke Independent Consultant juliandyke.com Web Version.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
1 Oracle Database 11g – Flashback Data Archive. 2 Data History and Retention Data retention and change control requirements are growing Regulatory oversight.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Triggers A Quick Reference and Summary BIT 275. Triggers SQL code permits you to access only one table for an INSERT, UPDATE, or DELETE statement. The.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
7 Copyright © 2004, Oracle. All rights reserved. Recovering from Noncritical Losses.
6 Copyright © 2006, Oracle. All rights reserved. Flashback.
Week 3 Lecture 1 The Redo Log Files and Diagnostic Files.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
Page 1. Data Integration Using Oracle Streams A Case Study Session #:
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
D Copyright © Oracle Corporation, All rights reserved. Loading Data into a Database.
10 Copyright © 2004, Oracle. All rights reserved. Recovering from User Errors.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
13 Copyright © Oracle Corporation, All rights reserved. Maintaining Data Integrity.
CERN IT Department CH-1211 Genève 23 Switzerland t Streams Service Review Distributed Database Workshop CERN, 27 th November 2009 Eva Dafonte.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
HyperKVS Group Meeting Oracle Streams Dr. Volker Kuhr.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
C Copyright © 2007, Oracle. All rights reserved. Security New Features.
14 Copyright © 2004, Oracle. All rights reserved. Using Materialized Views.
C Copyright © 2006, Oracle. All rights reserved. Integrating with Oracle Streams.
8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
6 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
Copyright  Oracle Corporation, All rights reserved. 3 Oracle Backup and Recovery Configuration.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
23 Copyright © 2004, Oracle. All rights reserved. Preferring the Past: Flashback.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
Managing Privileges.
STREAMS failover and resynchronization
Oracle9i Database Administrator: Implementation and Administration
Index Index.
Managing Privileges.
Performing Database Recovery
Chapter 5 The Redo Log Files.
Presentation transcript:

20 Copyright © 2006, Oracle. All rights reserved. Best Practices and Operational Considerations

Copyright © 2006, Oracle. All rights reserved Objectives After completing this lesson, you should be able to do the following: Identify key operational tasks for maintaining your Streams environment Describe backup and recovery issues for a Streams environment Use triggers in a Streams environment Describe interoperability issues with Streams between Oracle9 i Database and Oracle Database 10g Implement best practices for configuring your Streams environment

Copyright © 2006, Oracle. All rights reserved Capture Process SCN Values Cnnn Instance SGA Java pool Large pool Shared pool Data dictionary cache Library cache Streams pool First SCN Start SCN

Copyright © 2006, Oracle. All rights reserved Capture Process SCN Values *** NOTES

Copyright © 2006, Oracle. All rights reserved Capture Process Checkpoints CAPTURE First SCN Required checkpoint SCN Maximum checkpoint SCN

Copyright © 2006, Oracle. All rights reserved Checkpoint *** NOTES

Copyright © 2006, Oracle. All rights reserved Best Practices for Configuring Streams Use separate staging queues for: –Each capture process –Each apply process Configure a Streams pool for more efficient memory usage. Periodically change the first_scn for capture to a higher value. Protect your data. Use the DBMS_STREAMS_AUTH package to manage Streams administrator privileges.

Copyright © 2006, Oracle. All rights reserved *** Notes on Configuring Streams

Copyright © 2006, Oracle. All rights reserved Archive Logging Archiving must be enabled at all source sites. A source site requires extra disk space for: –Supplemental logging –Retention of archived redo logs The following redo log files must be available to the capture process: –All logs containing redo records for an SCN greater than or equal to the required checkpoint SCN –All logs containing redo records for an SCN greater than or equal to the first SCN when starting a new capture process

Copyright © 2006, Oracle. All rights reserved *** Notes Archive Logging

Copyright © 2006, Oracle. All rights reserved Sharing LogMiner Data Dictionaries C001 Instance SGA LogMiner data dictionary Streams pool BUILD for C001 C002 LogMiner data dictionary BUILD for C002

Copyright © 2006, Oracle. All rights reserved Sharing LogMiner Data Dictionaries *** NOTES

Copyright © 2006, Oracle. All rights reserved Purging the LogMiner Data Dictionary Capture uses a LogMiner data dictionary. When you reset the first SCN value for an existing capture process, the Oracle Database automatically purges LogMiner checkpoint information prior to the new first SCN setting from the LogMiner data dictionary. First SCN Start SCN Required checkpoint SCN Applied SCN

Copyright © 2006, Oracle. All rights reserved *** Notes Purging Dictionary

Copyright © 2006, Oracle. All rights reserved Best Practices for Captured Events Do not rename the source database after a capture process has started capturing changes. Each table for which changes are applied by an apply process should have a primary key. Each column that you specify as a substitute key column should be a NOT NULL column and should be indexed. Do not permit updates to the primary key or substitute key columns.

Copyright © 2006, Oracle. All rights reserved Source Queue Growth There are two common reasons for source queue growth: An event cannot be propagated to a specified destination queue. One or more destination databases acknowledge successful propagation of events much more slowly than the other databases. User-enqueued events are not being dequeued.

Copyright © 2006, Oracle. All rights reserved NOLOGGING Operations NOLOGGING or UNRECOVERABLE operations do not write to the redo logs and thus cannot be captured. FORCE LOGGING prevents database changes from being missed by Streams. To override NOLOGGING operations: – STARTUP MOUNT – ALTER DATABASE FORCE LOGGING OR ALTER TABLESPACE FORCE LOGGING FORCE LOGGING must be configured again after you re-create the control file.

Copyright © 2006, Oracle. All rights reserved Clock Synchronization Ensure that system clocks are synchronized so that conflict resolution is handled correctly when multiple sites have the ability to update the same data. Alternatively, use TIMESTAMP WITH TIME ZONE data type for the time-based column when configuring conflict resolution based on the latest time.

Copyright © 2006, Oracle. All rights reserved Integrating Triggers with Streams Application of row LCRs to a shared table causes triggers that are defined on the table to fire. The SET_TRIGGER_FIRING_PROPERTY procedure in the DBMS_DDL package controls how a trigger is fired. A setting of “fire once” means not to fire for: –Data changes performed via apply process –Execution of one or more apply errors Default value is fire once for DML and DDL triggers.

Copyright © 2006, Oracle. All rights reserved SET_FIRING_PROPERTY Procedure Example: Configure a trigger to fire for both local changes and changes generated by the apply process. DBMS_DDL.SET_TRIGGER_FIRING_PROPERTY trig_owner IN VARCHAR2, trig_name IN VARCHAR2, fire_once IN BOOLEAN); EXEC DBMS_DDL.SET_TRIGGER_FIRING_PROPERTY ( - 'HR', 'UPDATE_JOB_HISTORY', FALSE);

Copyright © 2006, Oracle. All rights reserved Firing Property of Triggers You can check the firing property of a trigger by using the IS_TRIGGER_FIRE_ONCE function in the DBMS_DDL package. DECLARE res BOOLEAN; BEGIN res := DBMS_DDL.IS_TRIGGER_FIRE_ONCE( 'HR', 'UPDATE_JOB_HISTORY'); IF res THEN DBMS_OUTPUT.PUT_LINE('Fire once? YES'); ELSE DBMS_OUTPUT.PUT_LINE('Fire once? NO'); END IF; END;

Copyright © 2006, Oracle. All rights reserved Best Practices for Rules Use simple rules. Do not use empty rule sets. Manage rules efficiently. Create rules so that only one rule in a positive rule set can evaluate to TRUE for any given condition. Set include_tagged_lcr to TRUE for negative rules. Specify a source database for propagation rules. Subset rules: –Place subset rules in positive rule sets only. –Use them for only those tables that are true data subsets of the source table.

Copyright © 2006, Oracle. All rights reserved Best Practices for Rules *** Notes

Copyright © 2006, Oracle. All rights reserved Replicating DDL LCRs 1.Explicitly grant privileges to the apply user. 2.Filter out certain DDL operations at destination sites. 3.Set the instantiation SCN at the schema or global level at each destination site.

Copyright © 2006, Oracle. All rights reserved Best Practices for Performing Backups of Your Streams Environment For user-managed online backups: –Use Non-NULL Streams tags –Force checkpoints Protect and retain the archived logs. Use COMMIT_SERIALIZATION of FULL for apply. Implement a “heartbeat” table.

Copyright © 2006, Oracle. All rights reserved *** Notes

Copyright © 2006, Oracle. All rights reserved Point-in-Time Recovery Issues After performing a complete recovery, check that all Streams processes are enabled and started. To resynchronize a source database in a bidirectional Streams environment, you can: –Verify that the destination database has applied all of the changes sent from the source database needing recovery –Remove the Streams configuration from the source database –At the destination database, drop the apply process that applies changes from the source database undergoing recovery –Follow the steps for adding a new source database to an existing Streams environment

Copyright © 2006, Oracle. All rights reserved *** Notes

Copyright © 2006, Oracle. All rights reserved Point-in-Time Recovery with Streams SITE2.NET Start SCN Applied SCN SITE1.NET PITR SCN SITE2.NET Apply progress Capture progress

Copyright © 2006, Oracle. All rights reserved Recovering a Destination Database After PITR Two methods of recapturing changes: Reset the START_SCN for capture at the source site and resend the missing changes. Create a new capture process with a specific START_SCN, a new propagation at the source site, and an apply process at the recovered site. Recovered site Existing source site Job A002 C001 C002 A001 Job

Copyright © 2006, Oracle. All rights reserved *** Notes

Copyright © 2006, Oracle. All rights reserved Recovering a Single-Source Database After PITR C002 C001 A001 Job Recovered to SCN 9462 Greatest applied SCN 9516 DBMS_CAPTURE_ADM.BUILD A

Copyright © 2006, Oracle. All rights reserved Recovering a Source Database in a Multiple-Source Environment After PITR C002 C001 A001Job Recovered to SCN 9462 Greatest applied SCN 9516 C001Job A001 Job

Copyright © 2006, Oracle. All rights reserved *** Notes

Copyright © 2006, Oracle. All rights reserved Upgrading Streams to Oracle Database 10g If you want to upgrade an Oracle9 i Release 2 Streams environment, do the following: Reconfigure database initialization parameters. Grant DBA role to the Streams administrator. Update enqueuing procedures if necessary. Query the DBA_STREAMS_NEWLY_SUPPORTED and DBA_STREAMS_UNSUPPORTED views. Revisit complex rules. Rewrite them to use negative rules or and_condition (if possible).

Copyright © 2006, Oracle. All rights reserved *** Notes

Copyright © 2006, Oracle. All rights reserved Configuring Streams to Operate Between Different Versions If you want to include both an Oracle9 i Database Release 2 site and an Oracle Database 10g site in your Streams environment, note the following: Capabilities at each site depend on the limitations of the earlier release. If the Oracle9 i Database Release 2 site is to be a source site, you must configure flow control. A downstream capture process cannot be created on an Oracle9 i Database Release 2 site.

Copyright © 2006, Oracle. All rights reserved *** Notes

Copyright © 2006, Oracle. All rights reserved Summary In this lesson, you should have learned how to: Identify key operational tasks for maintaining your Streams environment Describe backup and recovery issues for a Streams environment Use triggers in a Streams environment Describe interoperability issues with Streams between Oracle9 i Database and Oracle Database 10g Implement best practices for configuring your Streams environment

Copyright © 2006, Oracle. All rights reserved