1 Implementing Oracle Data Guard for the RLS database Kasia Pokorska CERN, IT-DB 30 th March 2004.

Slides:



Advertisements
Similar presentations
ITEC474 INTRODUCTION.
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
ITEC474 Control File Maintenance
High Availability Group 08: Võ Đức Vĩnh Nguyễn Quang Vũ
Oracle9i Data Guard Darl Kuhn Sun Microsystems
Deployment Agility Through Tier Testing Hanan Hit, NoCOUG President 2009.
Oracle Data Guard Ensuring Disaster Recovery for Enterprise Data
© 2015 Dbvisit Software Limited | dbvisit.com An Introduction to Dbvisit Standby.
1 Chapter 15 Duplicating Databases and Transporting Data.
Introduction to Data Guard NY SIG Meeting October 7th, 2003.
Chapter 9 Auditing Database Activities
Harvard University Oracle Database Administration Session 2 System Level.
EIM April 19, Robin Weaver 13 Years with IBM Prior to Assignment at UNC Charlotte Range of Database Development/Data Management Projects and Products.
Oracle Data Guard 11g Release 2 with Oracle Enterprise Manager 10g Grid Control
Oracle Database Instance Management Oracle 10g. Ebtisam Alabdulqader Outline Management Framework. Managing Oracle instance through the Enterprise Manager.
Database Backup and Recovery
RMAN Restore and Recovery
Backup and Recovery Part 1.
CHAPTER 5 Managing Control Files, Online Redo Logs, and Archiving.
Oracle9i Database Administrator: Implementation and Administration
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
Introduction to Oracle Backup and Recovery
Proven Techniques for Maximizing Availability Maximum Availability Architecture Lawrence To, Shari Yamaguchi High Availability Systems Group Systems Technologies.
1 Data Guard Basics Julian Dyke Independent Consultant Web Version - February 2008 juliandyke.com © 2008 Julian Dyke.
Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.
PPOUG, 05-OCT-01 Agenda RMAN Architecture Why Use RMAN? Implementation Decisions RMAN Oracle9i New Features.
High-Availability Methods Lesson 25. Skills Matrix.
Presentation #32050 Presentation #32050 Implementing Oracle9i Data Guard For Higher Availability By Daniel T. Liu First American Real Estate Solutions.
ORACLE 10g DATA GUARD BROKER Ritesh Chhajer Sr. Oracle DBA.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
ORACLE 10g DATAGUARD Ritesh Chhajer Sr. Oracle DBA.
Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.
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.
11g(R1/R2) Data guard Enhancements Suresh Gandhi
1 Data Guard. 2 Data Guard Reasons for Deployment  Site Failures  Power failure  Air conditioning failure  Flooding  Fire  Storm damage  Hurricane.
Week 3 Lecture 1 The Redo Log Files and Diagnostic Files.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
8 Copyright © Oracle Corporation, All rights reserved. Configuring the Database Archiving Mode.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Ashish Prabhu Douglas Utzig High Availability Systems Group Server Technologies Oracle Corporation.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
Configuring the Database Archiving Mode
Implementing Oracle9i Data Guard Michael New Senior Technical Consultant ThinkSpark Session id:
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
CERN IT Department CH-1211 Genève 23 Switzerland 1 Active Data Guard Svetozár Kapusta Distributed Database Operations Workshop November.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
Agenda Data Guard Architecture & Features
SETA Central 2006 Crashes Happen - Downtime Won't with Data Guard Stephen Rea Tuesday, October 10, :30 AM.
© Puget Sound Oracle Users Group Education Is Our Passion PSOUG Education Education Is Our Passion Hands-on Workshop Series Oracle DataGuard 10gR2.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace.
Oracle Standby Implementation Tantra Invedy. Standby Database Introduction Fail over Solution Disaster Recovery Solution if remote Ease of implementation.
 Database Administration Oracle Database Instance Management Starting Up and Shutting Down أ. ندى الغامدي, أ. ندى الطوالة.
