forward recovery of an oracle database using enhanced remote mirroring on ds4000 and ds5000

Upload: madan-mohan-nimmagadda

Post on 05-Apr-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    1/24

    Forward Recovery of an Oracle Database

    Using Enhanced Remote Mirroring on

    DS4000 and DS5000

    Technical White Paper40559-00 Rev AMay 2009

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    2/24

    Copyright 2009 by International Business Machines Corporation. All rights reserved.

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    3/24

    Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring iiiCopyright 2009, IBM Corporation

    Contents

    FORWARD RECOVERYOFAN ORACLE DATABASE USING ENHANCED REMOTE MIRRORINGONDS4000 AND DS5000

    Benefits of Using This Method........................................................................................................................ 2

    Setting Up the System Environment............................................................................................................ 2

    Technical Specifications ............................................................................................................................. 3

    Operating System Information ......................................................................................................... 3

    Oracle Information ................................................................................................................................ 3

    Storage Information ............................................................................................................................. 3

    Logical Drive Configuration ............................................................................................................... 4

    Reference Architecture ............................................................................................................................... 5

    Logical Drive Configuration ...................................................................................................................... 7

    Setting Up the Premium Features................................................................................................................. 7

    Enabling a Premium Feature .................................................................................................................... 7

    Setting Up Enhanced Remote Mirroring .............................................................................................. 8

    Detailed Example Using This Method.......................................................................................................... 8

    Setting Up the Servers................................................................................................................................. 9

    Preparing the Source Database ............................................................................................................... 9

    Preparing the Target..................................................................................................................................11

    Keep This Document Handy..........................................................................................................................16

    Contact Information.........................................................................................................................................17

    Appendix A: References..................................................................................................................................18

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    4/24

    iv Forward Recovery of an Oracle Database Using Enhanced Remote MirroringCopyright 2009, IBM Corporation

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    5/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    6/24

    Benefits of Using This Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    2 Forward Recovery of an Oracle Database Using Enhanced Remote MirroringCopyright 2009, IBM Corporation

    Benefits of Using This Method

    When you use the Oracle Roll Forward Recovery process along with RM, you can createa copy of the database, and then clone it onto a different server. Then you can perform

    certain critical functions on the copy rather than on the production database. Using acopy for critical functions has several advantages:

    No disruption of the source production database

    Fewer staff resources

    Anytime duplication of the database

    Data replication for recovery of the production database

    The RM premium feature is an option for real-time replication of data that createscopies of the source logical drives on a second target storage subsystem. The secondstorage subsystem might reside within the same computing environment, or for

    disaster recovery purposes, might reside many miles away or even in a different state orcountry. A fully synchronized RM setup provides many ways to use the remote mirrorswithout disrupting the primary source logical drives. RM provides rapid recovery from adisaster or catastrophic failure of the primary site by using role reversals to promote thesecondary logical drives to a primary role. Hosts can then read and write to the newlypromoted logical drives and business operations can continue.

    By implementing the RM premium feature, the issue of restoring the data from disk ortape or restoring the whole source database to a point in time in the past is eliminated.RM lets you mirror the data to another set of logical drives, and then stop the mirroringprocess at any time. You can use these older mirrored logical drives to bring up a copyof the source database, and then restore the database on another server with no

    impact to the source database. After the recovery process is complete, you can useOracle Roll Forward Recovery to roll forward the data in either of the following ways:

    Retrieve the data from this cloned database and update the source database.

    Reverse the RM process and sync the source database disk drives from the cloneddatabase disk drives.

    Setting Up the System Environment

    Use the reference architectures as guidelines for setting up your own systemenvironment. The reference architectures serve as examples only. You can modify thesystem environment as necessary to suit your needs. There are two referencearchitectures:

    The DS4000 reference architecture consists of one primary sever and onesecondary server attached to two DS4000 controllers. See Figure 1 on page 5.

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    7/24

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Setting Up the System Environment

    Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring 3Copyright 2009, IBM Corporation

    The DS5000 reference architecture consists of one primary sever and onesecondary server attached to one DS5000 controller and one DS4000 controller.See Figure 2 on page 6.

    The reference architectures were developed for testing seven common scenarios that

    an Oracle Database administrator would regularly encounter. This document describesonly one of those scenarios. The other six scenarios are described in separatedocuments. Those documents are listed in Appendix A: References.

    The reference architectures use three premium featuresVolumeCopy, FlashCopy,and RMto test various backup and recovery methods and to test multipledevelopment and upgrade scenarios. The specific Oracle scenario described in thisdocument might not use all three premium features.

    Technical Specifications

    Here are the specifications for components of the reference architectures.

    Operating System Information

    Red Hat Enterprise Linux 5.1 Version 2.6.18-53.el5

    The RDAC driver is MPP Driver Version 99.03.C000.0005

    Oracle Information

    Oracle Database EE 10g Release 2 Version 10.2.0.3

    Oracle Database EE 11g Release 1 Version 11.1.0.6

    Storage Information

    DS4800

    Firmware Version 07.10.22.00

    NVSRAM Version N1815D48R1010V05

    DS5100

    Firmware version 07.30.22.00

    NVSRAM version N1818D51R1030V09

    IBM DS Storage Manager 10 Version 10.10.G5.11

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    8/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    9/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    10/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    11/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    12/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    13/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    14/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    15/24

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Detailed Example Using This Method

    Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring 11Copyright 2009, IBM Corporation

    SQL> drop table scott.tb1;

    Table dropped.

    SQL> drop table scott.tb2;

    Table dropped.

    8 Stop the RM process on the ASM diskgroupFRA1.

    Stopping RM on the ASM diskgroup lets the current archived log files roll forwardthe database from the mirroredDG1 disks. Make sure that synchronization iscomplete before you quiesce the database.

    SQL> alter system switch logfile;

    SQL> alter database begin backup;SQL> alter system quiesce restricted;SQL> select active_state from v$instance;

    ACTIVE_STATE----------------------QUIESCED

    9 From the IBM DS Storage Manager 10 GUI, right-click a LUN associated with the RMlogical drive FRA1, and then delete the RM links in the Remove MirrorRelationship window.

    10 Bring the source database back online.

    SQL> alter system unquiesce;SQL> alter database end backup;

    Database altered.

    Preparing the Target

    HOST2 is the target location where the source database, an instance of OracleDatabase 11g using Oracle ASM, and named pfdb1, will surface. Perform the followingsteps on HOST2.

    1 Map the target RM logical drive to HOST2, and then make the RM logical drivevisible to the operating system.

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    16/24

    Detailed Example Using This Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    12 Forward Recovery of an Oracle Database Using Enhanced Remote MirroringCopyright 2009, IBM Corporation

    a RunmppBusRescan to locate new devices.

    b Run SMdevices to make sure that the operating system can find the newdevices.

    c Make a mount point withmkdir /u01.

    d Mount the file system as /u01.

    2 Scan for ASM disks. Type the following command.

    /etc/init.d/oracleasm scandisks

    3 Start Oracle Cluster Services (OCS). Type the following command.

    localconfig reset $ORACLE_HOME

    4 If you have not already changed the environment settings to start the ASM instanceof Oracle Database 11g and the instance of Oracle Database 11g, named pfdb1,on HOST2, change the environment settings now.

    5 Because the database being recovered is using Oracle ASM, you must completethese two tasks before you start the recovery process.

    a Locate the archive log files in Oracle ASM. To locate the archive log files inOracle ASM, log in to ASMCMD, and then drill down to find the logs. In thefollowing example from the test case, the drill down located three archive logfiles in Oracle ASM.

    Export ORACLE_SID=+ASMAsmcmdASMCMD> cd +FRA1/PFDB1/ONLINELOG

    ASMCMD> ls -al

    b Reference these logs during the roll forward recovery process.

    The process of recovering the database begins.

    6 If you have not already done so, make the necessary environment settings to startthe database.

    Type Redund Striped Time Sys Name

    ONLINELOG UNPROT FINE APR1016:00:00 Y none => group_1.257.646402135

    ONLINELOG UNPROT FINE APR1016:00:00 Y none => group_2.258.646402141

    ONLINELOG UNPROT FINE APR1016:00:00 Y none => group_3.259.646402147

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    17/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    18/24

    Detailed Example Using This Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    14 Forward Recovery of an Oracle Database Using Enhanced Remote MirroringCopyright 2009, IBM Corporation

    SQL> show parameter control_files

    SQL> alter system set control_files ='+FRA1/pfdb1/controlfile/current.256.646402127' scope=spfile;

    System altered.

    SQL> shutdown abort

    ORACLE instance shut down.

    SQL> startup mount

    ORACLE instance started.Total System Global Area 1686925312 bytesFixed Size 2145024 bytesVariable Size 1207960832 bytesDatabase Buffers 469762048 bytesRedo Buffers 7057408 bytesDatabase mounted.

    The recover command begins the roll forward process. In the test case, the SCNsupplied the restore point. You also can use a date and time for the restore point, or,as a database administrator, you can CANCELwhen you observe that the process isat the right point.

    NAME TYPE VALUE

    control_files string

    +DG1/pfdb1/controlfile/current

    .260.646402127, +FRA1/pfdb1/controlfile/current.256.646402127

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    19/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    20/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    21/24

  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    22/24

    Appendix A: References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    18 Forward Recovery of an Oracle Database Using Enhanced Remote MirroringCopyright 2009, IBM Corporation

    Appendix A: References

    This document is one of seven detailed examples that explain how to completecommon but important tasks often required from an Oracle database administrator.

    Refer to the other documents as needed.

    Cloning an Oracle Database to the Same Server Using FlashCopy and VolumeCopy onDS3400, DS4000, and DS5000

    Cloning an Oracle Database Using Enhanced Remote Mirroring on DS4000 and DS5000

    Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on DS4000and DS5000

    Migrating to Oracle 11g Using Enhanced Remote Mirroring with TransportableTablespaces on DS4000 and DS5000

    Recovering from Catastrophic Failures Using Enhanced Remote Mirroring for Data

    Replication on DS4000 and DS5000

    Safely Upgrading an Oracle Database Using Enhanced Remote Mirroring on DS4000and DS5000

    Selective Restores Using Enhanced Remote Mirroring with Oracle Flashback Databaseon DS4000 and DS5000

    http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/
  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    23/24

    Trademarks and special notices

    Copyright IBM Corporation 2009. All rights reserved.

    References in this document to IBM products or services do not imply that IBM intends to make them

    available in every country.

    IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business

    Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked

    terms are marked on their first occurrence in this information with a trademark symbol ( or ), these

    symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information

    was published. Such trademarks may also be registered or common law trademarks in other countries. A

    current list of IBM trademarks is available on the Web at "Copyright and trademark information" atwww.ibm.com/legal/copytrade.shtml.

    Intel, Intel Inside (logos), MMX, and Pentium are trademarks of Intel Corporation in the United States,

    other countries, or both.

    UNIX is a registered trademark of The Open Group in the United States and other countries.

    Linux is a trademark of Linus Torvalds in the United States, other countries, or both.

    Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the

    United States, other countries, or both.

    Other company, product, or service names may be trademarks or service marks of others.

    Information is provided "AS IS" without warranty of any kind.

    All customer examples described are presented as illustrations of how those customers have used IBM

    products and the results they may have achieved. Actual environmental costs and performance

    characteristics may vary by customer.

    Information concerning non-IBM products was obtained from a supplier of these products, publishedannouncement material, or other publicly available sources and does not constitute an endorsement of

    such products by IBM. Sources for non-IBM list prices and performance numbers are taken from publicly

    available information, including vendor announcements and vendor worldwide homepages. IBM has

    not tested these products and cannot confirm the accuracy of performance, capability, or any other

    claims related to non-IBM products. Questions on the capability of non-IBM products should be

    addressed to the supplier of those products.

    Any references in this information to non-IBM Web sites are provided for convenience only and do not in

    any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of

    the materials for this IBM product and use of those Web sites is at your own risk.

    http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/http://www.ibm.com/
  • 8/2/2019 Forward Recovery of an Oracle Database Using Enhanced Remote Mirroring on Ds4000 and Ds5000

    24/24