Oracle 12c Data Guard – Far Sync and what’s new
Backup and Recovery.
Agenda Data Guard Architecture & Features
Configuring the Database Archiving Mode
Is 221: Database Administration
Maximum Availability Architecture Enterprise Technology Centre.
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Oracle9i Database Administrator: Implementation and Administration
Understanding the Oracle Data Guard Architecture
Recovering from Noncritical Losses
Performing Database Recovery
Chapter 5 The Redo Log Files.
Introduction.
Arkansas Banner Users Group (ABUG) 2006
Oracle Data Guard Broker Session-3
Presentation transcript:

1 Implementing Oracle Data Guard for the RLS database Kasia Pokorska CERN, IT-DB 30 th March 2004

2 Agenda A quick introduction to Data Guard concepts What choice for the RLS database? Data Guard implementation for RLS Tested Data Guard scenarios Data Guard monitoring Next steps Q&A

3 What is Oracle Data Guard? Oracle high availability, data protection, and disaster recovery solution for enterprise data Maintains up to nine standby databases as transactionally consistent copies of the production database If the production database (primary) becomes unavailable because of a planned or an unplanned outage, Data Guard can switch any standby database to the production role Feature of Oracle Database Enterprise Edition Prerequisites: the same edition of Oracle Enterprise Edition, the same operating system (but the release does not have to be the same), the same hardware architecture on the primary and standby locations

4 Data Guard Architecture Oracle Net FAL Primary Database Transactions Physical/Logical Standby Database Backup / Reports LGWR Online Redo Logs Archived Redo Logs ARCH RFS Standby Redo Logs Archived Redo Logs ARCH MRP/ LSP

5 Physical versus Logical Standby PhysicalLogical CharacteristicsA physically identical copy of the primary database on a block-for-block basis Contains the same logical information as the production database, although a physical organization and structure of the data can be different. Synchronization mechanism Redo ApplySQL Apply Read-only access Yes, but only in a exclusive mode (no redo apply at the same time) Can be queried for reports while logs are being applied via SQL Additional benefits - Can be used to offload backups - Redo apply is fastest and most efficient approach to apply changes - Can create additional indexes and materialized views for better query performance Limitations- Uses more resources than physical - Has some restrictions on datatypes, types of tables, DDL and DML

6 Data Guard Protection Modes Maximum Protection –Offers the highest level of data protection –Requires at least one physical standby database in the configuration –The standby redo logs have to be set up Maximum Availability –Provides the highest level of data protection without compromising the availability of the primary database –Switches to maximum performance mode if a fault prevents it from writing its redo stream to a remote standby redo log Maximum Performance –The default protection mode –Offers slightly less data protection on the primary database… –...however, provides the higher performance

7 Agenda A quick introduction to Data Guard concepts What choice for the RLS database? Data Guard implementation for the RLS Tested Data Guard scenarios Data Guard monitoring Next steps Q&A

8 How to Determine the Proper Data Guard Configuration for the RLS? Is data loss acceptable if the primary site fails?NO → physical standby + maximum protection/availability mode How much data loss is tolerated if a site is lost?NONE → physical standby + maximum protection/availability mode Is potential data loss between the production and the standby databases tolerated when a standby host or network connection is temporarily unavailable? NO → physical standby + maximum protection How far away will the disaster recovery site be from the primary site? What is the network bandwidth and latency between sites? If the network round trip time is greater than 10 milliseconds → physical standby + maximum performance for applications that can not tolerate a change in performance or response time How many standby databases will be configured?At the first time only one → physical standby + maximum availability + standby redo log

9 Agenda A quick introduction to Data Guard concepts What choice for the RLS database? Data Guard implementation for the RLS Tested Data Guard scenarios Data Guard monitoring Next steps Q&A

10 The RLS Testing Environment Two testbed nodes: the primary database on lxn4252 and one physical standby on the lxn4253 (Linux ia32, CPU servers) Oracle release Identical directory structure on both nodes The RLS database created and deployed with the last version of the schemas (2.2.5)

11 Data Guard Prerequisites for the RLS (1/2) 1. Implement FORCE LOGGING mode (PRI) SQL> SELECT FORCE_LOGGING FROM V$DATABASE; FOR --- NO SQL> ALTER DATABASE FORCE LOGGING; 2. Archiving is already enabled (PRI) SQL> ARCHIVE LOG LIST; Database log mode Archive Mode Automatic archival Enabled Archive destination /ORA/dbs02/oracle/admin/arch/ Oldest online log sequence 2 Next log sequence to archive 4 Current log sequence 4

12 3. …But a local archiving destination should be defined (PRI) Changes to initrls1.ora: -removed #rls1.log_archive_dest=/ORA/dbs02/oracle/admin/arch/ - and added rls1.log_archive_dest_1='LOCATION=/ORA/dbs02/oracle/admin/arch/ MANDATORY‘ 4. Set up other initialization parameters required for the data guard (PRI) - Already existing in initrls1.ora db_name=rls1 rls1.instance_name=rls1 -Added rls1.remote_archive_enable=true rls1.standby_file_management=auto Data Guard Prerequisites for the RLS (2/2)

13 Creating the Physical Standby for the RLS (1/6) 1. Identify the primary database datafiles (PRI) SQL> SELECT NAME FROM V$DATAFILE; NAME /ORA/dbs03/oradata/rls1/rls1_system_01.dbf /ORA/dbs03/oradata/rls1/rls1_undo_01.dbf /ORA/dbs03/oradata/rls1/rls1_data01_01.dbf /ORA/dbs03/oradata/rls1/rls1_INDX01_01.dbf … And the online redo logs: -rw-r oracle ci Mar 12 12:00 rls1_redo_01.log -rw-r oracle ci Mar 12 11:40 rls1_redo_02.log -rw-r oracle ci Mar 12 11:40 rls1_redo_03.log

14 2. Make a copy of the primary database (PRI) 3. Create a control file for the standby database (PRI) SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS 2 '/ORA/dbs03/oradata/rls1/rls1hs_control01'; 4. Copy files from the primary system to the standby system (PRI -> SEC) - backup datafiles - online redo logs - standby control file - all archived redo logs - initialization parameter file initrls1.ora Creating the Physical Standby for the RLS (2/6)

15 5. Set initialization parameters on a physical standby database (SEC) – in initrls1.ora control_files='/ORA/dbs03/oradata/rls1/rls1hs_control01‘ rls1.standby_archive_dest='/ORA/dbs02/oracle/admin/arch/‘ 6. Enable dead connection detection on the standby system (SEC + PRI) Create the file sqlnet.ora in $ORACLE_BASE/admin/network containing one line: SQLNET.EXPIRE_TIME=2 and add two simlinks in $ORACLE_BASE/product/rdbms /network/admin ln -s /ORA/dbs01/oracle/admin/network/sqlnet.ora sqlnet.ora in $ORACLE_BASE/admin/rls1/network ln -s /ORA/dbs01/oracle/admin/network/sqlnet.ora sqlnet.ora Creating the Physical Standby for the RLS (3/6)

16 7. Create Oracle Net Service name for the standby database - $ORACLE_BASE/admin/network/tnsnames.ora (PRI + SEC) rls1hs=(DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=lxn5243.cern.ch)(PORT=1521)) (CONNECT_DATA=(SID=rls1)) 8. Start the physical standby database (SEC) SQL> STARTUP NOMOUNT; SQL> alter database mount standby database; Creating the Physical Standby for the RLS (4/6)

17 9. Create standby redo log files (PRI + SEC) SQL>ALTER DATABASE ADD STANDBY LOGFILE GROUP 11 ('/ORA/dbs03/oradata/rls1/rls1_stdby_redo_01.log') size 100M; SQL>ALTER DATABASE ADD STANDBY LOGFILE GROUP 12 ('/ORA/dbs03/oradata/rls1/rls1_stdby_redo_02.log') size 100M; SQL>ALTER DATABASE ADD STANDBY LOGFILE GROUP 13 ('/ORA/dbs03/oradata/rls1/rls1_stdby_redo_03.log') size 100M; SQL>ALTER DATABASE ADD STANDBY LOGFILE GROUP 14 ('/ORA/dbs03/oradata/rls1/rls1_stdby_redo_04.log') size 100M; Creating the Physical Standby for the RLS (5/6)

Initiate Log Apply Services (SEC) SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; 11. Enable archiving to the physical standby database (PRI) SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=rls1hs LGWR SYNC=NOPARALLEL AFFIRM'; SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE ; Creating the Physical Standby for the RLS (6/6)

19 Setting the Data Protection Mode for the RLS database SQL> SELECT PROTECTION_MODE FROM V$DATABASE; SQL> shutdown immediate SQL> startup mount exclusive; SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE {PROTECTION | AVAILABILITY | PERFORMANCE} SQL> alter database open;

20 Agenda A quick introduction to Data Guard concepts What choice for the RLS database? Data Guard implementation for the RLS Tested Data Guard scenarios Data Guard monitoring Next steps Q&A

21 Managing the RLS database Starting Up the Physical Standby –for read-only access the static parameter audit_trail has to be set to „NONE” (currently equals to „DB”) the temporary tablespace has to be added on the standby database in order to sort a huge amount of data –for managed recovery operations Shutting down the physical standby –defer the archive log destination 2 and perform a log switch on the primary database (not possible in the maximum protection mode – the primary database have to be shut down first) Switching between the Read-Only Access and Managed-Recovery Mode

22 Role Management – Switchover –a role reversal between the primary database and one of its standby databases in case of planned maintenance of the primary system. Role Management – Failover –an irreversible transition of a standby database to the primary role. Done in the event of a catastrophic failure of the primary database –Consider if it would be faster to repair the primary database than to perform a role transition –Any archived redo log gaps have to be identified, resolved (if possible) and registered before performing the failover operation –The standby database has to be recreated from the primary Unexpected shutdown of the standby database - all the primary redo logs were shipped automatically to the standby while it become available Managing the RLS database

23 Agenda A quick introduction to Data Guard concepts What choice for the RLS database? Data Guard implementation for the RLS Tested Data Guard scenarios Data Guard monitoring Next steps Q&A

24 Verifying the Physical Standby Database (1/2) 1. Identify the existing archived redo logs (PRI + SEC) SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#; SEQUENCE# FIRST_TIM NEXT_TIME FEB FEB FEB FEB FEB FEB Archive the current log (PRI) SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;

25 3. Verify that the new archived redo log was received (SEC) SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#; SEQUENCE# FIRST_TIM NEXT_TIME FEB FEB FEB FEB FEB FEB FEB MAR Verify that the new archived redo log was applied (SEC) SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED _LOG ORDER BY SEQUENCE#; SEQUENCE# APP YES Verifying the Physical Standby Database (2/2)

26 Data Guard Monitoring Alert log in /ORA/dbs00/oracle/admin/rls1/bdump/alert_rls1.log Dynamic performance views – can be query in managed recovery mode –V$MANAGED_STANDBY – monitoring the log transport and apply activities –V$ARCHIVE_DEST_STATUS – determine on the primary the most recently archived redo log at the standby destination –V$ARCHIVE_DEST - confirm from the primary site that automatic archiving to the standby is working –V$LOG_HISTORY - viewing the whole archive log history –V$STANDBY_LOG - verifying that the standby redo log groups are created and running correctly Trace files are located in the directory specified by the USER_DUMP_DEST parameter /ORA/dbs00/oracle/admin/rls1/udump. –possibility to adjust the trace level

27 Agenda A quick introduction to Data Guard concepts What choice for the RLS database? Data Guard implementation for the RLS Tested Data Guard scenarios Data Guard monitoring Next steps Q&A

28 Stress testing in the pre-production RLS environment (April 2003) Evaluate the Data Guard performance Validate the Data Guard implementation itself If positive results, a first maximum performance Data Guard configuration can be in production at the end of April, followed by the maximum availability implementation mi-May

29 Evaluating Data Guard Broker Data Guard Broker is distributed management framework that –automates and centralizes the creation, maintenance, and monitoring of Data Guard configurations It offers also an easy-to-use interfaces: –Oracle9i Data Guard Manager, which is the Data Guard graphical user interface (GUI) integrated in the Oracle Enterprise Manager tool –Data Guard command-line interface (CLI)

30 Data Guard CLI Prerequisites: –requires the SPFILE and password file –the primary database and a standby database must already exist A Data Guard Broker Configuration was created and enabled Successful tests for –setting database properties Failure for –changing the configuration protection mode –performing a switchover

31 Oracle Data Guard and 10g Online redo apply to enforce data protection Rolling upgrade of Oracle database more ?