redefining data protection - dellsw.jp · • rman recovery catalog maintenance ... through an...

168
Redefining Data Protection APM Version 5.1 OAG-101-5.1-EN-01 01/30/08 Title Page User’s Guide for the NetVault:Backup APM for Oracle

Upload: ngothuy

Post on 22-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Redefining Data Protection

Title Page

User’s Guide

for theNetVault:Backup

APM for Oracle

APM Version 5.1 OAG-101-5.1-EN-01 01/30/08

Page 2: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

CopyrightsNetVault:Backup - User’s Guide for the NetVault:Backup APM for OracleSoftware Copyright © 2008 BakBone Software

Documentation Copyright © 2008 BakBone Software

This software product is copyrighted and all rights are reserved. The distribution and sale of this product are intended for the use of the original purchaser only per the terms of the License Agreement. All other product trademarks are the property of their respective owners.

The NetVault:Backup - User’s Guide for the NetVault:Backup APM for Oracle documentation is copyrighted and all rights are reserved.

This document may not, in whole or part, be copied, photocopied, reproduced, translated, reduced or transferred to any electronic medium or machine-readable form without prior consent in writing from BakBone Software.

THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED INTO NEW EDITIONS OF THE PUBLICATION. BAKBONE SOFTWARE MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.

BakBone Software9540 Towne Centre Drive, Suite 100 San Diego, California 92121 866.484.2663

Page 3: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

3

Section 1: Using the Oracle APM

Chapter 1: Introduction 11

• About the Oracle Application Plugin Module................................................................ 13- NetVault: Backup APM for Oracle at a Glance....................................................................... 13- Key Benefits ...................................................................................................................... 13- Feature Summary .............................................................................................................. 14- Target Audience ................................................................................................................ 15- Recommended Additional Reading ...................................................................................... 15

Chapter 2: Backup and Recovery Strategy 17

• Defining a Backup and Recovery Strategy ................................................................... 19- Available Backup Methods .................................................................................................. 19- Supported Oracle File Types ............................................................................................... 23- Defining an RMAN Backup Strategy..................................................................................... 24

Chapter 3: Installation 31

• Installing the Oracle APM ............................................................................................... 33- Pre-installation Requirements.............................................................................................. 33- Pre-requisites for RMAN Backups........................................................................................ 33- Recommended Configuration in a Single-Instance

Non-RAC Environment38- Installation Procedure ......................................................................................................... 39- Post-installation Requirements for RMAN Method ................................................................. 39- Removing the Oracle APM .................................................................................................. 41

Chapter 4: Configuration 43

• Configuring the Oracle APM........................................................................................... 45- Defining Default Backup Target Set for RMAN Backups ......................................................... 45- Configuring Default Attributes .............................................................................................. 46- Determining the Oracle SID and Home Directory in a Non-RAC Environment ........................... 51

Table of Contents

Page 4: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

4

- Adding a Database to the Oracle APM ................................................................................. 52

Chapter 5: Backup with the Oracle APM 63

• Backing Up Data with the Oracle APM .......................................................................... 65• Performing User Managed Backups .............................................................................. 65

- Phase 1: Selecting Data for a Backup .................................................................................. 65- Phase 2: Selecting Backup Options ..................................................................................... 67- Phase 3: Finalizing and Submitting the Job ........................................................................... 68

• Performing RMAN Backups ............................................................................................ 69- Phase 1: Selecting Data for a Backup .................................................................................. 69- Phase 2: Setting Backup Options......................................................................................... 71- Phase 3: Finalizing and Submitting the Job ........................................................................... 75

Chapter 6: Restore with the Oracle APM 79

• Restoring Data with the Oracle APM ............................................................................. 81• Restore and Recovery Overview.................................................................................... 81

- Understanding User Managed Recovery .............................................................................. 81- Understanding RMAN Recovery .......................................................................................... 85

• Performing User Managed Restores.............................................................................. 86- Phase 1: Preparing Database for Recovery .......................................................................... 86- Phase 2: Selecting Data for a Restore.................................................................................. 87- Phase 3: Finalizing and Submitting the Job ........................................................................... 87- Phase 4: Recovering Database ........................................................................................... 88- Phase 5: Opening Database for Use .................................................................................... 88

• Other User Managed Restore Procedures .................................................................... 88- Renaming and/or Relocating Files During Restore................................................................. 88

• Available RMAN Recovery Types in a Non-RAC Environment.................................... 92- Restoring Control File from an Autobackup ........................................................................... 92- Recovering Individual Datafiles/Tablespaces to Same Server ................................................. 93- Recovering Whole Database to Same Server........................................................................ 94- Performing Disaster Recovery with RMAN ............................................................................ 95

• Performing RMAN Restores ........................................................................................... 98- Phase 1: Preparing Database for Recovery .......................................................................... 99- Phase 2: Selecting Data for a Restore.................................................................................. 99- Phase 3: Setting Restore Options ...................................................................................... 104- Phase 4: Finalizing and Submitting the Job ......................................................................... 108- Phase 5: Opening Database for Use .................................................................................. 108

• Other Restore Procedures with RMAN ........................................................................ 109- Renaming and/or Relocating Files During Restore............................................................... 109

Page 5: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

5

• RMAN Recovery Catalog Maintenance ........................................................................ 110- Resynchronizing the Recovery Catalog .............................................................................. 110- Using Crosscheck to Update RMAN Repository ...................................................................111

Chapter 7: CLI-based RMAN Backups and Restores 113

• CLI-based RMAN Backups and Restores .................................................................... 115- Pre-Requisites ................................................................................................................. 115- Performing CLI-based Backups ......................................................................................... 115- Performing CLI-based Restores......................................................................................... 122

Section 2: Appendix

Appendix A: Oracle APM and Oracle Real Application Clusters125

• An Overview of Oracle Real Application Clusters...................................................... 127• About this Appendix...................................................................................................... 127• Recommended Additional Reading ............................................................................. 128• Deployment Overview ................................................................................................... 128• Licensing ........................................................................................................................ 130• Installation ...................................................................................................................... 131

- Required RAC Configuration ............................................................................................. 131- Pre-Requisites ................................................................................................................. 133- Installation Process .......................................................................................................... 134- Post-Installation Requirements for RAC Environments ......................................................... 135

• Configuration ................................................................................................................. 136- Configuring Default Attributes ............................................................................................ 136- Determining the Local Oracle SID and Home Directory in a RAC Environment ....................... 137- Adding a Database to the Oracle APM ............................................................................... 138

• Backup............................................................................................................................ 139- Performing Backups after Node Failure .............................................................................. 140

• Restore ........................................................................................................................... 140- Types of RMAN Recovery Available in a RAC Environment .................................................. 141

Appendix B: Glossary 153

• Glossary ......................................................................................................................... 155

Page 6: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Table of Contents6

Appendix C: The About Window 159

• The About Window.........................................................................................................161

Appendix D: Troubleshooting/Support 163

• Troubleshooting .............................................................................................................165- Backup Fails ....................................................................................................................165- Backup Job Hangs............................................................................................................165- Restore Fails....................................................................................................................167

• Technical Support ..........................................................................................................167

Page 7: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

7

Page 8: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Table of Contents8

Page 9: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s Guide

S E C T I O N 1 :

Using the Oracle APM

Page 10: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

abc

Page 11: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s GuideChapter 1:

1.0.0 - About the Oracle Application Plugin Module ...................................... 13• 1.0.1 - NetVault: Backup APM for Oracle at a Glance........................................................... 13• 1.0.2 - Key Benefits ............................................................................................................ 13• 1.0.3 - Feature Summary .................................................................................................... 14• 1.0.4 - Target Audience....................................................................................................... 15• 1.0.5 - Recommended Additional Reading .......................................................................... 15

Introduction

Page 12: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 1Introduction

12

Page 13: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

13

1.0.0 About the Oracle Application Plugin Module

1.0.1 NetVault: Backup APM for Oracle at a GlanceThe NetVault:Backup APM for Oracle (Oracle APM) increases confidence in recoverability of Oracle databases including those in a Oracle Real Application Cluster (RAC) environment and eliminates the need for complex scripting.

Through an intuitive GUI and automated workflow process, the APM offers users a centralized console to setup, configure, and define backup and restore policies for the Oracle databases. Support for online User Managed backups, and full featured RMAN based backups provides users the flexibility to select their preferred backup method without requiring them to learning Oracle internals.

The Oracle APM offers granular control that minimizes downtime by allowing the users to restore complete databases, individual tablespaces, or individual datafiles more reliably.

Through automatic integration with a wide range of backup devices, you can be confident that your Oracle data is protected and safely stored offsite to meet your disaster recovery and business continuity goals.

Support for Oracle 10g features such as Automated Storage Management and Transparent Data Encryption offer users advanced backup and recovery options in case of hardware failure or data loss. The Oracle APM protects business-critical Oracle data and increases the user confidence and agility.

1.0.2 Key BenefitsIncreases Confidence and Reduces Risk While Deploying Oracle - With Oracle APM, DBAs no longer have to worry about understanding Oracle internals before being able to implement a backup policy that is flexible enough to account for a large number of recovery scenarios. DBAs have the flexibility to choose the best method for the job whether it is simple User Managed full backups for less mission critical databases, or RMAN based full, differential or cumulative incremental backups for the most mission critical databases, all without creating scripts.

Oracle APM's flexible backup features also include:Full, differential, and cumulative incremental backups while data is online and accessibleProtection for single-instance and multi-instance RAC environments Protection down to the datafile levelBackups of parameter, control, and archived redo log files

By relying on Oracle APM to implement backup policies, DBAs can be freed to focus on more critical tasks without risking the ability to recover exactly what is needed in the unfortunate event of a failure. In addition, the IT

Page 14: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 1Introduction

14

managers’ confidence is increased by knowing their Oracle data is protected, no matter what.Speeds Up Restores to Reduce Downtime - With Oracle APM, you are no longer required to create a script or manually issue each command required in the recovery process, nor are you required to determine exactly which backup sets are needed during the process. Simply select what needs to be restored, the latest backup, and if appropriate, the time, SCN, or log sequence, and the Oracle APM automatically performs the recovery without further interaction. Not only are restores faster due to the reduced reliance on human interaction, the chance for a syntax error in a manual script that would require a restart is eliminated too.

Additional Oracle APM restore and recovery features include:Complete recovery, and point-in-time recovery based on time, SCN, and log sequence numberRestores of complete databases, individual tablespaces, or individual datafilesRestore read-only files when neededRename of datafilesDisaster recovery of databases to alternate host

Ensure Business Continuity with Automatic Integration of Backup Devices - With offsite backups being an important part of the data protection plan for any mission critical application, the Oracle APM takes advantage of NetVault:Backup's fundamental integration with a wide range of backup devices which include, tape libraries, stand-alone tape devices, virtual tape (disk) libraries, and shared virtual tape libraries. NetVault:Backup allows you the flexibility to select which backup device to store the backup on. You can store the backup online in a virtual tape library and duplicate the job to physical tape libraries shared by multiple Oracle databases, other proprietary databases, or used for general backup purposes.

Oracle APM gives you the confidence that your Oracle environment is being protected and stored offsite for disaster recovery purposes. At the same time, it frees administrators from being present 24x7 because even less experienced Oracle personnel can initiate restores with confidence that they will be performed correctly and as quickly as possible, thereby reducing downtime and improving business continuity.

1.0.3 Feature SummaryUser Managed full database backups while data is online and accessible RMAN based full, differential or cumulative incremental backups while data is online and accessibleProtection for single-instance and multi-instance RAC environments

Page 15: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

15

Protection down to the datafile levelProtect datafiles stored in Oracle’s Automated Storage Management (ASM) filesystem Parallel backup supportRestore complete databases, individual tablespaces, or individual datafiles Restore read-only files when neededRename of datafilesPoint-and-click complete recovery and point-in-time recovery based on time, SCN, and log sequence numberDisaster recovery of databases to alternate hostAutomatic integration with a wide range of backup devices

1.0.4 Target AudienceWhile advanced Oracle DBA skills are generally not required to create and execute routine backup operations, they are required for defining the Oracle Database Backup and Recovery Strategy.

1.0.5 Recommended Additional ReadingIt is recommended that the following documentation be readily available for reference when setting up, and while using this APM.

Oracle® Database Backup and Recovery Basics Oracle 10.2 http://download-west.oracle.com/docs/cd/B19306_01/backup.102/b14192.pdf

Oracle 10.1 http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10735.pdf

Oracle 9.2http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96519.pdf

Oracle® Database Backup and Recovery Advanced User's Guide Oracle 10.2 http://download-west.oracle.com/docs/cd/B19306_01/backup.102/b14191.pdf

Oracle 10.1 http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10734.pdf

Oracle 9.2 http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96566.pdf

Oracle® Database Backup and Recovery ReferenceOracle 10.2 http://download-west.oracle.com/docs/cd/B19306_01/backup.102/b14194.pdf

Oracle 10.1 http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10770.pdf

Page 16: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 1Introduction

16

Oracle 9.2 http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96565.pdf

The NetVault:Backup Administrator's Guide -

Offers descriptions on the use of functionality available in NetVault:Backup that can be used in conjunction with this APM. http://www.bakbone.com/support/product_documentation/

Page 17: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s GuideChapter 2:

2.0.0 - Defining a Backup and Recovery Strategy .......................................... 19• 2.0.1 - Available Backup Methods....................................................................................... 19

- 2.0.1.a - User Managed Backup Method ............................................................................ 19- 2.0.1.b - Recovery Manager (RMAN) Backup Method.......................................................... 20

• 2.0.2 - Supported Oracle File Types .................................................................................... 23• 2.0.3 - Defining an RMAN Backup Strategy ......................................................................... 24

- 2.0.3.a - Choosing the Location for the RMAN Repository .................................................... 24- 2.0.3.b - RMAN Tablespace/Datafile Backup Types ............................................................. 25- 2.0.3.c - Control File Backup Types.................................................................................... 27- 2.0.3.d - Recovery Catalog Backup Strategy ....................................................................... 28- 2.0.3.e - Example Backup Sequences................................................................................ 29

Backup and Recovery Strategy

Page 18: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 2Backup and Recovery Strategy

18

Page 19: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

19

2.0.0 Defining a Backup and Recovery StrategyThe primary objective of backing up data is to recover from the damage caused by a failure and resume normal operations as quickly as possible. This can be accomplished only if you have a well-designed backup and recovery strategy that maximizes data protection and minimizes data loss.

To formulate an efficient strategy, begin with your recovery strategy, which will define your recovery requirements, and the recovery techniques you will use to recover from various failure modes, such as media failure, user error, data corruption, and complete loss of the database server.

Each restore and recovery requirement will impose requirements on your backup strategy. So, once you have decided on your recovery strategy, you can plan your backup strategy, which will define your backup requirements, including the Oracle features you will use to take, store and manage your backups, the backup types you will implement, the intervals at which you will schedule these backups, and the situations in which you will backup the data outside the regular schedule. Typically, when defining a backup strategy, you will face a trade-off between MTTR (Mean Time To Recover) and backup space usage.

The sections that follow provide information and guidelines that can help you formulate a backup strategy for use with the Oracle APM.

2.0.1 Available Backup MethodsThe Oracle APM offers two backup methods: User Managed and Recovery Manager (RMAN). The Oracle APM supports implementing a pure User Managed or a pure RMAN based backup strategy, i.e., your backup strategy should include either User Managed backups or RMAN backups, not a combination of the two.

2.0.1.a User Managed Backup MethodOracle continues to support the ability to perform traditional User Managed backup and recovery. With this backup method, the files that make up the database are basically backed up and restored using a combination of host operating system commands, and SQL*Plus backup and recovery related capabilities.

While the Oracle APM’s User Managed backups offer the simplest form of backups with complete point-and-click functionality for full backups, recovering the Oracle database involves more human interaction and DBA expertise. User Managed restores begin with point-and-click restoration of the various datafiles from the backup media to the original or new destination. Restoration of the datafiles is followed by the recovery of the entire or parts of the database. With User Managed recovery, the DBA must determine what needs to be recovered and perform the actual recovery process manually outside the Oracle APM by executing a series of SQL*Plus commands.

Page 20: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 2Backup and Recovery Strategy

20

The User Managed backup method offers the simplest backup strategy at the expense of longer and more complex restores, making it more suitable for less mission critical databases.

The backup and restore strategies available with the User Managed method are thoroughly discussed in the Oracle® Database Backup and Recovery Advanced User’s Guide.

User Managed backups are available for all supported Oracle versions.

2.0.1.b Recovery Manager (RMAN) Backup MethodRMAN is a tool provided by Oracle that automatically integrates with sessions running on the Oracle database server to perform a range of backup and recovery activities. RMAN also reduces the administration work associated with your backup strategy by maintaining an extensive record of metadata about backups, archived logs, and its own activities, known as the RMAN repository. In restore operations, RMAN uses this information to eliminate the need for you to identify backup files for use in restores.

RMAN backups provide maximum reliability and flexibility when defining a backup strategy. The Oracle APM supports the full range of backup types and options available with Oracle’s RMAN tool together with the ability to handle a number of recovery scenarios with less reliance on human interaction and DBA expertise. Users simply select what needs to be restored, the latest backup, and if appropriate, the time, SCN, or log sequence number for point-in-time recovery, and the Oracle APM automatically performs the recovery without further interaction.

RMAN is Oracle’s preferred solution for backup and recovery, and is the best choice for mission critical databases. It provides maximum flexibility during the recovery process, allowing you to recover the database up to the point of failure no matter what caused the failure, whether it is a disaster, media failure, user error, or database corruption.

For a feature comparison between User Managed and RMAN backups refer to the Feature Comparison of Backup Methods section of the Oracle® Database Backup and Recovery Basics Guide. The same guide also provides a thorough discussion on the backup and restore strategies available with the RMAN method.

RMAN backups are available for all supported Oracle versions but the only supported backup method for multi-instance RAC databases.

Page 21: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

21

RMAN based Backup and Recovery Process

The following figures illustrate the RMAN based backup and recovery processes:

1. User defines backup job in NetVault:Backup Console.2. The Oracle APM converts job definition into corresponding RMAN backup

commands.3. RMAN executes backup commands which reads data from Oracle

database datafiles.4. RMAN uses Oracle Media Management API to store backup on backup

device managed by NetVault:Backup server.5. RMAN stores backup metadata in recovery catalog repository.

Page 22: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 2Backup and Recovery Strategy

22

1. User defines restore job in NetVault:Backup Console.2. The Oracle APM converts job definition into corresponding RMAN restore

and recovery commands.3. RMAN reads backup metadata from recovery catalog repository.4. RMAN uses Oracle Media Management API to read backup from backup

device managed by NetVault:Backup Server.5. RMAN restores datafiles to Oracle server and recovers database.

Page 23: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

23

2.0.2 Supported Oracle File TypesThe Oracle APM allows you to backup the following types of Oracle database files, which are critical to the successful operation of the Oracle instance:

Datafiles

Datafiles are physical files on the host operating system that contain the data stored in the tablespace.

Control File

Control Files are binary files that record the physical structure of the database. Information in the Control File includes, the database name, names and locations of associated datafiles and online redo log files, timestamps for database creation, current log sequence number, and checkpoint information. Protecting the Control File is extremely important for many recovery scenarios.

Parameter File

The PFILE, client side initialization parameter file or the SPFILE, server side initialization parameter file for the Oracle database.

Archived Redo Logs

The Oracle database allows you to copy online redo log groups that are not currently in use to one or more archive locations on disk, where they are collectively called the archived redo log. Individual files are referred to as archived redo log files. After a redo log file is archived, it can be backed up to other locations on disk or on tape, for long term storage and use in future recovery operations. Without archived redo logs, your database backup and recovery options are severely limited. Your database must be taken offline before it can be backed up, and if you must restore your database from backup, the database contents are only available as of the time of the backup. Reconstructing the state of the database to a point in time is not possible without archived logs.

It is critical that your backup strategy include all these file types to ensure recoverability from any type of failure, including media failure, data corruption, or a disaster.

Page 24: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 2Backup and Recovery Strategy

24

2.0.3 Defining an RMAN Backup StrategyThe first step in defining an RMAN backup strategy is determining the location for the RMAN repository. The second step involves determining the types and frequency of backups that are needed to meet your recovery requirements. These steps are discussed in the following sections.

2.0.3.a Choosing the Location for the RMAN RepositoryThe RMAN repository is the collection of metadata about backup and recovery operations on the target database. The authoritative copy of the RMAN repository is always stored in the Control File of the target database. A Recovery Catalog, i.e., an external database can also be used to store this information.

Control File

RMAN can conduct all necessary backup and recovery operations using just the Control File to store the RMAN repository information. This increases the importance of protecting the Control File as part of your backup strategy.

Storing the RMAN repository in the Control File is especially appropriate for small databases where installation and administration of a separate Recovery Catalog database will be burdensome. The only RMAN feature that is not supported in this mode is stored scripts which are not utilized by the Oracle APM.

When using the Control File to store the RMAN repository, Oracle highly recommends the following:

Enable Oracle’s control file autobackup feature. This causes RMAN to automatically back up the Control File, and also lets RMAN restore the Control File autobackup without access to a repository.Keep a record of your DBID, which may be required to recover the database when the Control File is lost.Use a minimum of two multiplexed or mirrored Control Files on separate disks.

Important: The database also depends on few other files for operation such as network configuration files (tnsnames.ora and listener.ora), password files, and the contents of Oracle home. Currently the Oracle APM does not support backing up these files. It is recommended that you use the NetVault:Backup Filesystem Plugin to backup these files. Future versions of the Oracle APM will allow Oracle Configuration Files and software binaries to be included in a backup.

Page 25: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

25

Recovery Catalog

An external Oracle database can also be used to store the RMAN repository. This external database is known as the Recovery Catalog. While the Control File has finite space for records of backup activities, a Recovery Catalog can store a much longer history. The added complexity of administering a Recovery Catalog database can be offset by the convenience of having the extended backup history available if you have to do a recovery that goes further back in time than the history in the Control File.

The Recovery Catalog's version of the RMAN repository is maintained solely by RMAN. The database targeted for backup never accesses it directly because RMAN propagates the information about the database structure, archived redo logs, backup sets, and datafile copies into the Recovery Catalog from the target database's Control File after any operation such as backup and restore.

Oracle recommends that you store the Recovery Catalog in a dedicated database. If you store the Recovery Catalog alongside other data in a database, then if you lose that other database you will lose your Recovery Catalog as well. This will make recovery more difficult. Moreover, if you store the Recovery Catalog in a database that is targeted for back up, you will not be able to perform whole database restores for that database because the database must be in a mounted state for restores, and the Oracle APM will not have access to the Catalog to perform the recovery in that state.

2.0.3.b RMAN Tablespace/Datafile Backup TypesThe Oracle APM supports following types of RMAN backups:

Full BackupIncremental Backup

The Incremental Backups are further classified as follows:

Level 0 Incremental BackupLevel 1 Incremental Backup (or Level n Incremental Backup in Oracle 9i)

Differential Incremental BackupCumulative Incremental Backup

Full Backup

An RMAN Full Backup is a backup of a datafile that includes every allocated block in the file being backed up. A full backup of a datafile can be an image copy, in which case every data block is backed up. It can also be stored in a backup set, in which case datafile blocks not in use may be skipped. An RMAN

Page 26: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 2Backup and Recovery Strategy

26

Full Backup cannot be part of an incremental backup strategy, i.e., it cannot be the parent or base of a subsequent incremental backup.

Incremental Backup

An incremental backup of a datafile captures images of blocks in the datafile that have changed since a specific point in time, usually the time of a previous incremental backup. Incremental backups are generally smaller than full datafile backups, unless every block in the datafile is changed. RMAN Incremental backups are only available for datafiles.

During media recovery, RMAN uses the block images from incremental backups, to update changed blocks to their contents at the SCN where the block was created in a single step. Without incremental backups, all changes must be applied one at a time from the archived redo logs. To reduce downtime, RMAN will always choose an incremental backup over reapplying individual changes stored in archived redo logs.

Multilevel Incremental BackupsRMAN’s incremental backups are multilevel. Each incremental level is denoted by a value of 0 or 1 in Oracle 10g, and by a value of 0 to 4 in Oracle 9i.

Level 0 Incremental Backup

A level 0 incremental backup, which is the base for subsequent incremental backups, copies all blocks containing data, backing up the datafile into a backup set just as a full backup would.

The only difference between a level 0 incremental backup and a full backup is that a full backup cannot be included in an incremental strategy.

Level 1 Incremental Backup (or Level n Incremental Backup in Oracle 9i)

A level 1 incremental backup (or level n incremental backup in Oracle 9i in which n is greater than zero) can be either of the following types:

Cumulative Incremental BackupDifferential Incremental Backup

Incremental backups are differential by default.

Cumulative Incremental BackupsIn a cumulative incremental backup, RMAN backs up all the blocks used since the most recent level 0 incremental backup. Cumulative incremental backups speed up restores by reducing the number of incremental backups that need to be included in the recovery process. Cumulative backups require more space

Page 27: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

27

and time than differential backups because they duplicate the work done by previous backups at the same level.

Cumulative backups are preferred over differential backups when recovery time is more important than disk space, because fewer incremental backups need to be applied during recovery.

Differential Incremental BackupsIn a differential incremental backup, RMAN backs up all blocks that have changed since the most recent cumulative or differential incremental backup, whether at level 1 or level 0.

RMAN determines which level 1 backup occurred most recently and backs up all blocks modified since that backup. If no level 1 is available, RMAN copies all blocks changed since the level 0 backup.

Differential incremental backups lead to longer restores because multiple incremental backups must be applied during recovery.

For more information on Level n Incremental Backups in Oracle 9i, refer to the Backup Types section in the Oracle 9i Recovery Manager User's Guide.

Archived Log Backup

Archived Redo Logs are important for point-in-time recovery and must be backed up regularly. You can backup the archived logs separately or together with the datafiles, and other supported files. When you backup the archived logs, select the Full Backup type in the Backup Options window. The Oracle APM also provides the option to delete the archived logs from the disk after backing them to the backup sets.

2.0.3.c Control File Backup TypesProtecting the Control File is extremely important in many recovery situations. The Oracle APM provides two methods for protecting the Control File: Manual backups and Autobackups.

Manual Backups of Control File

The manual backup of Control File is supported by both the User Managed and RMAN backup methods.

Manual Backup of Control File with User Managed Backup MethodWith the User Managed backup method, the Oracle APM does not use the active Control File for backup and restore. During backup, the Oracle APM first saves a snapshot of the Control File to the user-specified Control File Save Location, and then backs up this copy of the Control File. This ensures that a consistent copy of the Control File is protected. During restoration, the Oracle

Page 28: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 2Backup and Recovery Strategy

28

APM restores the Control File to the Control File Save Location to ensure that the active Control File is not inadvertently overwritten. You must manually copy this file to the original location as required. To make sure that a recent copy of Control File is always available, include it with each User Managed backup.

Manual Backup of Control File with RMAN Backup MethodWhen the RMAN backup method is used and the Control File node is explicitly selected in the Backup Selections window, the Oracle APM uses RMAN’s BACKUP CONTROLFILECOPY to backup the Control Files. To make sure that a recent copy of the Control File is always available, include it with each RMAN backup.

Autobackups of Control File

An autobackup of Control File also includes the Server Parameter File (SPFILE). The autobackups are made after every RMAN based backup, or after database structural changes, such as adding a new tablespace, altering the state of a tablespace or datafile, adding a new online redo log, renaming a file, adding a new redo thread, etc.

Manual vs. AutobackupsFor an RMAN based backup strategy, implement both manual and autobackup of the Control Files. With both the backups available, either you can choose a specific copy for restoration, or let RMAN identify a suitable copy. Restoring a specific copy of the Control File is ideal when data corruption has occurred and you need to restore the last saved version prior to data corruption. Restoring from autobackup is required for RAC environments and during disaster recovery.

2.0.3.d Recovery Catalog Backup StrategyThe Recovery Catalog database is similar to any other database, and must be a key part of your backup and recovery strategy.

Oracle recommends that you back up the Recovery Catalog with the same frequency that you back up the target database. For example, if you make a weekly whole database backup of the target database, then back up the Recovery Catalog immediately after all target database backups, in order to protect the record of the whole database backup. This backup can also help you in a disaster recovery scenario. Even if you have to restore the Recovery Catalog database using a Control File autobackup, you can then use the full record of backups in your restored Recovery Catalog database to restore the target database without using a Control File autobackup for the target database.

Oracle recommends the following guidelines for an RMAN backup strategy for the Recovery Catalog database:

Page 29: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

29

Run the Recovery Catalog database in ARCHIVELOG mode so that point-in-time recovery is possible.Back up the database onto two separate media (for example, disk and tape).Include Archivelogs in your backups.Do not use another Recovery Catalog as the repository for the backups.Configure the control file autobackup feature to ON.

2.0.3.e Example Backup SequencesFollowing are few example backup sequences that can be implemented to meet the data protection requirements of your Oracle database server.

Full Backups Only

When business requirements guarantee data protection up to the previous day, performing full backups on a daily basis should be sufficient. DBAs are only guaranteed to be able to recover the database up to the point of the last full backup.

Full Backup + Archived Log Backups

When business requirements mandate point-in-time data protection but recovery time is not important, Full Backups coupled with Archived Log backups will provide you the necessary protection.

For example, Full Backups are performed every Sunday night at 11:00 p.m., while Archived Log backups are performed Monday through Saturday at 11:00 p.m.

This strategy will require RMAN to restore and apply each Archived Log backup between the last Full Backup and the point-of-failure in succession. This can lead to longer recovery as the week progresses. To speed up restores, you can include Incremental backups which will reduce the number of Archived Log backups that must be restored.

Incremental Level 0 + Differential Incremental Level 1 + Archived Log Backups

When business requirements mandate point-in-time data protection and backups have to be as fast as possible, Incremental level 0 + Differential Incremental Backup + Archived Redo Log backups is an ideal strategy.

For example, Incremental Level 0 backups are performed every Sunday night at 11:00 p.m., while Differential Incremental Level 1 backups are performed Monday through Saturday at 11:00 p.m., and Archived Log backups are performed every 5-6 hours. Each Differential Incremental Level 1 backup will include all the changes since the last Level 0 or Level 1 backup and the

Page 30: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 2Backup and Recovery Strategy

30

Archived Log backups will include the transaction logs since the last Differential Incremental Level 1 backup.

This strategy can lead to longer recovery because RMAN must restore the Incremental Level 0 backup, each Differential Incremental Level 1 backup since the Incremental Level 0 backup and the Archived Log backups between the last Differential Incremental backup and the point-of-failure.

Incremental Level 0 + Cumulative Incremental Level 1 + Archived Log Backups

When business requirements mandate point-in-time data protection and recovery time should be as fast as possible, Incremental Level 0 + Cumulative Incremental Level 1 + Archived Log backups are the best combination.

For example, Incremental Level 0 backups are performed every Sunday night at 11:00 p.m., while Cumulative Incremental Level 1 backups are performed Monday through Saturday at 11:00 p.m. and Archived Log backups are performed every 5-6 hours. Each Cumulative Incremental Level 1 backup will include all the changes since the last Incremental Level 0 backup and the Archived Log backups will include the Redo Logs since the last Cumulative Incremental Level 1 backup.

This strategy leads to quick recovery because RMAN only has to restore the Incremental Level 0 backup, the last Cumulative backup, and the Archived Log backups between the last Cumulative backup and the point-of-failure.

Page 31: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s GuideChapter 3:

3.0.0 - Installing the Oracle APM ............................................................................. 33• 3.0.1 - Pre-installation Requirements .................................................................................. 33

- 3.0.1.a - NetVault:Backup Server/Client Software ................................................................ 33- 3.0.1.b - Database in ARCHIVELOG Mode......................................................................... 33

• 3.0.2 - Pre-requisites for RMAN Backups ............................................................................ 33- 3.0.2.a - Determining and Recording Database ID (DBID) of the Oracle Database .................. 33- 3.0.2.b - Enabling Control File Autobackup ......................................................................... 34- 3.0.2.c - Enabling Block Change Tracking........................................................................... 34- 3.0.2.d - Creating the RMAN Repository............................................................................. 35- 3.0.2.e - Registering the Target Database........................................................................... 37

• 3.0.3 - Recommended Configuration in a Single-Instance Non-RAC Environment ............... 38• 3.0.4 - Installation Procedure.............................................................................................. 39• 3.0.5 - Post-installation Requirements for RMAN Method .................................................... 39• 3.0.6 - Removing the Oracle APM ....................................................................................... 41

Installation

Page 32: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 3Installation

32

Page 33: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

33

3.0.0 Installing the Oracle APM

3.0.1 Pre-installation RequirementsBefore installing the Oracle APM, make sure that the following pre-requisites are met on the machine designated as the Oracle database server:

3.0.1.a NetVault:Backup Server/Client SoftwareAt least the Client version of NetVault:Backup must be installed on the machine where the Oracle APM will be installed. In a single-instance non-RAC environment, the Oracle APM will be installed on the server where the Oracle database will reside. In a multi-instance RAC environment, the Oracle APM will be installed on one of the nodes which host one of the instances for the RAC enabled database.

3.0.1.b Database in ARCHIVELOG Mode Make sure that the database is running in ARCHIVELOG mode. For instructions on enabling the archiving of filled groups of redo log files, refer the Oracle Administrator’s Guide. The steps below can be followed to verify that the database is properly set in this mode.

1. Start SQL*Plus and then connect with administrator privileges to the database. For example, from the SQL> Prompt, enter:CONNECT SYS/<password>@<connect identifier> AS SYSDBA

2. From the SQL> prompt, enter: SQL> ARCHIVE LOG LIST

The output will show the current mode. If the “Automatic Archival” property displays the “Enabled” status, then the database is properly configured.

Figure 3-1:Example

output of the“ARCHIVELOG LIST”command

showing theDatabase Log

Mode in“Archive

Mode”

3.0.2 Pre-requisites for RMAN Backups

3.0.2.a Determining and Recording Database ID (DBID) of the Oracle DatabaseKeep a record of the DBID of your Oracle databases in a safe place. The DBID is needed during the Disaster Recovery process. The DBID can be determined with the following steps:

Page 34: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 3Installation

34

1. Start SQL*Plus and then connect with administrator privileges to the database. For example, from the SQL> Prompt, enter:CONNECT SYS/<password>@<connect identifier> AS SYSDBA

2. From the SQL> prompt, enter:SELECT DBID FROM V$DATABASE;

3.0.2.b Enabling Control File Autobackup Control File Autobackups are required for disaster recovery with the Oracle APM. Refer to Control File Backup Types of Chapter 2 on page 27 for more information on Control File Autobackups.

You can turn the autobackup feature on by executing the following commands from the RMAN command line utility:

1. After making sure the Recovery Catalog database is open, connect RMAN to the target database and Recovery Catalog database. For example, issue the following commands to connect to the catalog database:> rman TARGET / CATALOG / rman/<password>@<connect_identifier for catalog>

2. Configure the default device type to SBT_TAPE.CONFIGURE DEFAULT DEVICE TYPE TO ‘SBT_TAPE’;

3. Enable Control File Autobackups.CONFIGURE CONTROLFILE AUTOBACKUP ON;

4. Confirm Control File Autobackups are enabled by reviewing the RMAN configuration settings.SHOW ALL;

3.0.2.c Enabling Block Change Tracking When this feature is enabled, RMAN uses a change tracking file to record changed blocks in each data file. This eliminates the need to scan every block in the data file for an incremental backup, thereby improving performance of the incremental backup jobs.

Important: For multi-instance RAC databases, refer to Enabling Control File Autobackup in a RAC Environment of Appendix A on page 133 for more information.

Page 35: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

35

You can enable change tracking when the database is either open or mounted. To alter the change tracking setting, follow the steps below:

1. Start SQL*Plus and then connect with administrator privileges to the target database. For example, from the SQL> Prompt, enter:CONNECT SYS/<password>@<connect identifier> AS SYSDBA

2. The Block Change Tracking file can either be stored in the default location, or in a user-defined location:

To Store it in the Default Location: Set the DB_CREATE_FILE_DEST parameter for the target database.Issue the following SQL statement to enable block change tracking:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

To Store it in a User-defined Location - Issue the following SQL statement:SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE ‘/<path to desired destination>/rman_change_track.dat’ REUSE;

The REUSE option tells Oracle to overwrite any existing file with thespecified name.

The following example stores the Block Change Tracking File in a file located in an Automated Storage Management (ASM) filesystem which is used for shared storage in a RAC environment.SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '+DATA/o10grac/block_change_tracking.dat' REUSE;

3.0.2.d Creating the RMAN Repository As discussed in Choosing the Location for the RMAN Repository of Chapter 2 on page 24, for an RMAN backup strategy you must first choose a location for the RMAN repository. By default, this repository is maintained in the Control File. However for larger or more mission critical databases, create a Recovery Catalog database which can store a much longer history than the Control File.

Important: Block Change Tracking is disabled by default on an Oracle 10g installation. This is because it introduces minimal performance overhead on the database during normal operations. However, the benefits of avoiding full data file scans during incremental backups are considerable, especially if only a small percentage of data blocks are changed between backups. For additional information refer to Improving Incremental Backup Performance: Change Tracking section of Oracle® Database Backup and Recovery Basics.

Important: In a Real Applications Clusters (RAC) environment, the change tracking file must be located on shared storage accessible from all nodes in the cluster.

Page 36: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 3Installation

36

Creating a Recovery Catalog is a three-step process: you must configure the database that will contain the Recovery Catalog, create the Recovery Catalog owner, and then create the Recovery Catalog itself.

Configuring the Recovery Catalog Database

When you use a Recovery Catalog, RMAN requires that you maintain a Recovery Catalog schema. The Recovery Catalog is stored in the default tablespace of the schema. Note that SYS cannot be the owner of the Recovery Catalog. Decide which database you will use to install the Recovery Catalog schema. It is recommended that you create a separate database for the Recovery Catalog and run the catalog database in ARCHIVELOG mode.

Next, you must allocate space to be used by the catalog schema. The size of the Recovery Catalog schema depends upon the number of databases managed by the catalog. The schema also grows as the number of archived redo log files and backups for each database increases. For more information on sizing the Recovery Catalog schema, refer to the Planning the Size of the Recovery Catalog Schema section in the Oracle® Database Backup and Recovery Advanced User’s Guide.

Creating the Recovery Catalog Owner

After choosing the Recovery Catalog database and creating necessary space, follow the steps given below to create the owner of the Recovery Catalog and grant this user necessary privileges:

1. Start SQL*Plus and then connect with administrator privileges to the database that will contain the Recovery Catalog. For example, from the SQL > Prompt, enter:CONNECT SYS/<password>@<connect identifier> AS SYSDBA

2. Create a user and schema for the Recovery Catalog. For example, enter:CREATE USER rman IDENTIFIED BY <password>TEMPORARY TABLESPACE temp DEFAULT TABLESPACE tools QUOTA UNLIMITED ON tools;

3. Grant the RECOVERY_CATALOG_OWNER role to the schema owner. This role provides the user with all privileges required to maintain and query the Recovery Catalog.SQL> GRANT RECOVERY_CATALOG_OWNER TO rman;

4. Grant the CONNECT role to the rman user.SQL> GRANT CONNECT TO rman;

Page 37: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

37

Creating the Recovery Catalog

After creating the catalog owner, create the catalog tables with the RMAN CREATE CATALOG command. This command creates the catalog in the default tablespace of the catalog owner.

1. Connect to the database that will contain the catalog as the catalog owner. For example:> rmanCONNECT CATALOG rman/<password>@<connect_identifier_for_catalog>

2. Run the CREATE CATALOG command to create the catalog. The creation of the catalog can take several minutes. If the catalog tablespace is this user's default tablespace, then you can run this command:CREATE CATALOG;

You can also specify the tablespace name for the catalog in the CREATE CATALOG command. For example:CREATE CATALOG TABLESPACE <tablespace_name>;

3.0.2.e Registering the Target DatabaseThe first step in using a Recovery Catalog with a target database is registering the database in the Recovery Catalog. Follow the steps given below to register a target database:

1. After making sure the Recovery Catalog database is open, connect RMAN to the target database and Recovery Catalog database. For example, issue the following command to connect to the catalog database.> rman TARGET / CATALOG rman/<password>@<connect_identifier_for_catalog>

2. If the target database is not mounted, then mount or open it:STARTUP MOUNT;

3. Register the target database in the connected Recovery Catalog:REGISTER DATABASE;

4. RMAN creates rows in the catalog tables to contain information about the target database, then copies all pertinent data about the target database from the Control File into the catalog, synchronizing the Catalog with the Control File.

5. Verify that the registration was successful.REPORT SCHEMA

Page 38: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 3Installation

38

Registering Multiple Databases in a Recovery Catalog

You can register multiple target databases in a single Recovery Catalog, if they do not have duplicate database IDs (DBIDs). RMAN uses the DBID to distinguish one database from another.

3.0.3 Recommended Configuration in a Single-InstanceNon-RAC EnvironmentWhile it is possible to set up a single machine as both the NetVault:Backup Server and the Oracle database server (i.e., all software installation and configuration requirements are performed on a single machine), it is recommended that these two entities exist on separate machines.

Oracle Database Server Machine NetVault:Backup Server

Software Installed/Configuration Software Installed/Configuration

Oracle Database SoftwareNetVault:Backup Server/Client Software Oracle APMARCHIVELOG Mode Enabled

NetVault:Backup Server SoftwareOracle Database Server Added as a NetVault:Backup Client (For complete details on adding a Client machine to the NetVault:Backup Server, please see the NetVault®: Backup - Administrator’s Guide)

Network Connection

Important: 1. Refer to Pre-Requisites of Appendix A on page 133 for more information on the

configuration of the Oracle APM in a RAC environment.

2. Regardless of configuration environment in place (i.e., separate NetVault:Backup Sever and Oracle database server, vs. a single machine configured as both), the Oracle APM must be installed on the host on which Oracle database server resides.

3. Example images and procedures throughout this guide assume that this two machine environment is in place and all configuration requirements have been met.

Page 39: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

39

3.0.4 Installation ProcedureFollow the steps outlined below to successfully install the Oracle APM.

Figure 3-2:In this figure,

the Oracledatabase

server hasalready beenadded to the

NetVault:Backup Serveras a Client. To

begininstallation ofthe APM, find

the Oracledatabase

server in theClient

ManagementWindow, right

click andselect Install

Software

1. Start the GUI on the NetVault:Backup Server, and open the Client Management window (via either of the Client Management buttons on the command toolbar, or by selecting the Client Management command from the Administration pull-down menu).

2. Locate the machine configured as the Oracle database server in the Clients frame and right-click on it. Select the Install Software command from the pop-up menu.

3. In the additional window that appears, navigate to the location of the “.npk” installation file for the Oracle APM (e.g., the NetVault:Backup APM Installation CD or the directory to which the file was downloaded from BakBone Software’s web site). Based on the operating system, the directory path for this software may vary on the installation CD.Select the file entitled “ora-xxxx.npk” (where “xxxx” represents various software platforms and version numbers) and click on the Open button.

Figure 3-3:The dialog box

displayed onsuccessful

installation ofthe APM

4. The installation will start and once it has completed, a successful installation message will appear in the Install Software dialog box. The Oracle APM is now successfully installed.

3.0.5 Post-installation Requirements for RMAN MethodYou must execute the nvpluginaccess utility on the NetVault: Backup Server and obtain the necessary security clearance for the Oracle APM to perform backup and restores. For multi-instance RAC databases, refer to Post-Installation

Important: Before commencing with the backups using the Oracle APM, review the following post-installation requirement based on your Oracle database server platform:

Oracle Database Server Running on Windows Operating System - During installation, the Oracle APM copies a dynamic link library file entitled ORASBT.DLL to the “…\system32” directory. This DLL is the link between Oracle and the media management utilities used by NetVault:Backup, and is required for the proper functioning of the APM. Ensure that the ORASBT.DLL exists in this directory.

Page 40: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 3Installation

40

Requirements for RAC Environments of Appendix A on page 135 for more information.

The nvpluginaccess utility is available in the “...\NetVault\util” directory on the NetVault: Backup Server. Run this utility as explained below:

1. Initiate a command line session and navigate to the .../netvault/util (where “...” represents the path to the NetVault installation directory):

2. Run the following command at the prompt:nvpluginaccess -remove -client <NetVault Machine Name>

(where <NetVault Machine Name> is the NetVault Machine Name where the Oracle APM is installed)nvpluginaccess -client <NetVault Machine Name> -account <NetVault user name> -password <user password>

(where <NetVault Machine Name> is the NetVault Machine Name where the Oracle APM is installed)

An example is shown below:nvpluginaccess -client DB-Server -account Default -password

Figure 3-4:nvplugin-

access runfrom the

commandprompt

1. A list of available plugin(s) will be displayed. Enter the number corresponding to the Oracle APM (Oracle RMAN Plugin) and press Enter.

2. If you did not specify a password, you will be prompted for a password. Press Enter to specify a blank password if you have not modified the password for the Default NetVault: Backup User.

3. A confirmation message will be displayed stating that access has been granted for the specified client.

4. Verify that the nvpluginaccess utility has been correctly configured by reviewing the contents of the hookplugs.cfg file located in the

Important: Failure to perform these post-installation steps will cause RMAN Control File Autobackups to hang which typically result in job abortion. Subsequent backup jobs will encounter ORA-00230: operation disallowed: snapshot control file enqueue unavailable errors. Refer toTroubleshooting/Support of Appendix D on page 163 for more information on resolving snapshot control file enqueue unavailable errors.

Important: Specify the account name as Default if you have not configured any NetVault users. Leave the password option blank if no password has been set.

Page 41: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

41

…/netvault/config directory (where "..." represents the path to the NetVault: Backup Server installation directory).

5. The following entry in the hookplugs.cfg corresponds to the above example:[DB_SERVER]Plugins=Oracle Rman!,Oracle Rman APMAccount=DefaultPassword=

3.0.6 Removing the Oracle APMFollow the steps given below to remove the Oracle APM:

1. In the Client Management window, locate the Client configured as the Oracle database server.

2. Right-click on this machine and select the Remove Software from the pop-up menu. The Remove Software window will be displayed.

3. In the list of installed plugins that is displayed, select the Oracle APM.Figure 3-5:

The RemoveSoftware

window withthe Oracle

APM selectedfor removal

Figure 3-6:The two dialog

boxes thatappear whenattempting to

remove theAPM

4. Click the Remove button to begin the software removal process.

5. A dialog box will appear asking for confirmation. Click OK to proceed. A confirmation message will appear. Click OK to close this dialog box and return to the Client Management window.

Page 42: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 3Installation

42

Page 43: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s GuideChapter 4:

4.0.0 - Configuring the Oracle APM......................................................................... 45• 4.0.1 - Defining Default Backup Target Set for RMAN Backups............................................ 45• 4.0.2 - Configuring Default Attributes ................................................................................. 46

- 4.0.2.a - Setting the Default Attributes via the NetVault:Backup Configurator .......................... 50• 4.0.3 - Determining the Oracle SID and Home Directory in a Non-RAC Environment............ 51

- 4.0.3.a - Windows-based O/S............................................................................................ 51- 4.0.3.b - Linux/UNIX-based O/S ........................................................................................ 51

• 4.0.4 - Adding a Database to the Oracle APM ...................................................................... 52- 4.0.4.a - Language Support .............................................................................................. 58- 4.0.4.b - Editing Database Information ............................................................................... 59- 4.0.4.c - Configuring the Authentication Details ................................................................... 60- 4.0.4.d - Resetting Authentication Details ........................................................................... 60- 4.0.4.e - Removing a Database ......................................................................................... 61

Configuration

Page 44: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

44

Page 45: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

45

4.0.0 Configuring the Oracle APMThe configuration information for the Oracle APM is organized into the following sections:

Defining Default Backup Target Set for RMAN BackupsConfiguring Default AttributesAdding a Database to the Oracle APM

4.0.1 Defining Default Backup Target Set for RMAN BackupsSince Control File Autobackups are enabled for disaster recovery and RAC environments, the Oracle APM will spawn a “child job” in RMAN itself for the autobackup of the Control File and SPFILE. A Default Backup Target Set needs to be defined to designate the target device for these backups. While it is possible to specify any device for these backups it is ideal to store the Control File Autobackups on the same device as all the other backups performed by this specific installation of the Oracle APM. The Default Backup Target Set will be specified in the configuration of the Oracle APM default attributes

Follow the steps given below to define a Default Backup Target Set for the Oracle APM:

1. From NetVault: Backup GUI, open the Backup window (via either of the buttons offered in the command toolbars, or by using the Backup command in the Operations pull-down menu).

2. Click the Target Tab. 3. Click the Specific Device Option.4. Select the desired device where Control File Autobackups will be stored.5. Set other Backup Target Options as desired6. Click the Save As button.7. In the Save Backup Target Set window, specify a user defined name.

Figure 4-7:Specify a userdefined name

for the BackupTarget Set

after selectingthe desired

device whereControl File

Autobackupswill be stored.

Page 46: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

46

4.0.2 Configuring Default AttributesThe Oracle APM provides the ability to set default attributes for the backup and restore jobs that can be overridden on a per-job basis. In addition, the APM also allows you to configure certain instance parameters.

Follow the steps given below to configure the default attributes for the Oracle APM:

1. From NetVault:Backup GUI, open the Backup window (via either of the buttons offered in the command toolbars, or by using the Backup command in the Operations pull-down menu). You will see a list of machines added as NetVault:Backup Clients in the Selections tab.

2. Locate the Client configured as the Oracle database server, and open it. To open any node in the Selections tab, you can do either of the following:

Double-click on the nodeRight-click and select Open command from the pop-up menu

A list of APMs/plugins installed on the machine will be displayed when you open the Oracle database server node.

Figure 4-1:The Configure

commandselected from

the pop-upmenu that

appears whenthe Oracle

APM node isright-clicked

3. Locate the Oracle APM in the list. Right-click on it and select the Configure command from the pop-up menu. This will launch the Configure window.

4. Set the default options as described below:Use Oracle Password File Authentication- Oracle supports two methods to authenticate database administrators or SYSDBA users: Operating System (OS) authentication and password file authentication. Select this option to enable the password file as the authentication method. Oracle's operating system authentication takes precedence over password file authentication, i.e., if the requirements for operating system authentication are met, then even if you use a password file, the user will be authenticated by operating system authentication.When this option is selected, the Oracle APM will use the SYSDBA authentication details from the Oracle password file to connect to the Oracle target instance with RMAN, i.e., connect target <SYSDBA User>/<password>@<connect identifier>. When this option is de-selected, the Oracle APM will use OS authentication when connecting to the Oracle target instance, i.e., connect target /.

Important: For complete details on the creation of NetVault Sets, please see the Appendix of the NetVault:Backup Administrator's guide entitled Working with NetVault Sets.

Page 47: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

47

Figure 4-2:The Configurewindow for the

Oracle APM

Oracle SYSDBA User Name - Specify the default Oracle user with SYSDBA privileges that will be used by the Oracle APM to connect to the database.NLS_LANG - Select the default character set that matches the National Language Support (NLS) Language or NLS_LANGUAGE parameter for the databases residing on this Oracle database server. The default can be overridden at the individual database level. The NLS_LANGUAGE specifies the default language of the database. This language is used for messages, day and month names, symbols for AD, BC, a.m., and p.m., and the default sorting mechanism. To determine the current NLS_LANGUAGE parameter for database, follow the steps below: 1.Start SQL*Plus and then connect with administrator privileges to the

target database. For example, from the SQL> Prompt, enter:CONNECT SYS/<password>@<connect identifier> AS SYSDBA

Important: Oracle Password File Authentication has not been verified in a multi-instance RAC environment.

Page 48: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

48

2.Query the NLS settings from v$NLS_PARMETERS with the following query.SQL> select * from v$NLS_PARAMETERS where PARAMETER ='NLS_LANGUAGE' or PARAMETER = NLS_TERRITORY or PARAMETER ='NLS_CHARACTERSET';

The results will be combined in the following format to match the available selections in the drop down box:<NLS_LANGUAGE>_<NLS_TERRITORY>.<NLS_CHARACTERSET>

For a list of languages supported by the Oracle APM and their corresponding NLS_Lang value see Language Support on page 58.Note that if you are not able to find an NLS_LANG in this list that exactly matches your current settings from the SQL*Plus query, then it is possible to enter (or copy and paste) the exact value in the drop-down list. Moreover, you do not require a “perfect match”, a “compatible match” is sufficient. For example, any charset 1252 will be compatible with the charset WE8MSWIN1252.

Parameter File Input Field Length - This field can be used to increase the length of the Parameter File(s) Path field in the Add/Edit Database window. By default, the length of the Parameter File(s) Path field is 2048, which can be increased to a maximum of 32766 characters.Incomplete Backup of ALL Items Selected - When multiple items are included in a backup, and the APM is unable to successfully backup ALL the items selected, the Oracle APM lets you specify what action the backup should take. For example, if a job includes multiple tablespaces and archived redo logs, and the backup of archived logs is unsuccessful while the tablespaces are backed up successfully, then you specify what action the backup job should take in this situation.The default action for the Oracle APM can be set by selecting one of the following four settings from the drop-down list:

Complete with Warnings - Saveset Retained - The job will return a status of “Backup Completed With Warnings” and a backup saveset will be created comprising of the items that were successfully backed up.

Figure 4-3:The list box

displaying theactions that

can be set forincomplete

backups

Complete without Warnings - Saveset Retained - The job will complete and return a status of “Backup Completed”, i.e., while errors are logged in the NetVault: Backup binary logs, the errors will essentially be ignored in the Job Management window and a backup saveset will be created comprising of the items that were backed up successfully.

Page 49: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

49

Fail - Saveset Retained - The backup job will return a status of “Backup Failed”. However, a backup saveset will be generated comprising of the items that were successfully backed up.Fail - No Saveset Retained - The backup job will return a status of “Backup Failed” and no saveset of backed up objects will be kept (i.e., even if some of the selected objects were actually successfully backed up, it will be discarded).

Use Catalog for RMAN based Backups and Restores - Select this option to specify that a Recovery Catalog database will be used for maintaining a record of all RMAN backup and restore operations performed with this APM. Catalog Net Service Name - Enter the Oracle Net Service name for the default Recovery Catalog database. This service name must be defined in the “TNSNAMES.ORA” file on the Oracle database server so that the Oracle APM can connect to the Recovery Catalog database. Catalog Owner - Specify the user that was defined as the owner of the Catalog and was granted the RECOVERY_CATALOG_OWNER role.User Managed Raw Devices Blocking Factor (KB) - This field can be used to set the Block Read units for quicker User Managed backups of Raw devices. The value can be between 1kb and 64kb, e.g., if you enter 8kb in this field, the Oracle APM would read 8kb chunks of data at a time while taking backups. NetVault Server (Required for RMAN Backups) - Specify the name of the NetVault: Backup Server where the nvpluginaccess utility was executed to grant security access to the NetVault Machine name where the Oracle APM is installed.Do Restore from NetVault Server (Required for RMAN Backups) - Specify the name of the NetVault: Backup Server where the nvpluginaccess utility was executed to grant security access to the NetVault Machine name where the Oracle APM is installed. CLI-based RMAN Backup and Restore Options - The following five fields are used to set configuration options for backup and restore jobs that are performed with the Oracle APM from a terminal session prompt. A complete description of the use of this functionality can be found in Chapter 7: CLI-based RMAN Backups and Restores on page 113.

Restore Backup Taken from NetVault Client - When a restore is performed by the Oracle APM from a terminal session, this field indicates the NetVault Client from which the original backup was performed. If no client name is entered, then the restore command will default to the local NetVault machine performing the restore.CLI Backup Advanced Options Set - This option requires that you first create a Set of desired options in the Advanced Options tab, and then save it with a specific name. Enter the name of this Set in the CLI

Page 50: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

50

Backup Advanced Options Set field to have all CLI-based RMAN backups automatically use the Advanced Options specified in this Set. If no set name is specified in this field, all CLI-based RMAN backups will use the default Advanced Options.CLI Backup Target Set (Required for RMAN Backups) - Specify the name of the Backup Target Set that was specified in Defining Default Backup Target Set for RMAN Backups on page 45.

Slave Connection Timeout (0 = Never) - Use this option to set an amount of time (in minutes) that will serve as an inoperability timeout between the Oracle APM and the Oracle database. If the Oracle APM senses no activity for this length of time during a backup, it will timeout and disconnect from the backup. The default entry of zero (“0”) indicates that no timeout exists.

5. Click OK to save the default settings.

4.0.2.a Setting the Default Attributes via the NetVault:Backup ConfiguratorThe default options for the backup and restore jobs can also be set via the NetVault:Backup Configurator. Follow the steps given below to access these options via the Configurator:

Figure 4-4:The Configure

commandselected from

the Clientsframe in the

ClientManagement

window

1. From the NetVault:Backup GUI, open the Client Management window (via either for the buttons on the command toolbars, or by using the Client Management command in the Administration pull-down menu).

2. In the Clients frame, locate the machine configured as the Oracle database server and right-click on it. In the pop-up menu that appears, select the Configure command.

3. The Remote Configurator window will appear. Click on the Plugin Options tab, and then click on the Oracle APM tab.

4. Continue from step 4 of the previous section Configuring Default Attributes on page 46.

Important: 1. For complete details on the creation of NetVault Sets, please see the Appendix of the

NetVault:Backup Administrator’s guide entitled Working with NetVault Sets.

2. If a Backup Target Set or Advanced Options Set is named in their appropriate field, they can be overridden from the command line by specifying the name of another desired Set as a variable in the syntax. Please see Chapter 7: CLI-based RMAN Backups and Restores on page 113 for more details on naming Sets in the CLI syntax.

Page 51: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

51

4.0.3 Determining the Oracle SID and Home Directory in a Non-RAC EnvironmentTo find out the Oracle SID and home directory, follow one of the procedures below (based on the O/S running on the Oracle database server):

4.0.3.a Windows-based O/SOn Windows, the SID and Oracle Home can be determined from the Registry.

1. Launch the Registry Editor on the Oracle Database Server (e.g., by selecting Start>Run, followed by typing “regedit” in the Run window).

2. Navigate to the following directory: My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE

Various directories will be displayed. Each folder prefaced with “KEY_” represents an installation of Oracle on the target machine (i.e., in the event that multiple installations of Oracle exist on the machine).

3. Open the folder entitled “KEY_<Oracle_Home>” that represents the target installation of Oracle to list the registry items in the right-hand frame. Locate the following items beneath the Name column and make note of the associated entry in the Data column:

ORACLE_HOMEORACLE_SID

4.0.3.b Linux/UNIX-based O/SOn Linux/UNIX-based operating systems, the SID and Oracle Home can be determined from the “oratab” file.

1. Open the “oratab” file (e.g., by issuing the command # more /etc/oratab in a terminal window)

2. The “oratab” file will contain entries for each Oracle database running on the server in the following format:<ORACLE_SID>:<ORACLE_HOME>:<Additional Information>

Example: If the command was run and the following was the result:PROD:/u03/app/oracle/product/10.2.0/db_1:N

“PROD” is the ORACLE_SID “/u03/app/oracle/product/10.2.0/db_1” is the ORACLE_HOME

Page 52: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

52

4.0.4 Adding a Database to the Oracle APMTo begin using the APM for backup and restore, you must first add the target Oracle database to the Oracle APM. The steps for adding a database are given below. This procedure must be followed for each database running on the Oracle server that will be protected with the Oracle APM.

1. From the GUI running on the NetVault:Backup Server, open the Backup window (via either of the buttons provided in the command toolbars, or by using the Backup command in the Operations pull-down menu). A list of NetVault:Backup Clients will be displayed in the Selections tab.

Figure 4-5:The Add

Databasecommand

selected fromthe pop-upmenu that

appears whenthe Oracle

APM node isright-clicked

2. Locate the Client configured as the Oracle database server, and open it for a list of APMs/plugins installed on the machine. Next, locate the Oracle APM in the list and open it.To open a node in the Selections tab, you can do either of the following:

Double-click on the nodeRight-click and select Open command from the pop-up menu

The Add Oracle Database window will appear when you open the Oracle APM node. If one or more database(s) have already been added to the Oracle APM, then opening this node will list the added database(s). To launch the Add Oracle Database window, right-click on the Oracle APM node and select the Add Database command from the right-click menu.

3. Set the various parameters as described in the points below:a. Oracle Instance Details b. RMAN Detailsc. User Managed Detailsd. Optional OS Authentication Details

Page 53: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

53

a. Oracle Instance DetailsAll the parameters pertaining to the Oracle Instance are mandatory for both RMAN and User Managed backup methods.

Figure 4-6:The Oracle

Instancespecific

parameters

Oracle SID - Enter the SID for the target Oracle database. For help on determining the Oracle SID, see Determining the Oracle SID and Home Directory in a Non-RAC Environment on page 51.Oracle Home - Enter the complete path to the installation directory of the target database. For help on determining the Oracle Home, see Determining the Oracle SID and Home Directory in a Non-RAC Environment on page 51.Oracle SYSDBA User Name - Specify an Oracle user with SYSDBA privileges that will be used by the Oracle APM to connect to the database.Oracle SYSDBA Password - Enter the password associated with the user name specified in the field above.

For Linux/UNIX-based Systems ONLY - On Linux/UNIX-based systems, two additional parameters are available - Oracle Software Owner and Oracle Software Group. Configure these parameters as described in the points below:

Oracle Software Owner - Specify the name of the Linux/UNIX operating system user that owns all the Oracle software. This user must have the

Important: 1. The authentication details for Oracle APM can also be configured later by accessing the

Set Database Password functionality. For more information, see Configuring the Authentication Details on page 60.

2. If the Oracle APM’s authentication details are not configured in the Add Oracle Database window or via Set Database Password, then a login prompt will appear each time a connection to the database is required.

Page 54: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

54

Oracle Inventory group as its primary group and the OSDBA and OSOPER groups as secondary groups. The usual name chosen for this user is oracle.Oracle Software Group - Specify the name of the Linux/UNIX group that owns the Oracle inventory, which is a catalog of all Oracle software installed on the system. The usual name chosen for this group is oinstall.

Figure 4-7:The additional

OracleInstance

Parameters tobe configured

on Linux/UNIX-based

systems

NLS_LANG - Select the character set that matches the National Language Support (NLS) Language or NLS_LANGUAGE parameter for the databases residing on this Oracle database server. The NLS_LANGUAGE specifies the default language of the database. This language is used for messages, day and month names, symbols for AD, BC, a.m., and p.m., and the default sorting mechanism. To determine the current NLS_LANGUAGE parameter for database, issue the following command from SQL*Plus as a SYSDBA user: select * from v$NLS_PARAMETERS where PARAMETER = 'NLS_LANGUAGE' or PARAMETER = NLS_TERRITORY or PARAMETER = 'NLS_CHARACTERSET';

The results will be combined in the following format to match the available selections in the drop down box:<NLS_LANGUAGE>_<NLS_TERRITORY>.<NLS_CHARACTERSET>

For a list of languages supported by the Oracle APM and their corresponding NLS_Lang value see Language Support on page 58.Note that if you are not able to find an NLS_LANG in this list that exactly matches your current settings from the SQL*Plus query, then it is possible to enter (or copy and paste) the exact value in the drop-down list. Moreover, you do not require a “perfect match”, a

Page 55: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

55

“compatible match” is sufficient. For example, any charset 1252 will be compatible with the charset WE8MSWIN1252.Parameter File(s) Path - When an Oracle Instance is started, the characteristics of the Instance are established by parameters specified within the initialization parameter file. These initialization parameters are either stored in a client-side initialization file called PFILE, or a server-side initialization file called SPFILE. In the Parameter Files field, specify the complete path including the directory and file name of the PFILE or SPFILE, depending upon whichever is in use. Provide the details for both if you are using SPFILE as well as PFILE. The default paths are provided in the table below:

Multiple parameter file paths can be entered using comma as a delimiter. The default length of this field is 2048 characters. You can increase the length of this field to accommodate longer entries by editing the Parameter File Input Field Length in the Configure window. See Configuring Default Attributes on page 46 for changing the field length.

b. RMAN Details If the RMAN backup method is going to be implemented and the Recovery Catalog has been chosen for the location of the RMAN Repository, then the following options must be configured. Refer to Pre-requisites for RMAN Backups of Chapter 3 on page 33 for more information on Recovery Catalog.

Figure 4-8:The RMAN

Details framein the AddDatabase

window

Init. File Platform Default Name Default LocationPFILE Windows init.ora %ORACLE_BASE%\admin\SID\

pfile\

Linux/UNIX initSID.orawhere the SID represents the ORACLE_SID

$ORACLE_HOME/dbs

SPFILE Windows spfileSID.ora where SID represents the ORACLE_SID

%ORACLE_HOME%\dbs\

Linux/UNIX spfileSID.ora where SID represents the ORACLE_SID

$ORACLE_HOME/dbs

Page 56: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

56

Use Catalog for RMAN based Backups and Restores - Select this option if the RMAN repository for this database will be stored in a Recovery Catalog database.The following fields will be enabled when you select this option.Catalog Net Service Name - Enter the Oracle Net Service name for the Recovery Catalog database. This service name must be defined in the “TNSNAMES.ORA” file on the Oracle database server so that the Oracle APM can connect to the Recovery Catalog database. Catalog Owner - Specify the user that was specified as the owner of the Catalog and was granted the RECOVERY_CATALOG_OWNER role.Catalog Password - Provide the password associated with the Catalog owner name specified in the field above.

c. User Managed Details For User Managed backup method Only (not supported in multi-instance RAC environments). Provide the following information for making User Managed backups of Control Files and archived redo logs. These fields can be left blank if your backup and recovery strategy includes the RMAN method.

Figure 4-9:The UserManaged

Details framein the AddDatabase

window

Control File Save Location - When the Oracle APM uses the User Managed backup method, backups and restores of the Control File are not performed using the active Control File. A snapshot of the Control File is saved to the Control File Save Location and the snapshot or copy of the Control File is backed up. This ensures that a consistent copy of the Control File is protected.During a User Managed restore sequence that includes restoring Control Files, the Control Files are restored to the Control File Save Location to ensure that the active Control Files are not inadvertently overwritten. During the User Managed recovery processes, the user will have to manually copy the Control Files from the Control File Save Location to the original location as required.

Important: If the Recovery Catalog is not enabled, then Oracle APM will automatically store the RMAN Repository information in the database's Control File.

Page 57: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

57

Specify a directory on the Oracle database server that will be used as the Control File Save Location and ensure that the Oracle APM has read/write privileges.Archive Log Destination Directory(s) - Enter the complete path to the archive log directory as set in the LOG_ARCHIVE_DEST or LOG_ARCHIVE_DEST_n parameters in the parameter file. If you archive the redo logs to multiple locations, then specify only the primary destination directory in this field.Archive Log Format - Specify the extension of the archive log files. The archive file pattern will depend on what is established for the LOG_ARCHIVE_FORMAT setting in the parameter file. Some examples are shown below:

If LOG_ARCHIVE_FORMAT = “%t_%s_%r.dbf”, then the archive file pattern will be “*.dbf”.If LOG_ARCHIVE_FORMAT = “%t_%s.arc”, then the archive file pattern will be “*.arc”.If LOG_ARCHIVE_FORMAT = “arc%s.%t”, then the archive file pattern will be “arc*.*”.

d. Optional OS Authentication Details (Windows-based O/S Only)The fields below can be used to specify a Windows Administrator user name that will allow the Windows installation to “impersonate” an Oracle SYSDBA user. This login is only necessary if backups fail due to “ORA-01031 insufficient” errors.

Figure 4-10:The OS

AuthenticationDetails frame

that isdisplayed in

the Windowsversion of the

Oracle APM

Windows Administrator User Name - Enter the Windows Administrator user name under which account the Oracle APM should run. The user name specified in this field must have been already created in the Windows operating system.Password - Enter the password associated with the user name specified in the field above.Windows Domain - Specify the Domain to which the user belongs. Leave blank if the domain is the Local domain.

4. Once all of the entries have been completed in the Add Oracle Database window, click on OK to save all the settings.

Page 58: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

58

4.0.4.a Language SupportThe following table lists the default languages available for the Oracle APM, and their corresponding NLS_LANG values.

Language NLS_Lang ValueArabic ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256Brazilian Portuguese BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1

BRAZILIAN PORTUGUESE_BRAZIL.UTF8Catalan CATALAN_CATALONIA.WE8ISO8859P1Chinese Simplified SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280

SIMPLIFIED CHINESE_CHINA.UTF8SIMPLIFIED CHINESE_CHINA.ZHS16GBK

Chinese Traditional TRADITIONAL CHINESE_TAIWAN.ZHT16BIG5Croatian CROATIAN_CROATIA.EE8MSWIN1250Czech CZECH_CZECH REPUBLIC.EE8MSWIN1250Danish DANISH_DENMARK.WE8ISO8859P1Dutch DUTCH_THE NETHERLANDS.WE8ISO8859P1English AMERICAN_AMERICA.WE8ISO8859P1

AMERICAN_AMERICA.US7ASCIIAMERICAN_AMERICA.UTF8ENGLISH_UNITED KINGDOM.WE8ISO8859P1

Finnish FINNISH_FINLAND.WE8ISO8859P1French FRENCH_FRANCE.WE8ISO8859P1

FRENCH_FRANCE.UTF8German GERMAN_GERMANY.WE8ISO8859P1

GERMAN_GERMANY.UTF8Greek GREEK_GREECE.EL8MSWIN1253Hebrew HEBREW_ISRAEL.IW8MSWIN1255

HEBREW_ISRAEL.UTF8Hungarian HUNGARIAN_HUNGARY.EE8MSWIN1250Italian ITALIAN_ITALY.WE8ISO8859P1

ITALIAN_ITALY.UTF8Japanese JAPANESE_JAPAN.JA16EUC

JAPANESE_JAPAN.JA16SJISJAPANESE_JAPAN.UTF8

Korean KOREAN_KOREA.KO16KSC5601KOREAN_KOREA.KO1616KSCCSKOREAN_KOREA.UTF8

Norwegian NORWEGIAN_NORWAY.WE8ISO8859P1

Page 59: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

59

4.0.4.b Editing Database InformationTo re-configure the database details, follow the steps given below:

1. With the Backup window open, locate the Oracle database server in the Selections tab and open it.

2. Locate the Oracle APM in the list and open it. This will list all the previously configured databases.

3. Right-click on the database for which you want to re-configure the parameters, and select the Edit Database command from the pop-up menu. In the Edit Oracle Database window that appears, you can see configured values for the database instance.

4. Re-configure the parameters as required. For information on various fields in this window, see Adding a Database to the Oracle APM on page 52.

5. Click on OK to save the changes and close the window.

Polish POLISH_POLAND.EE8MSWIN1250Portuguese PORTUGUESE_PORTUGAL.WE8ISO8859P1Romanian ROMANIAN_ROMANIA.EE8MSWIN1250Russian RUSSIAN_CIS.CL8MSWIN1251Slovak SLOVAK_SLOVAKIA.EE8MSWIN1250Spanish SPANISH_SPAIN.WE8ISO8859P1

SPANISH_SPAIN.UTF8Spanish Latin American LATIN AMERICAN SPANISH_AMERICA.WE8ISO8859P1Swedish SWEDISH_SWEDEN.WE8ISO8859P1Turkish TURKISH_TURKEY.WE8ISO8859P9

Language NLS_Lang Value

Important: 1. The password fields in the Edit Database window will be blank. You must set the

passwords again (even if there are no changes). It this is not done, the existing values will be reset to blank when you save the updated information.

2. To update only the authentication details for the Oracle APM, select the Set Database Password option instead of Edit Database Password. See Configuring the Authentication Details on page 60 for details.

Page 60: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

60

4.0.4.c Configuring the Authentication DetailsThe Oracle APM allows you to save the Oracle authentication details that are used to automatically connect to the database. Saving the authentication information eliminates the need to enter the details each time a connection to the database is required. You can save these details either at the time of adding a database or any time later using the Set Database Password option.

To set the authentication details for an added database, follow the steps outlined below:

1. With the Backup window open, locate the Oracle database server in the Client list and open it. This will list all the APMs/plugins installed on the Client.

2. Locate the Oracle APM in the list and open it. This will list all the previously configured databases.

3. Right-click on the database node for which you want to set the authentication details. Select Set Database Password from the pop-up menu.

4. In the Set Database Password window, enter the following informationAccount Name - Enter an Oracle user name with SYSDBA privileges.Password - Enter the password associated with the user name specified in the field above.

5. Click OK to save the authentication details.

4.0.4.d Resetting Authentication DetailsTo clear the authentication details configured for a database, follow the steps outlined below:

1. With the Backup window open, locate the Oracle database server in the Client list and open it. This will list all the APMs/plugins installed on the Client.

2. Locate the Oracle APM in the list and open it. This will list all the previously configured databases.

Important: 1. If the password for the configured SYSDBA user is changed in the Oracle database, then it

is necessary to update the password in the Oracle APM.

2. Additionally, in a multi-instance RAC environment, it is necessary to re-execute Step 4 Assign the channel for Control File Autobackups in Enabling Control File Autobackup in a RAC Environment of Appendix A on page 133.

Page 61: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

61

Figure 4-11:The Reset

Loginconfirmation

window

3. Right-click on the database node for which you want to set the authentication details. Select Reset Password from the pop-up menu.

4. The Reset Login dialog box will appear asking for confirmation. Click OK to clear the authentication details.

4.0.4.e Removing a DatabaseIf a previously configured database is no longer in use, you can remove it from the Oracle APM. The steps for removing a database are given below:

1. With the Backup window open, locate the Oracle database server in the Selections tab and open it. This will list all the APMs/plugins installed on the Client.

2. Locate the Oracle APM in the list and open it. This will list all the previously configured databases.

Figure 4-12:The

confirmationdialog box thatappears whenattempting to

remove adatabase

3. Right-click on the database not required any longer and select the Remove Database command from the pop-up menu.

4. The Remove Oracle Database dialog box will appear asking for confirmation. Click OK to remove the database.

Page 62: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 4Configuration

62

Page 63: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s GuideChapter 5:

5.0.0 - Backing Up Data with the Oracle APM................................................... 655.1.0 - Performing User Managed Backups ........................................................ 65

• 5.1.1 - Phase 1: Selecting Data for a Backup....................................................................... 65- 5.1.1.a - Using Selection Sets ........................................................................................... 66

• 5.1.2 - Phase 2: Selecting Backup Options ......................................................................... 67- 5.1.2.a - Selecting the Backup Method ............................................................................... 67- 5.1.2.b - Setting the User Managed Backup Options............................................................ 67- 5.1.2.c - Specifying the Action for an Error Condition ........................................................... 68

• 5.1.3 - Phase 3: Finalizing and Submitting the Job.............................................................. 685.2.0 - Performing RMAN Backups .......................................................................... 69

• 5.2.1 - Phase 1: Selecting Data for a Backup....................................................................... 69- 5.2.1.a - Using Selection Sets ........................................................................................... 71

• 5.2.2 - Phase 2: Setting Backup Options............................................................................. 71- 5.2.2.a - Selecting the Backup Method ............................................................................... 72- 5.2.2.b - Specifying the Backup Type ................................................................................. 72- 5.2.2.c - Setting the RMAN Backup Options........................................................................ 72- 5.2.2.d - Specifying the Action for an Error Condition ........................................................... 74

• 5.2.3 - Phase 3: Finalizing and Submitting the Job.............................................................. 75- 5.2.3.a - Using RMAN Post-backup Scripts......................................................................... 75

Backup with the Oracle APM

Page 64: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 5Backup with the Oracle APM

64

Page 65: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

65

5.0.0 Backing Up Data with the Oracle APMThis chapter offers basic instructions on the use of the Oracle APM to perform backups of Oracle databases. The information in this chapter is organized into the following sections:

Performing User Managed Backups Performing RMAN Backups

5.1.0 Performing User Managed BackupsThe User Managed backup procedure can be divided into following phases:

Phase 1: Selecting Data for a BackupPhase 2: Setting Backup OptionsPhase 3: Finalizing and Submitting the Job

5.1.1 Phase 1: Selecting Data for a Backup1. From the GUI running on the NetVault:Backup Server open the Backup

window (via either of the buttons provided in the command toolbars, or by using the Backup command in the Operations pull-down menu). You will see a list of machines added as NetVault:Backup Clients in the Selections tab.

2. Locate the Client serving as the Oracle database server in the list, and open it. To open any node in the Selections tab, you can do either of the following:

Double-click on the nodeRight-click and select Open command from the pop-up menu

A list of APMs/plugins installed on the machine will be displayed when you open the Oracle database server node.

3. Next, locate the Oracle APM in the list and open it. The database(s) added to the Oracle APM will be displayed.

4. Open the database that is to be backed up. The APM will connect to the database with the configured SYSDBA user and list the supported file types for selection. A login prompt will appear if you have not configured the Oracle APM’s authentication details. Provide the required information in the login window:

Account Name - Specify an Oracle database user with SYSDBA privileges.Password - Enter the password associated with the user name specified in the field above. Click OK. Upon authentication, the supported file types will be listed for selection.

Page 66: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 5Backup with the Oracle APM

66

5. The Oracle APM supports the following file types for User Managed backups:

Parameter File - Click on this checkbox to include the PFILE (client side initialization parameter file) or the SPFILE (server side initialization parameter file) for the Oracle database. It is possible to open this node and see the file name, however, file selection is not permitted at that level.

Figure 5-1:The OracleAPM nodeopened to

display itemsavailable for

inclusion in aUser Managed

backup job

Control File - When selected, the Oracle APM will take a snapshot of the Control File and save it in the directory specified in the Control File Save Location field in the Add/Edit Oracle Database window. The snapshot copy of the Control File will then be backed up to the backup device. Archive Logs - Select this option to backup all the archived redo logs in the Archive Log Destination Directory(s). The Oracle APM will not delete the backed up archived redo logs automatically.All Tablespaces - You can select this node to backup all the tablespaces within the database, or open it and select individual tablespaces to be included in the backup. Currently the Oracle APM does not support backing up individual datafiles. But you can select an individual datafile for restoration. Post-backup Scripts - This option is intended for the RMAN backup method.

5.1.1.a Using Selection SetsA Selection Set allows you to save the frequently selected data items in a composite set, which can be easily accessed for future backup jobs. This eliminates the need to manually select these items each time a backup is required.

Creating a Selection Set

To create a Selection Set, do the following:

1. With the desired items selected, click on the Save As button in the Backup Selection Set frame at the bottom of the Selections window.

2. In the Save Backup Selection Set widow that appears, enter a unique name for the Selection Set.

3. Click OK.

Page 67: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

67

Loading a Selection Set

To use a Selection Set, follow the steps below:

1. Click on the Load button in the Backup Selection Set frame at the bottom of the Selections window.

2. In the Load Backup Selection Set window that appears, select the required set.

3. Click on OK.Selection Sets are not unique to the Oracle APM. For details on their creation and use, please see the NetVault®: Backup - Administrator’s Guide.

5.1.2 Phase 2: Selecting Backup OptionsThe next phase in the backup procedure involves the following tasks:

Selecting the Backup MethodSetting the User Managed Backup OptionsSpecifying the Action for an Error Condition

Click on the Backup Options tab to perform these tasks.Figure 5-2:The options

available for aUser Managed

backup

5.1.2.a Selecting the Backup MethodThe following option allows you to select the User Managed backup method.

Backup Method - Click on the User Managed option to perform a User Managed backup.

5.1.2.b Setting the User Managed Backup OptionsThe following option can be set for the User Managed backups:

Include Read-only and Offline Tablespaces - By default, the Oracle APM will not back up read-only and offline tablespaces even if you have selected them explicitly in the Backup Selections window. Read-only and offline tablespaces typically do not require backing up unless the read-only data has

Page 68: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 5Backup with the Oracle APM

68

been updated or the offline tablespaces have been brought online. Eliminating these tablespaces from the Full User Managed backups will reduce the backup window. To include read-only and offline tablespace in the backup you must select this option. Future versions of the APM will split this option and allow you to select read-only and offline tablespaces independently.

5.1.2.c Specifying the Action for an Error ConditionWhen multiple items are included in a backup, and the APM is unable to successfully backup ALL the items selected, the Oracle APM lets you specify what action the backup should take. For example, if a job includes multiple tablespaces and archived logs, and the backup of archived logs is unsuccessful while the tablespaces are backed up successfully, then you specify what action the backup job should take in this situation.

Incomplete Backup of ALL Items Selected - The default action for the Oracle APM can be set by selecting one of the following four settings from the drop-down list:

Complete with Warnings - Saveset Retained - The job will return a status of “Backup Completed With Warnings” and a backup saveset will be created comprising of the items that were successfully backed up.Complete without Warnings - Saveset Retained - The job will complete and return a status of “Backup Completed”, i.e., while errors are logged in the NetVault: Backup binary logs, the errors will essentially be ignored in the Job Management window and a backup saveset will be created comprising of the items that were backed up successfully. Fail - Saveset Retained - The backup job will return a status of “Backup Failed”. However, a backup saveset will be generated comprising of the items that were successfully backed up.Fail - No Saveset Retained - The backup job will return a status of “Backup Failed” and no saveset of backed up objects will be kept (i.e., even if some of the selected objects were actually successfully backed up, it will be discarded).

5.1.3 Phase 3: Finalizing and Submitting the JobWith the desired data items selected and the necessary Backup Options set, follow the steps below to finalize the backup job and submit it.

1. Set the additional options available in the Schedule, Target and Advanced Options, if required. These options are not unique to the Oracle APM. For information on these options, please refer to the chapter dedicated to the Backup functionality in the NetVault®: Backup - Administrator’s Guide.

Page 69: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

69

2. Enter a suitable name for the job in the Job Title field. Specify a detailed name that allows you to easily identify the job for monitoring its progress or restoring data.

3. Click on the Submit button.4. You can monitor the backup job progress and log entries via the Job

Management, Status, and NetVault Logs windows. Please see the NetVault®: Backup - Administrator’s Guide for details on accessing these windows and their use.

5.2.0 Performing RMAN BackupsThe RMAN backup procedure can be divided into the following phases:

Phase 1: Selecting Data for a BackupPhase 2: Setting Backup OptionsPhase 3: Finalizing and Submitting the Job

5.2.1 Phase 1: Selecting Data for a Backup1. From the GUI on the NetVault:Backup Server open the Backup window (via

either of the buttons provided in the command toolbars, or by using the Backup command in the Operations pull-down menu). You will see a list of machines added as NetVault:Backup Clients in the Selections tab.

2. Locate the Client serving as the Oracle database server in the list, and open it. To open any node in the Selections tab, you can do either of the following:

Double-click on the nodeRight-click and select Open command from the pop-up menu

A list of APMs/plugins installed on the machine will be displayed when you open the Oracle database server node.

3. Next, locate the Oracle APM in the list and open it. The database(s) added to the Oracle APM will be displayed.

4. Open the database that is to be backed up. The APM will connect to the database with the configured SYSDBA user and list the supported file types for selection.

Important: When RMAN’s “autobackup” functionality has been enabled, the Oracle APM will spawn a “child job” in RMAN itself for the additional backup of Control File and SPFILE. In order to support this secondary backup you must execute the nvpluginaccess utility on the NetVault: Backup Server and obtain the necessary security clearance for the Oracle APM to perform backup and restores. For more information on this process, see Post-installation Requirements for RMAN Method of Chapter 3 on page 39 or Post-Installation Requirements for RAC Environments of Appendix A on page 135.

Page 70: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 5Backup with the Oracle APM

70

A login prompt will appear if you have not configured the Oracle APM’s authentication details. Provide the required information in the login window:

Account Name - Specify an Oracle database user with SYSDBA privileges.Password - Enter the password associated with the user name specified in the field above. Click OK. Upon authentication, the supported file types will be listed for selection.

5. The Oracle APM supports the following file types for RMAN backups: Parameter File - Click on this checkbox to include the PFILE (client side initialization parameter file) or the SPFILE (server side initialization parameter file) for the Oracle database. It is possible to open this node and see the file name, however, file selection is not permitted at that level. The Parameter File node will not be selectable in a multi-instance RAC environment.

Figure 5-3:The OracleAPM nodeopened to

display itemsavailable for

inclusion in anRMAN backup

job

Control File - This option allows you to make manual backups of Control File even if Control File autobackups are enabled as specified in the Pre-requisites for RMAN Backups of Chapter 3 on page 33.A Control File backup can be performed independent of any other database objects such parameter files, archive logs, or tablespaces, or it can be included in the same backup saveset. Another point to be noted is that, if you are not using a Recovery Catalog, then it is not possible to restore a manual Control File backup from the Oracle APM GUI. Archive Logs - Archived redo logs are essential for point-in-time recovery and should be backed up regularly. The Oracle APM provides the option to delete the archived logs after they are backed up, eliminating the need to manually delete these logs. This can be done by selecting the Delete Archive Logs After Successful Backup from Backup Options. See Setting the RMAN Backup Options on page 72 for details.All Tablespaces - You can select this node to backup all the tablespaces within the database, or open it and select individual tablespaces to be included in the backup. Currently the Oracle APM does not support backing up individual datafiles. But you can select an individual datafile for restoration.

Page 71: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

71

Post-backup Scripts - To backup the post-backup scripts generated using the Oracle APM, open this node and select the individual scripts. For more information on post-backup scripts, see Using RMAN Post-backup Scripts on page 75.

5.2.1.a Using Selection SetsA Selection Set allows you to save the frequently selected data items in a composite set, which can be easily accessed for future backup jobs. This eliminates the need to manually select these items each time a backup is required.

Moreover, Selection Sets are necessary for Incremental Backups. If your backup strategy includes incremental backup types, then you must create a Selection Set when making an Incremental Level 0 backup, and use this Selection Set for the Incremental Level 0, and Differential Incremental and Cumulative Incremental backups. The backup job will report an error if a Selection Set is not used for the Incremental Level 1/Level n backups.

Creating a Selection Set

To create a Selection Set, do the following:

1. With the desired items selected, click on the Save As button in the Backup Selection Set frame at the bottom of the Selections window.

2. In the Save Backup Selection Set widow that appears, enter a unique name for the Selection Set.

3. Click OK.

Loading a Selection Set

To use a Selection Set, follow the steps below:

1. Click on the Load button in the Backup Selection Set frame at the bottom of the Selections window.

2. In the Load Backup Selection Set window that appears, select the required set.

3. Click on OK.Selection Sets are not unique to the Oracle APM. For details on their creation and use, please see the NetVault®: Backup - Administrator’s Guide.

5.2.2 Phase 2: Setting Backup OptionsThe next phase of the backup procedure involves the following tasks:

Selecting the Backup MethodSpecifying the Backup TypeSetting the RMAN Backup Options

Page 72: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 5Backup with the Oracle APM

72

Specifying the Action for an Error ConditionClick on the Backup Options tab to perform these tasks.

5.2.2.a Selecting the Backup MethodThe following option allows you to select the RMAN backup method.

Backup Method - Click on the RMAN option for performing RMAN backups with the Oracle APM.

Figure 5-4:The BackupMethod and

Backup TypeSelection inthe BackupOptions tab

5.2.2.b Specifying the Backup TypeThe Oracle APM supports the following type of RMAN backups:

FullIncremental Level 0Differential IncrementalCumulative Incremental

See the section RMAN Tablespace/Datafile Backup Types of Chapter 2 on page 25 for information on these backup types.

5.2.2.c Setting the RMAN Backup OptionsThe following options can be set for the RMAN backups:

Figure 5-5:The options

that can be setfor an RMAN

backup

Delete Archive Logs After Successful Backup - This option deletes the archived logs automatically after they are backed up, eliminating the need to

Page 73: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

73

manually delete them. It is useful when backing up the archived logs on the disk to tape. This option is equivalent to the RMAN command:BACKUP ARCHIVELOG ALL DELETE INPUT;

The Oracle APM will backup each log sequence number and then delete the file that it has backed up. If you have multiple redo log archiving destinations, then the other copies of the same log sequence number are not deleted.Skip Offline Tablespaces - Select this option, if you want the Oracle APM to ignore the offline tablespaces and omit them from the backup.Skip Read-only Tablespaces - Read-only tablespaces should be backed up after an update has been performed and can be skipped in subsequent backups to reduce the size of the backup. Select this option, if you want the Oracle APM to ignore the read-only tablespaces and omit them from the backup.Skip Inaccessible Tablespaces - Operations within Oracle might render a tablespace inaccessible. For example, if a datafile has been removed at the O/S level, but not dropped inside the Oracle database; or if a raw device mount point link is dismounted. Enabling this option allows the Oracle APM to skip inaccessible databases that were selected in the Backup Selections window without causing the backup job to fail.User-defined Backup Tag - This option creates a tag name for the backup set. If you do not specify a tag, then RMAN creates a default tag for backups (except for Control File autobackups) in the format TAGYYYYMMDDTHHMMSS. You can specify the tag rather than the filename when executing the RESTORE command. Tags are stored in uppercase, regardless of the case used when entering them. The maximum length of a tag is 30 bytes. The characters used in a tag must be limited to the characters that are legal in filenames on the target filesystem. For example, ASM does not support the use of the hyphen (-) character in the filenames it uses internally, so a tag including a - (such as, weekly-incremental) is not a legal tag name if you are storing backups in ASM disk groups.Files Per Backup Set - Backup information is stored in a logical structure called backup set. A backup set contains the data from one or more datafiles, archived redo logs, control files, or SPFILE. Note that datafiles and archived logs cannot be combined together in the same backup set. By default, each backup set contains 4 or fewer datafiles, or 16 or fewer archived logs. This field allows you to specify the maximum number of files to include in each backup set created by the Oracle APM. The number of files per backup set can be set independently for tablespaces/datafiles and archive logs by setting this value for the following fields:

For Tablespaces/DatafilesFor Archive Logs

Page 74: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 5Backup with the Oracle APM

74

With the default value of zero (“0”), the Oracle APM divides files among backup sets in order to make optimal use of available channels. The total number of files to be backed up is divided by the number of channels. If the result is less than (<) 64, then that value is the number of files placed in each backup set. Otherwise, 64 files will be placed in each backup set. Number of Channels - You can control the degree of parallelism within a backup job by allocating the desired number of channels. Allocating multiple channels simultaneously allows a single job to read or write multiple backup sets in parallel. The number of channels should be less than or equal (<=) to the number of drives for the backup devices specified in the Target window. For example, if you are targeting a Virtual Library configured with 2 drives, then the number of channels should be 2 or less. The number of channels can be set independently for tablespaces/datafiles and archive logs by setting this value for the following fields:

For Tablespaces/DatafilesFor Archive Logs

5.2.2.d Specifying the Action for an Error ConditionWhen multiple items are included in a backup, and the APM is unable to successfully backup ALL the items selected, the Oracle APM lets you specify what action the backup should take. For example, if a job includes multiple tablespaces and archived logs, and the backup of the archived logs is unsuccessful while the tablespaces are backed up successfully, then you specify what action the backup job should take in this situation:

Incomplete Backup of ALL Items Selected - The Oracle APM can take one of following possible courses of action when such an error condition occurs:

Figure 5-6:The possible

courses ofaction when an

error occurs

Complete with Warnings - Saveset Retained - The job will return a status of “Backup Completed With Warnings” and a backup saveset will be created comprising of the items that were successfully backed up.Complete without Warnings - Saveset Retained - The job will complete and return a status of “Backup Completed”, i.e., while errors are logged in the NetVault: Backup binary logs, the errors will essentially be ignored in the Job Management window and a backup saveset will be created comprising of the items that were backed up successfully.

Page 75: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

75

Fail - Saveset Retained - The backup job will return a status of “Backup Failed”. However, a backup saveset will be generated comprising of the items that were successfully backed up.Fail - No Saveset Retained - The backup job will return a status of “Backup Failed” and no saveset of backed up objects will be kept (i.e., even if some of the selected objects were actually successfully backed up, it will be discarded).

5.2.3 Phase 3: Finalizing and Submitting the JobWith the desired data items selected and the necessary Backup Options set, follow the steps below to finalize the backup job and submit it.

1. Set the additional options available in the Schedule, Target and Advanced Options, if required. These options are not unique to the Oracle APM. For information on these options, please refer to the chapter dedicated to the Backup functionality in the NetVault®: Backup - Administrator’s Guide.

2. Enter a suitable name for the job in the Job Title field. Specify a detailed name that allows you to easily identify the job for monitoring its progress or restoring data.

3. Click on the Submit button.4. You can monitor the backup job progress and log entries via the Job

Management, Status, and NetVault Logs windows. Please see the NetVault®: Backup - Administrator’s Guide for details on accessing these windows and their use.

5.2.3.a Using RMAN Post-backup ScriptsThe Oracle APM provides a feature to run a script containing RMAN commands on completion of a backup job. For example, you can use this feature to duplicate the database to a standby server by running a post-backup script that contains the appropriate RMAN commands. This functionality is designed for Oracle DBAs with advanced RMAN and scripting experience. The procedure for creating an RMAN post-backup script is outlined below:

Important: To ensure that the backup of the objects selected in the Backup Selections tab are stored on the save device as the Control File Autobackups, use the Load button in the Target tab to load the Default Backup Target Set that was specified in the Oracle APM default attributes. For more information on defining the Default Backup Target Set, see Defining Default Backup Target Set for RMAN Backups of Chapter 4 on page 45.

Page 76: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 5Backup with the Oracle APM

76

Figure 5-7:

The AddRMAN Post-

backup Scriptcommand

1. From the Selections tab of the Backup window, open the Oracle APM, and right-click on the desired database from the list.

2. Select the Add RMAN Post-Backup Script command.You can also access this command as follows:a. Open the database node.b. Right-click on the Post-backup Scripts item, and select Add RMAN Post-

backup Script from the pop-up menu. 3. In the Add RMAN Post-Backup Script window enter the script details:

Script Name - Provide a name for the post-backup script. The script name cannot include the colon (:) character. An error message will appear if you try to specify a name that contains a colon.

Figure 5-8:The window

for defining anRMAN post-

backup script

Script - Enter the RMAN commands in this field. You must include the necessary connection strings to connect to the target, Catalog, or auxiliary database used in the script. Use ‘catalog’/Use ‘nocatalog’ - Select whether or not the script will connect to the Catalog with these options.

4. Click Save to store the script and close the window.

Page 77: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

77

Editing a Post-backup Script

Open the database node, and double-click on the Script listed beneath the Post-backup Scripts node (or right-click and select Edit Post-backup Script). Make the required changes and click on Save.

Removing a Post-backup Script

Open the database node, right-click on the Script listed beneath the Post-backup Scripts node, and select Delete Post-backup Script. Click Yes in the confirmation window.

Page 78: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 5Backup with the Oracle APM

78

Page 79: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s GuideChapter 6:

6.0.0 - Restoring Data with the Oracle APM....................................................... 81

6.1.0 - Restore and Recovery Overview ............................................................... 81• 6.1.1 - Understanding User Managed Recovery .................................................................. 81

- 6.1.1.a - Determining Which Datafiles Require Recovery...................................................... 81- 6.1.1.b - Recovering Datafiles and Archived Logs................................................................ 83- 6.1.1.c - Restoring Control Files ........................................................................................ 83

• 6.1.2 - Understanding RMAN Recovery ............................................................................... 85- 6.1.2.a - How RMAN Backups are Selected for Use in Recovery Operations .......................... 85- 6.2.3.b - Choosing Between Incremental Backups and Redo Logs ........................................ 85- 6.2.3.c - Datafile Media Recovery ...................................................................................... 85

6.2.0 - Performing User Managed Restores........................................................ 86• 6.2.1 - Phase 1: Preparing Database for Recovery............................................................... 86• 6.2.2 - Phase 2: Selecting Data for a Restore ...................................................................... 87• 6.2.3 - Phase 3: Finalizing and Submitting the Job.............................................................. 87• 6.2.4 - Phase 4: Recovering Database................................................................................. 88• 6.2.5 - Phase 5: Opening Database for Use ......................................................................... 88

6.3.0 - Other User Managed Restore Procedures............................................ 88• 6.3.1 - Renaming and/or Relocating Files During Restore ................................................... 88

- 6.3.1.a - Renaming/Relocating Control File, Datafile, or Individual Archived Log Files ............. 89- 6.3.1.b - Renaming/Relocating Archive Log Directory During Restore.................................... 90- 6.3.1.c - Additional Functionality Available in the Restore Selections Tab ............................... 90

6.4.0 - Available RMAN Recovery Types in a Non-RAC Environment .... 92• 6.4.1 - Restoring Control File from an Autobackup ............................................................. 92• 6.4.2 - Recovering Individual Datafiles/Tablespaces to Same Server ................................... 93• 6.4.3 - Recovering Whole Database to Same Server............................................................ 94• 6.4.4 - Performing Disaster Recovery with RMAN ............................................................... 95

- 6.4.4.a - Disaster Recovery to Same Server ....................................................................... 966.5.0 - Performing RMAN Restores ......................................................................... 98

• 6.5.1 - Phase 1: Preparing Database for Recovery............................................................... 99• 6.5.2 - Phase 2: Selecting Data for a Restore ...................................................................... 99

- 6.5.2.a - Additional Functionality Available in the Restore Selections Tab ............................. 102

Restore with the Oracle APM

Page 80: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

80

• 6.5.3 - Phase 3: Setting Restore Options .......................................................................... 104- 6.5.3.a - Viewing the Contents of Backup Pieces .............................................................. 104- 6.5.3.b - Setting General Restore and Recovery Options ................................................... 104- 6.5.3.c - Setting the Data Recovery Options ..................................................................... 106- 6.5.3.d - Setting Target Database Authentication Details (ONLY if Changed Since Backup) ... 107- 6.5.3.e - Setting the Recovery Catalog Details .................................................................. 107

• 6.5.4 - Phase 4: Finalizing and Submitting the Job ........................................................... 108• 6.5.5 - Phase 5: Opening Database for Use ....................................................................... 108

6.6.0 - Other Restore Procedures with RMAN ................................................ 109• 6.6.1 - Renaming and/or Relocating Files During Restore ................................................. 109

6.7.0 - RMAN Recovery Catalog Maintenance .................................................110• 6.7.1 - Resynchronizing the Recovery Catalog ..................................................................110• 6.7.2 - Using Crosscheck to Update RMAN Repository ...................................................... 111

Page 81: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

81

6.0.0 Restoring Data with the Oracle APMThis chapter offers basic instructions on the use of the Oracle APM to restore and recover Oracle databases. The information in this chapter is organized into the following sections:

Restore and Recovery Overview Performing User Managed RestoresOther User Managed Restore ProceduresAvailable RMAN Recovery Types in a Non-RAC EnvironmentPerforming RMAN RestoresOther Restore Procedures with RMANRMAN Recovery Catalog Maintenance

Based on your backup method, follow the instructions in the relevant section for successfully performing data restoration using the Oracle APM.

6.1.0 Restore and Recovery OverviewReconstructing the contents of all or part of a database from a backup typically involves two phases: Restore and Recovery. Restoring is the process of retrieving a copy of the datafile from a backup. And recovery is the process of reapplying changes to the file since the backup from the archived and online redo logs, to bring the database to a desired SCN (typically the present, or the point-of-failure). Often the term Recovery is used to encompass both the Restore and Recovery processes.

6.1.1 Understanding User Managed RecoveryWhen a User Managed backup strategy has been implemented, the recovery process must be managed by the DBA. This includes the following tasks:

Determining what needs to be recoveredRestoring the needed files with the Oracle APMAnd performing the actual recovery process manually outside the Oracle APM by issuing a series of SQL*Plus commands.

The following sections provide an overview of the User Managed recovery process. Refer to the About User-Managed Restore Operations in the Oracle Database Backup and Recovery Advanced User’s Guide for more details.

6.1.1.a Determining Which Datafiles Require RecoveryWhen a media failure or data corruption has occurred, you can use the following SQL*Plus query to determine which datafiles need recovery. This command will work only when the database is in an Open state:

Page 82: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

82

SELECT FILE#, ERROR, ONLINE_STATUS, CHANGE#, TIME FROM V$RECOVER_FILE;

Page 83: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

83

6.1.1.b Recovering Datafiles and Archived LogsOnce the damaged datafiles have been determined, restore the last Full Backup of the datafiles, and the backup of all the archived logs generated since the last backup till the target recovery time. When you restore the datafiles, the existing files will be replaced with the backed up copy. On the other hand, when you restore the archived logs, these files will be copied to the original location so that they are available to the database during the recovery process.

The recovery of the damaged datafiles and the archived logs will include the following steps:

1. If the database is open, then alter all the tablespace(s) which will be recovered offline with the following command:ALTER TABLESPACE <TABLESPACE NAME> OFFLINE;

2. Use the Oracle APM to restore the damaged datafile(s) from the latest User Managed Full Backup saveset. To restore the datafile to a different location, specify the new path during restore.

3. Use the Oracle APM to restore all the archived logs backups that have been completed since the User Managed Full Backup. Restore the archived logs to the primary destination directory. If space constraints do not permit restoration to the primary destination directory, then use the Rename option to restore the archived redo logs to a different directory. See Renaming and/or Relocating Files During Restore on page 88 for details.

4. After the restoration is complete, use SQL*Plus to perform the recovery manually by issuing the following command for every tablespace that needs recovering:RECOVER TABLESPACE <TABLESPACE NAME>

5. Alter the recovered tablespace(s) online with the following SQL*Plus command: ALTER TABLESPACE <TABLESPACE NAME> ONLINE;

6.1.1.c Restoring Control FilesA Control File can be recovered using one of the following two options:

Restoring a Lost Copy of a Multiplexed Control File - This procedure is used to recover a database if a permanent media failure has damaged one or more Control Files of a database, and at least one Control File has not been damaged by the media failure. Refer to the Restore Lost Copy of a Multiplexed Control File section of the Oracle Database Backup and Recovery Advanced User’s Guide for more information. Restoring a Control File from Backup After Loss of All Current Control Files - This procedure is used to restore a backup Control File if a permanent

Page 84: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

84

media failure has damaged all Control Files of a database and you have a backup of the Control File.

Restoring a Control File from Backup After Loss of All Current Control Files

When a Control File is inaccessible, you can start the instance, but not mount the database. If you attempt to mount the database when the Control File is unavailable, then you will get the following error message:ORA-00205: error in identifying Control File, check alert log for more info

You cannot mount and open the database until the Control File is accessible again.

The Oracle APM saves a copy of the snapshot of Control File to the Control File Save Location specified in the Add/Edit Oracle Database window. You can copy the Control File from this location if you loose all current Control Files. If the snapshot is not available in the Control File Save Location, then you can restore it from the backup by following the steps given below:

1. Use the Oracle APM to restore the Control File from the latest Control File backup.The Oracle APM will restore it to the Control File Save Location. The restored file will have “.SAV” extension.

2. Shutdown the database from SQL*Plus with the following command:SHUTDOWN ABORT

3. Rename and copy this restored file to the Control File name and location specified in the Oracle parameter file.

4. Mount the database from SQL*Plus with the following command: STARTUP MOUNT;

5. Additional recovery will be needed to recover the database to the point that equals the current SCN stored in the datafiles. Refer to Restoring a Backup Control File to the Default Location section of the Oracle Database Backup and Recovery Advanced User’s Guide for detailed steps.

6. Open the database with the RESETLOGS option after finishing recovery with the following SQL*Plus commandALTER DATABASE OPEN RESETLOGS;

Page 85: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

85

6.1.2 Understanding RMAN Recovery

6.1.2.a How RMAN Backups are Selected for Use in Recovery OperationsWhen the Oracle APM performs RMAN based restores, RMAN itself is actually performing the restores and recovery operations. RMAN uses the record of available backups in the RMAN repository to select the best available backups for use in the restore operation. This simplifies the entire recovery process by eliminating the need for less experienced personnel to determine the order in which backups should be restored.

6.1.2.b Choosing Between Incremental Backups and Redo LogsIf RMAN has a choice between applying an incremental backup or applying redo logs to the restored datafiles to meet a recovery objective, then it will always choose an incremental backup. If overlapping levels of incremental backup are available, then RMAN automatically chooses the one covering the longest period of time.

RMAN automatically restores the datafiles that it needs from available backups, applies incremental backups to the datafiles if they are available, and then applies archived logs.

6.1.2.c Datafile Media RecoveryDatafile media recovery is the application of online logs, archived redo logs, or incremental backups to a restored datafile in order to update it to the current time or some other specified time. Datafile media recovery (often referred to as Recovery) is either Complete Recovery or Point-in-Time (PIT) Recovery (also called Incomplete Recovery). Point-in-Time Recovery is one of the possible responses to a data loss caused by, for instance, a user error such as dropping a table or logical corruption that goes unnoticed for some time.

Complete Recovery vs. Point-in-Time (PIT) Recovery

Complete Recovery recovers the database to the most recent time without the loss of any committed transactions. With Point-in-Time recovery, it is possible to recover the database to a specific point. The Oracle APM supports point-in-time recovery based on time, log sequence number, or system change number. Currently, the Oracle APM supports only Database Point-in-Time Recovery (DBPITR). (The Tablespace Point-in-Time Recovery (TSPITR), which enables PIT recovery on one or more tablespaces is planned for a future release of the Oracle APM.)

Page 86: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

86

System Change Number (SCN) Based Point-in-Time RecoveryWhen an SCN is specified during point-in-time recovery, RMAN will recover up to but not including the specified SCN. For example, if SCN 1000 is specified, then recovery up to SCN 999 will be performed.

Log Sequence Number (LSN) Based Point-in-Time RecoveryWhen the exact time of the data corruption or failure is not known, specifying a Log Sequence Number that contains the target SCN is a viable option. RMAN will recover through the specified log. V$LOG_HISTORY can be queried to view the logs that have been archived to identify the appropriate log sequence number and thread.

Time Based Point-in-Time RecoveryTime based PIT recovery is useful when the time that the data corruption occurred is known. For example, if a developer dropped a table at 6:00am, PIT recovery can be performed with a stop time of 5:55 a.m. The Oracle APM will recover up to but not including the specified time.

Refer to the Performing Database Point-In-Time Recovery section in Oracle® Database Backup and Recovery Basics for more information on Point-in-Time Recovery and database incarnations.

6.2.0 Performing User Managed RestoresA standard User Managed restore with the Oracle APM can be divided into the following phases:

Phase 1: Preparing Database for RecoveryPhase 2: Selecting Data for a RestorePhase 3: Finalizing and Submitting the JobPhase 4: Recovering the DatabasePhase 5: Opening the Database for Use

This section outlines the various steps to be performed in these phases in order to complete data restoration successfully

6.2.1 Phase 1: Preparing Database for RecoveryWhile it is not necessary to take a complete Oracle Database offline to restore selected tablespaces, each individual tablespace that is to be restored must be taken offline prior to performing the restore.

1. Connect to the database with SYSDBA privileges via the SQL*PLUS utility.2. If the database is open, take all tablespaces containing damaged datafiles

offline by executing the following command:ALTER TABLESPACE <Tablespace name> OFFLINE IMMEDIATE;

Page 87: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

87

6.2.2 Phase 2: Selecting Data for a Restore1. From the NetVault:Backup GUI, open the Restore window (via either of the

Restore buttons available in the command toolbars or by choosing the Restore command from the Operations pull-down menu). You will see a list of NetVault:Backup Clients that have been the target of backup jobs in the Selections tab.

2. Locate the Client configured as the Oracle database server in the list, and open it. To open any node in the Selections tab, you can do either of the following:

Double-click on the nodeRight-click and select Open command from the pop-up menu

A list of APMs/plugins which have been used to backup data will be displayed when you open the Oracle database server node.

Figure 6-1:A User

Managedbackupsaveset

opened forrestore

3. Next, locate the Oracle APM in the list and open it. You will see the list of backup savesets created with the APM. Each saveset will be labeled with it’s given “Job Title” followed by its backup type and the time that the backup was performed. For User Managed backups, the type will be always UM FULL DB.

4. Open the desired backup saveset. This will display the database that was the target of the backup. Open it further to list the items contained in the saveset. From this level, double-click on a node to open it (the right-click + Open method is not available).

5. Depending upon the items selected for the backup, the saveset will include the following items:

Parameter File All Tablespaces Backup Control FileArchive Logs

You can open each of these items and select the items for inclusion in the restore procedure.

6.2.3 Phase 3: Finalizing and Submitting the JobFigure 6-2:

The RestoreOptions tab forUser Managed

restores

For the User Managed restores, you do not have to set any other options (the Restore Options tab does not contain any fields).

Page 88: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

88

1. Set the additional options available in the Schedule, Target Client and Advanced Options tabs of the Restore window, as required. These options are not unique to the Oracle APM. For information on these options, please refer to the chapter dedicated to the Restore functionality in the NetVault®: Backup - Administrator’s Guide.

2. Enter a suitable name for the job in the Job Title field. Specify a detailed name that allows you to easily identify the job for monitoring its progress.

3. Click on the Submit button.4. You can monitor the restore job progress and log entries via the Job

Management, Status, and NetVault Logs windows. Please see the NetVault®: Backup - Administrator’s Guide for details on accessing these windows and their use.

6.2.4 Phase 4: Recovering DatabaseAfter restoring the datafiles, you can choose to recover the database, tablespace, or the datafile.

1. Execute one of following SQL*Plus commands based on the required result:Recover Whole DatabaseRECOVER DATABASE

Recover Specific TablespaceRECOVER TABLESPACE <tablespace name>

Recover Specific DatafileRECOVER DATAFILE '<datafile name with the complete path>';

2. The database notifies you when media recovery is complete:Media recovery complete.

6.2.5 Phase 5: Opening Database for UseAfter recovery terminates, you must open the database for use by issuing the following command at the SQL*PLUS prompt:

ALTER DATABASE OPEN;

6.3.0 Other User Managed Restore ProceduresThis section comprises of sections that describe other User Managed restore operations that can be performed with the Oracle APM.

6.3.1 Renaming and/or Relocating Files During RestoreWith the User Managed backup method, the Oracle APM allows you to rename the Control File, Datafiles, and Archive Log Directory or Individual Archived Log files during restore. Renaming of files can be useful if you do not want to overwrite

Page 89: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

89

the existing version and want to create a copy of the file. You can also relocate the files to a different directory while restoring it with the APM.

The steps to rename and/or relocate a database during restore are given below:

6.3.1.a Renaming/Relocating Control File, Datafile, or Individual Archived Log Files

1. Complete the steps outlined in Phase 1: Preparing Database for Recovery on page 86.

2. Select the Datafile, Control File, or the individual Archived Log file to be restored from the backup saveset by following the instructions outlined in Phase 2: Selecting Data for a Restore on page 87.

3. Right-click on the item and select the Rename command from the pop-up menu

4. In the Restore Rename - <File name> window that appears, set the following values:

Figure 6-3:The Restore

Rename -<File name>

window

Rename To - Click on this checkbox. This will activate the associated textbox. Enter the new name/new destination folder for the selected file as described below:Specify a New Name - The file will be restored to the NETVAULT_HOME directory with the name specified in this field.Specify Existing Name With a New Path - If you specify a new path and the current name, then the file will be relocated to the new folder, and maintain its existing file name.Specify a New Name and a New Path - If you specify a new name and a new path, the file will be relocated to new location with the specified name.

5. Click OK to apply changes. The file will be accompanied by rename/relocate information in the parenthesis.

Figure 6-4:A datafile

marked with itsRename/

Relocationinformation in

the Selectionstab

6. Continue with the restore procedure as explained in Phase 3: Finalizing and Submitting the Job on page 87.

Page 90: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

90

6.3.1.b Renaming/Relocating Archive Log Directory During RestoreWhen renaming an Archive Log Directory for User Managed backups, enter the new destination directory in the Rename To field selecting the Archive Log Directory in the Restore Selections window and selecting Rename form the Right-click menu. All of the Archive Logs will be restored to the directory specified.

1. Complete the steps outlined in Phase 1: Preparing Database for Recovery on page 86.

2. Select the Archive Log Directory to be restored from the backup saveset by following the instructions outlined in Phase 2: Selecting Data for a Restore on page 87.

3. Right-click on the item and select the Rename command from the pop-up menu

4. In the Restore Rename - <File name> window that appears, set the following values:

Rename To - Click on this checkbox. This will activate the associated textbox. Specify the complete path and name of the new destination directory for the Archive Log Directory in this field. All the Archived Log files in the Archived Log Directory will be restored to the directory specified in this field.

5. Click OK to apply changes. The file will be accompanied by rename/relocate information in the parenthesis.

6. Continue with the restore procedure as explained in Phase 3: Finalizing and Submitting the Job on page 87.

6.3.1.c Additional Functionality Available in the Restore Selections TabIn addition to direct data selection, the Selections tab offers several other functionality that can be used to perform tasks from locating specific data to managing entries in the NetVault:Backup Database. This functionality is not unique to the Oracle APM (it is available for use with all NetVault:Backup APMs/Plugins), and descriptions on their use can be found in the NetVault®: Backup - Administrator’s Guide. The points below offer a brief description of this

Important: When renaming individual archive log files during a restore job, you must perform media recovery with SET AUTORECOVERY OFF, and enter the archive log filenames manually indicating the renamed file names.

Important: When restoring some or all of the required archived redo log files to an alternate location, specify the location before media recovery using the LOGSOURCE parameter of the SET statement in SQL*Plus.

Page 91: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

91

functionality as well as a reference to where information can be found in the NetVault®: Backup - Administrator’s Guide.

Figure 6-5:The Selection

Methodoptions, which

allow you tochoose how

items aredisplayed in

the Selectionstab

Selection Method Pull-down Menu - This menu allows you to select a method for the organization of data items displayed in the Selections tab, based on three basic selections:

APM/Plugin Used in the Backup (Default)Backup Selection Set UsedJob Title

Information on this functionality can be found in the section The Selection Method Pull-down Menu located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

Figure 6-6:The Filter

Options, whichallow you to

filter how itemsare displayed

in theSelections tab

Filter Options - Filter Options can be set to customize how data is displayed in the Restore Selections window. The following options are available:

By Date Range - To list the savesets generated during a given period, select this option and set the dates in the fields provided.Show On-line Status - Select this option to list only the currently available media.

Click on the Apply Filter button.

Details on this functionality are covered in the section The Filter Options Frame located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

Figure 6-7:The Searchfunctionality

allows you tolocate and

displayselecatbale

data based onits title

Search Functionality - At various levels of the selection tree, you can access the “Search...” command by right-clicking a node. This allows you to search for specific data items based on an item’s name. Information on this functionality can be found in the section The Search Facility located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

Page 92: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

92

Figure 6-8:

The Media Listcommand that

is used todisplay media-

relatedinformation for

the selectedbackupsaveset

Media List - This command provides information pertaining to the media used for the backup saveset. Complete information on this functionality can be found in the section “The Media List Tool” located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.Index Compression Functionality (Compress/Uncompress Commands) - Each job generates an index entry in the NetVault:Backup Database (NVDB), and this entry is required by NetVault:Backup to restore the job. However, as job numbers increase, so do the number of index entries, and as an end result, the NVDB will continue to grow and occupy increasing amount of hard disk space.

Figure 6-9:The Index

Compressionfunctionality

that is used tocompressNetVault

Databaseindex size, to

conserve harddisk space on

the NetVaultServer

This functionality allows you to compress these entries and reduce the overall size of the NVDB. In turn, these entries can be decompressed as required, to allow for a restore. Complete information on this functionality can be found in the section NetVault:Backup Database Management and the Restore Window located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

6.4.0 Available RMAN Recovery Types in a Non-RAC EnvironmentFor information on the types of RMAN Recovery Available in a RAC Environment, see Types of RMAN Recovery Available in a RAC Environment of Appendix A on page 141.

6.4.1 Restoring Control File from an AutobackupRestoring the Control File should only be performed in the following cases:

All current copies of the control file have been lost due to a media failure, accidental user deletion or have become corrupted and are not usableOracle Customer Support has advised that a Control File restore is required

As the autobackup uses a default format, RMAN can restore it even if it does not have a repository available that lists the available backups. RMAN replicates the Control File to all CONTROL_FILES locations automatically.

1. Start RMAN and connect to the target database:>rman connect TARGET /

Page 93: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

93

2. Start the target instance without mounting the database:STARTUP FORCE NOMOUNT;

3. Set the database identifier for the target database with SET DBID. RMAN displays the DBID whenever you connect to the target. You can also obtain it by inspecting saved RMAN log files, querying the Catalog, or looking at the filenames of Control File autobackup. For example, run: SET DBID <Source_DBID>;

4. Restore the Control File Autobackup:RUN {ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';RESTORE CONTROLFILE FROM AUTOBACKUP;ALTER DATABASE MOUNT;RESTORE DATABASE;RECOVER DATABASE;}

5. Open the database and reset the online logs:ALTER DATABASE OPEN RESETLOGS;

Running the ALTER DATABASE OPEN RESETLOGS from RMAN versus SQL*Plus resets the target database automatically so that you do not have to run a RESET DATABASE. By resetting the database, RMAN considers the new incarnation as the current incarnation of the database. If you ALTER DATABASE OPEN RESETLOGS from SQL*Plus and do not follow it with a RESET DATABASE at the RMAN prompt, then RMAN refuses to access the Recovery Catalog because it cannot distinguish between a RESETLOGS operation and an accidental restore of an old control file.

6.4.2 Recovering Individual Datafiles/Tablespaces to Same ServerThis type of recovery is performed when the database is open, but some of the datafiles are damaged. This is useful when you want to recover the damaged tablespace, while leaving the database open so that the rest of the database remains available. You will only be able to perform Complete Recovery when restoring and recovering individual datafiles/tablespaces. Point-in-Time recovery is not available for individual datafiles/tablespaces. Enabling Point-in-Time

Important: After restoring a Control File from an autobackup, it is highly recommended that a Full or Incremental Level 0 backup with the entire database selected in the Backup Selections tab be performed.

Page 94: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

94

recovery will cause the restore job to fail. Following is an overview of the process to recover individual datafiles/tablespaces:

1. In the Oracle APM Restore Selections window, select the damaged datafile(s)/tablespace(s) from the latest available backup of the tablespace.

2. In the Restore Options window, select the Alter Tablespaces Offline Before Restore and the Alter Tablespaces Online After Restore options.

3. To recover the tablespace to the current time, i.e., last committed transaction available in the archive and online redo logs, select the Perform Complete Recovery option in the Perform Recovery tab. If you do not want to perform any recovery, select the Do Not Perform Recovery option in this tab. Note that, if you select Perform Database Point in Time Recovery option in this tab, the restore job will fail.

4. Complete the Schedule, Target Client and Advanced Options, and submit the job.

5. RMAN will automatically choose the best available full, incremental, or archived log backups and restore and recover the tablespace.

6.4.3 Recovering Whole Database to Same ServerThis type of recovery is performed when the current Control File and SPFILE are intact but all the datafiles are damaged or lost. You will be able to perform complete recovery or recover the database to a specific point-in-time. Following is an overview of the process to recover the whole database:

1. Connect RMAN to the target database and Recovery Catalog database.> rman TARGET / CATALOG rman/<password>@<connect_identifier for catalog>

2. If the database is open, shutdown the database:SHUTDOWN ABORT;

3. Mount the database:STARTUP MOUNT;

4. In the Oracle APM Restore Selections window, find the latest available backup that included ALL the tablespaces and select the Whole Database node.

5. In the Restore Options window:a. Select the Check Read-Only Datafiles and Restore if Necessary and

the Check Read-Only Datafiles and Recover if Not Current to include read-only datafiles in the restore and recovery process. The read-only files will be included only if they are needed for the complete recovery. If they are not damaged, RMAN will omit them.

b. Select the Delete Archived Logs No Longer Needed option to delete the restored archived logs that Oracle itself deems are no longer necessary.

Page 95: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

95

c. To perform recovery on the database, i.e., reconstruct the database up to the current or specified point-in-time, select one of the following options in the Perform Recovery window:

Perform Complete Recovery – Recovers the database to the current time, i.e., last committed transaction available in the archived and online redo logs.Perform Point-in-Time Recovery – Recovers the database to a specific point-in-time whether it be a specific time, log sequence number, or SCN.

6. Complete the Schedule, Target Client and Advanced Options, and submit the job.

7. RMAN will automatically choose the best available full, incremental, or archived log backups and restore and recover the database.

6.4.4 Performing Disaster Recovery with RMAN Disaster recovery includes the restore and recovery of a database after the loss of the entire target database, all current control files, all online redo log files, and all parameter files. To perform a disaster recovery, the minimum required set of backups is backups of all the datafiles, some archived redo logs generated after the time of the backup, and at least one autobackup of the control file.

If your goal is to create a new copy of your target database for ongoing use on a new host, these procedures should not be used. RMAN's DUPLICATE command should be used. The DUPLICATE command assigns a new DBID to the duplicate database it creates, allowing it to be registered in the same recovery catalog as the original target database. Future releases of the Oracle APM will provide support for RMAN's Duplicate Database functionality through the GUI.

Important: After completing a restore of the Whole Database, it is highly recommended that a Full or Incremental Level 0 backup with the entire database selected in the Backup Selections tab be performed.

Important: When performing a test recovery ensure that you do not connect to the Recovery Catalog during datafile restoration. Otherwise, RMAN will record information about the restored datafiles to the recovery catalog. This interferes with future attempts to restore and recover the primary database. If you must use a recovery catalog because the control file is not large enough to contain the RMAN repository data on all of the backups that you need to restore, then export the catalog and import it into a different schema or database and use the copied recovery catalog for the test restore. Otherwise, the catalog considers the restored database as the current target database.

Page 96: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

96

6.4.4.a Disaster Recovery to Same Server The following procedure details the steps to perform disaster recovery to the same server where the source database resided. This procedure would be utilized in the scenario in which a complete media failure occurred and either the damaged host was rebuilt using the same configuration or a new server was configured imitating the original host's configuration including host name.

The same procedure should be used whether a Recovery Catalog was being used as part of the backup strategy for the RMAN Repository or not. RMAN always stores information concerning the backups in records in the control file. The version of this information in the control file is the authoritative record of RMAN's backups of your database. RMAN can conduct all necessary backup and recovery operations using just the repository information in the control file.

For variations to the Disaster Recovery procedure below, refer to Performing Disaster Recovery section in Oracle® Database Backup and Recovery Advanced User's Guide for more information.

Pre-Requisites

To perform a disaster recovery without a Recovery Catalog, the following requirements must be met:

Oracle Database Software Installed - Install the same version of the Oracle database software on the system as existed on the damaged server. The ORACLE_HOME should be identical on both the source and destination Oracle server. You do not have to create the database.Oracle Service On Windows Created and Started - Create the Oracle Service on Windows with Oracle's oradim utility. The Oracle SID should be identical to the original or source database. This will result in identical Oracle Service name. For example from a OS prompt execute:oradim -new -sid <sid_name>

After the Windows service is created, start the service with the following command from an OS prompt: net start oracleservice<sid_name>

NetVault: Backup Software and the Oracle APM Installed - The same version of NetVault: Backup software and the Oracle APM must be installed and configured as it originally existed on the damaged server. Ensure the Oracle APM default attributes are defined as specified in Configuring Default Attributes of Chapter 4 on page 46. When adding the database to the Oracle APM, ensure that the Use Catalog for RMAN Based Backups and Restores is disabled.DBID of the Source Database Identified - Identify the DBID of the damaged database. If the DBID was not recorded as part of the initial

Page 97: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

97

Oracle APM installation, the DBID can be obtained by examining the NetVault: Backup binary logs for RMAN based backups of the source database.Default Location for SPFILE must Exist - Default location for the SPFILE must exist before beginning the steps below. Failure to ensure that the default location will result in an ORA-17502 Failed to create file error during the SPFILE restore.Backups of All Tablespaces Made Available - Make sure that you have the latest backups of all the tablespaces.

Disaster Recovery Procedure1. Restore the Oracle Net Services Configuration Files. If the Filesystem

Plugin was utilized to backup the Oracle Net Services configuration files such as LISTENER.ORA, SQLNET.ORA, and TNSNAMES.ORA, restore the files to the destination Oracle database server. Otherwise, configure the Oracle Net Services on the destination Oracle server.

2. Start the Oracle listener. For example from an OS command prompt run:lsnrctl start

3. Start RMAN with no catalog and connect to the target database:RMAN TARGET / NOCATALOG

4. Set the DBID to the damaged database DBID. SET DBID <Source_DBID>;

5. Start the target instance without mounting the database.STARTUP NOMOUNT;

6. Restore the SPFILE from autobackup.RUN {ALLOCATE CHANNEL C1 TYPE SBT;RESTORE SPFILE FROM AUTOBACKUP;}

7. Restart the database with the restored SPFILE. STARTUP FORCE NOMOUNT;

8. Restore the Control File from Autobackup. If restoring the Control File from the last autobackup execute: RUN {ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';RESTORE CONTROLFILE FROM AUTOBACKUP;}

9. Mount the database:

Page 98: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

98

ALTER DATABASE MOUNT;

10.In the Oracle APM Restore Selections window, navigate to the source NetVault: Backup Client and database, and find the latest available backup that included ALL the tablespaces and select the Whole Database node.

11. In the Restore Options window:a. Select the Check Read-Only Datafiles and Restore if Necessary and

the Check Read-Only Datafiles and Recover if Not Current to include read-only datafiles in the restore and recovery process.

b. Recovery must be performed in a disaster recovery scenario. In the Perform Recovery tab, select the Perform Database Point-in-Time Recovery option. Point-in-time recovery recovers the database to a specific time, log sequence number or SCN. If the specific time or log sequence of the failure is not known, it is recommended that the SCN option be utilized.

c. Disable the Use Catalog in the Recovery Catalog window.

12.Complete the Schedule, Target Client and Advanced Options and submit the job.

13.RMAN will automatically choose the best available full, incremental, or archived log backups and restore and recover the database.

14.In RMAN, update the RMAN metadata.CROSSCHECK ARCHIVELOG ALL;

15.Exit RMAN.

6.5.0 Performing RMAN RestoresA standard RMAN restore with the Oracle APM can be divided into the following phases:

Phase 1: Preparing Database for RecoveryPhase 2: Selecting Data Items for a RestorePhase 3: Setting Restore OptionsPhase 4: Finalizing and Submitting the Job

Important: To ensure that the Recovery Catalog is not used for this restore, the Use Catalog for RMAN Based Backups and Restores must also be disabled in the Database Configuration window.

Important: After completing a disaster recovery, it is highly recommended that a Full or Incremental Level 0 backup with the entire database selected in the Backup Selections tab be performed.

Page 99: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

99

Phase 5: Opening Database for UseThis section outlines the various steps to be performed in these phases in order to complete data restoration successfully.

6.5.1 Phase 1: Preparing Database for RecoveryThe Oracle database must be in mount state when performing one of the following:

Whole Database RecoveryAll Tablespace Recovery

To bring the database to a mount state, issue the following commands:

1. Connect RMAN to the target database (and to the Recovery Catalog, if using one).

To connect RMAN to Target Database (When Not Using a Recovery Catalog)>rman TARGET/

To connect RMAN to the Target Database and the Recovery Catalog> rman TARGET / CATALOG rman/cat@catdb

2. If the database is open, shutdown the database from the RMAN prompt:SHUTDOWN ABORT;

3. Mount the database from the RMAN prompt:STARTUP MOUNT;

6.5.2 Phase 2: Selecting Data for a Restore1. From the NetVault:Backup GUI, open the Restore window (via either of the

Restore buttons available in the command toolbars or by choosing the Restore command from the Operations pull-down menu). You will see a list of NetVault:Backup Clients that have been the target of backup jobs in the Selections tab.

2. Locate the Client configured as the Oracle database server in the list, and open it. To open any node in the Selections tab, you can do either of the following:

Double-click on the nodeRight-click and select Open command from the pop-up menu

A list of APMs/plugins which have been used to backup data will be displayed when you open the Oracle database server node.

Page 100: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

100

Figure 6-10:

An RMANbackupsaveset

opened forrestore

3. Next, locate the Oracle APM in the list and open it. You will see the list of backup savesets created with the APM. Each saveset will be labeled with it’s given “Job Title” followed by its backup type and the time that the backup was performed. The backup type identifiers are outlined in the table below:

4. Open the desired backup saveset. This will display the database that was the target of the backup. Open it further to list the items contained in the saveset. From this level, double-click on a node to open it (the right-click + Open method is not available).

5. The Whole Database node and the other nodes based on the items selected for the backup will be displayed:

Whole Database - Select this node if you want to Restore and/or Recover the entire database. With this option selected, you can perform the Database Point-in-Time Recovery based on SCN, LSN, or time to re-construct the database up to the required point. Note that, selecting all the datafiles/tablespaces from the Backup Pieces node is not equivalent to selecting this node.Parameter File - It contains the parameter file (SPFILE/PFILE) backup. You can select this node or open it further and select the SPFILE/PFILE for restoration.When restoring a parameter file, select the backup that contains the specific version of the Parameter File you want to restore. For example, the Parameter File is backed up weekly on Sunday night at 11 p.m. Assuming today is Thursday and you need to restore the Parameter File to the state it was on Tuesday at 6 p.m., select the Parameter File from

Backup Type Backup Type IdentifierRMAN Full Database RMAN FULL DB

RMAN Incremental Level 0 RMAN INCRMTAL LVL 0

RMAN Differential Incremental RMAN DIFF INCRMTAL

RMAN Cumulative Incremental RMAN CUML INCRMTAL

RMAN Control File and Parameter File RMAN CTRL PARM

Page 101: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

101

the last backup that occurred before Tuesday at 6 p.m. which would be Sunday night's backup at 11 p.m.Backup Pieces - The backup pieces hold the backups of tablespaces and archived logs. The number of backup pieces will depend upon several factors, including the media size, and the value set for the Files per Backup Set option during backup. You can select the tablespaces or open this node and select the individual datafiles.In addition to the tablespaces and archived redo logs, the backup pieces will also include the autobackups of Control File and SPFILE, if this feature is enabled.Note that, the Control File and SPFILE autobackups cannot be restored from the GUI. The autobackups must be restored from the RMAN CLI.When restoring Tablespaces, select the last backup that contains the tablespaces that need to be restored. For example, a backup strategy of Incremental Level 0 + Cumulative Incremental Level 1 + Archive Log backups has been implemented where Incremental Level 0 backups are performed every Sunday at 11 p.m. and Cumulative Incremental Level 1 backups are performed Monday through Saturday at 11 p.m. and Archived Log backups are performed daily every 4 to 6 hours. Assuming today is Thursday and you need to restore one or more tablespaces to a specific point-in-time, select the last Cumulative Incremental Level 1 backup that contained all the tablespaces that need to be restored.It is not necessary to restore the archive logs in a separate restore job. When recovery is performed Oracle will automatically find and restore the archive logs it deems necessary during the recovery process.

Page 102: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

102

Control File - This node cannot be opened further. Secondly, if a Recovery Catalog is not in use, then the Control File cannot be restored from the GUI. The restore will fail if you try to include Control File in a restore job, unless the Use Catalog is enabled in the Recovery Catalog tab.When restoring the Control File from Manual Backup, select the backup that contains the specific version of the Control File you want to restore. For example, manual backups of the Control File are performed nightly at 11 p.m. Assuming today is Thursday and you need to restore the Control File to the state it was on Tuesday at 6 p.m., select the Control File from the last backup that occurred before Tuesday at 6 p.m. which would be Monday night's backup at 11 p.m.

6.5.2.a Additional Functionality Available in the Restore Selections TabIn addition to direct data selection, the Selections tab offers a variety of other functionality that can be used to perform tasks from locating specific data to managing entries in the NetVault:Backup Database. This functionality is not unique to the Oracle APM (it is available for use with all NetVault:Backup APMs/Plugins), and descriptions on their use can be found in the NetVault®: Backup - Administrator’s Guide. The points below offer a brief description of this functionality as well as a reference to where information can be found in the NetVault®: Backup - Administrator’s Guide.

Figure 6-11:The Selection

Methodoptions, which

allow you tochoose how

items aredisplayed in

the Selectionstab

Selection Method Pull-down Menu - This menu allows you to select a method for the organization of data items displayed in the Selections tab, based on three basic selections:

APM/Plugin Used in the Backup (Default)Backup Selection Set UsedJob Title

Information on this functionality can be found in the section The Selection Method Pull-down Menu located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

Page 103: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

103

Figure 6-12:The Filter

Options, whichallow you to

filter how itemsare displayed

in theSelections tab

Filter Options Frame - Filter Options can be set to customize how data is displayed in the Restore Selections window. The following options are available.

By Date Range - To list the savesets generated during a given period, select this option and set the dates in the fields provided.Show On-line Status - Select this option to list only the currently available media.

Click on the Apply Filter button.

Details on this functionality are covered in the section The Filter Options Frame located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

Figure 6-13:The Searchfunctionality

allows you tolocate and

display databased on its

title

Search Functionality - At various levels of the selection tree, you can access the “Search...” by right-clicking a node. This allows you to search for specific data items based on an item’s name. Information on this functionality can be found in the section The Search Facility located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

Figure 6-14:The Media Listcommand that

is used todisplay media-

relatedinformation for

the selectedbackupsaveset

Media List - This command provides information pertaining to the media used for this backup saveset. Complete information on this functionality can be found in the section The Media List Tool located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

Figure 6-15:The Index

Compressionfunctionality

that is used tocompressNetVault

Databaseindex size, to

conserve harddisk space on

the NetVaultServer

Index Compression Functionality (Compress/Uncompress Commands) - Each job generates an index entry in the NetVault:Backup Database (NVDB), and this entry is required by NetVault:Backup to restore the job. However, as job numbers increase, so do the number of index entries, and as an end result, the NVDB will continue to grow and occupy increasing amount of hard disk space. This functionality allows you to compress these

Page 104: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

104

entries and reduce the overall size of the NVDB. In turn, these entries can be decompressed as required, to allow for a restore. Complete information on this functionality can be found in the section NetVault:Backup Database Management and the Restore Window located in the chapter of the NetVault®: Backup - Administrator’s Guide dedicated to the Restore functionality.

6.5.3 Phase 3: Setting Restore OptionsIn this phase, you will specify whether you want to perform complete or point-in-time recovery, and set the other restore options. Click on the Restore Options tab to proceed with the restore procedure.

6.5.3.a Viewing the Contents of Backup Pieces Before proceeding with the restore, you can view the contents of the various backup pieces in the selected backup set and see what each piece contains, the backup start and end time, datafile name(s), SCN range, including the low and high SCN, and the log sequence number of the archived redo logs. To view these details, click on the Backup Contents tab.

Figure 6-16:The Backup

Contentsframe

6.5.3.b Setting General Restore and Recovery OptionsSet these options available in the Restore Options tab as explained below:

Page 105: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

105

Figure 6-17:The RestoreOptions tab

Alter Tablespaces Offline Before Restore - When restoring individual tablespace/datafiles, the tablespace must be offline before the restore is performed. Select this option if you want the Oracle APM to automatically execute the ALTER TABLESPACE OFFLINE command for each tablespace that is being restored.Alter Tablespaces Online After Restore - When restoring individual tablespace/datafiles, the tablespace must be returned to an online state after the restore/recovery is completed. Select this option if you want the Oracle APM to automatically execute the ALTER TABLESPACE ONLINE command after the selected tablespaces are restored/recovered.Check Read-only Datafiles and Restore if Necessary and Check Read-Only Datafiles and Recover if Not Current - Select these two options to include read-only datafiles in the restore and recovery process. The read-only files will be included only if they are needed for the complete recovery. If they are not damaged, RMAN will omit them.Delete Restored Archived Logs No Longer Needed - The Oracle APM copies the archived redo logs to the directory from which it was backed up. Select this option to delete the restored archived logs that Oracle itself deems are no longer necessary.Number of Channels - You can control the degree of parallelism within a restore job by allocating the desired number of channels. Allocating multiple channels simultaneously allows a single restore job to restore multiple backup sets in parallel. The number of channels should be less than or equal (<=) to the number of channels that was specified for the backup job.

Page 106: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

106

6.5.3.c Setting the Data Recovery OptionsThis release of the Oracle APM supports the following types of Datafile Media Recovery. (See Datafile Media Recovery on page 85 for more information on complete and in-complete database recovery.)

Complete Recovery of Individual Datafile(s)/Tablespace(s)Complete Recovery of Whole DatabasePoint-in-Time Recovery of Database (DBPITR)

The Tablespace Point-in-Time Recovery (TSPITR), which enables PIT recovery on one or more tablespaces is not supported with this release of the Oracle APM.

Select this tab, and set the data recovery options as described below:

Do Not Perform Recovery - Select this option if you just want to restore the files and do not want to perform recovery at all.

Figure 6-18:The Point-in-

Time RecoveryOption with the

PerformDatabase

Point in TimeRecovery

optionselected

Perform Complete Recovery - Click on this option to recover an individual tablespace, multiple tablespaces, or the whole database to the most recent point in time, without the loss of any committed transactions.Perform Database Point-in-Time Recovery - Select this option if you need to return a database to its state at a past point in time. For example, to undo the effect of a user error, such as dropping or deleting the contents of a table, you may want to return the database to its contents before the deletion occurred. The Oracle APM currently supports only Database Point-in-Time Recovery (DBPITR). So, this option must be selected only in conjunction with the Whole Database node in the Restore Selections window. Enabling this option when restoring one or more datafiles/tablespaces will cause the restore job to fail.You can restore the database to its state at some previous target SCN, log sequence, or time.

Page 107: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

107

System Change Number Based - For an SCN-based point-in-time recovery, select this option and specify the SCN until which the transactions must be recovered. RMAN will recover up to but not including the specified SCN.Log Sequence Based - For a log sequence based point-in-time recovery, select this option and specify the terminating log sequence number and the thread to which it belongs. V$LOG_HISTORY can be queried to view the logs that have been archived to identify the appropriate log sequence number and thread.Time Based - For a time-based point-in-time recovery, select this option, and set the date and time in the fields provided. The Oracle APM will recover up to but not including the specified time.

6.5.3.d Setting Target Database Authentication Details (ONLY if Changed Since Backup)If the SYSDBA user name/password, or the Oracle SID for the database has been changed since the time of backup, the set these options for the restore job in the Destination Details tab as described below:

Figure 6-19:The

DestinationDetails tab to

set thedatabase

authenticationdetails, ifchanged

Target Service - This option is required only if the current SID for the Oracle database is different. Provide the new SID in this field, if it has been changed. Oracle SYSDBA User Name - Specify the new SYSDBA user name if changed.Oracle SYSDBA Password - Specify the password associated with the user name specified in the field above.

6.5.3.e Setting the Recovery Catalog DetailsWhile the Recovery Catalog information is provided for backups in the Configure or Add/Edit Database window, set the Recovery Catalog configuration for a particular restore job by configuring the Recovery Catalog information in the Recovery Catalog tab of the Restore window.

Page 108: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

108

Figure 6-20:

The RecoveryCatalogoptions

Use Catalog - Select this option to use the RMAN repository in the Recovery Catalog and store information about this restore operation in a Recovery Catalog. De-select Use Catalog when performing a test recovery.:

The following fields will be enabled when you select this option:Service Name - Enter the Oracle Net Service name for the Recovery Catalog database. This service name must be defined in the “TNSNAMES.ORA” file on the Oracle database server so that the Oracle APM can connect to the Recovery Catalog database.Account - Specify the user that was specified as the owner of the Recovery Catalog and was granted the RECOVERY_CATALOG_OWNER role.Password - Provide the password associated with the Catalog owner name specified in the field above.

6.5.4 Phase 4: Finalizing and Submitting the JobWith all data items selected and the desired Restore Options set, follow the steps outlined below to finish set up of the job and submit it to run.

1. Set the additional options available in the Schedule, Target Client and Advanced Options tabs of the Restore window, as required. These options are not unique to the Oracle APM. For information on these options, please refer to the chapter dedicated to the Restore functionality in the NetVault®: Backup - Administrator’s Guide.

2. Enter a suitable name for the job in the Job Title field. Specify a detailed name that allows you to easily identify the job for monitoring its progress.

3. Click on the Submit button.4. You can monitor the restore job progress and log entries via the Job

Management, Status, and NetVault Logs windows. Please see the NetVault®: Backup - Administrator’s Guide for details on accessing these windows and their use.

6.5.5 Phase 5: Opening Database for UseOn completion of the restore and recovery process, you must open the database for use by issuing the following command at the RMAN CLI (this step is required only if the Database was brought to Mount State prior to recovery as outlined in Phase 1: Preparing Database for Recovery on page 99).

Important: To ensure that the Recovery Catalog is not used for this restore, the Use Catalog for RMAN Based Backups and Restores must also be disabled in the Database Configuration window.

Page 109: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

109

ALTER DATABASE OPEN;

6.6.0 Other Restore Procedures with RMANThis section comprises of sections that describe other restore operations that can be performed with the Oracle APM.

6.6.1 Renaming and/or Relocating Files During RestoreWith the RMAN backup method, the Oracle APM allows you to rename Control File and datafiles during restore. Renaming of files can be useful if you do not want to overwrite the existing version and want to create a copy of the file. You can also relocate the files to a different directory while restoring it with the APM.

The steps to rename and/or relocate a database during restore are given below:

1. Complete the steps outlined in Phase 1: Preparing Database for Recovery on page 99.

1. Select the Datafile, or Control File to be restored from the backup saveset by following the instructions outlined in Phase 2: Selecting Data for a Restore on page 99.

2. Right-click on the item and select the Rename command from the pop-up menu

3. In the Restore Rename - <File name> window that appears, set the following values:

Figure 6-21:The Restore

Rename -<File name>

window

Rename To - Click on this checkbox. This will activate the associated textbox. Enter the new name for the selected file in this field. The file will be restored to the directory identified by the DB_CREATE_FILE_DEST parameter in the Oracle Parameter File with the name specified in this field. Note that when renaming Control File during restore, the resulting filename should exist in the CONTROL_FILES list in the Oracle Parameter File.

4. Click OK to apply changes. The file will be accompanied by rename/relocate information in the parenthesis.

Page 110: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

110

Figure 6-22:

A datafilemarked with its

Rename/Relocation

information inthe Selections

tab

5. Continue with the restore procedure as explained in Phase 3: Setting Restore Options on page 104 (Performing RMAN Restores).

6.7.0 RMAN Recovery Catalog Maintenance

6.7.1 Resynchronizing the Recovery CatalogThe Oracle APM automatically executes a full or partial resynchronization of the recovery catalog when performing RMAN backups as long the control file is mounted and the recovery catalog database is available at command execution.

You can use RMAN’s RESYNC CATALOG command to perform manual full resynchronizations when:

The recovery catalog is unavailable when you issue any of the commands that automatically perform a resynchronization.Backup the database infrequently (for example, hundreds of archive logs are archived between database backups) and generate a high number of log switches every day (for example, 1000 switches between catalog resynchronizations)You have made changes to the physical structure of the target database such as adding or dropping a tablespace. As with archive operations, the recovery catalog is not updated automatically when the physical schema changes.

You should not need to manually run RESYNC CATALOG very often. Refer to Resynchronizing the Recovery Catalog in Oracle® Database Backup and Recovery Advanced User's Guide for more information.

Force a Full Resynchronization of the Recovery Catalog, with the detailed steps below:

1. Start RMAN and connect to the target database and Recovery Catalog.> rman TARGET / CATALOG rman/<password>@<connect_identifier for catalog>

2. Mount the target database.STARUP MOUNT;

3. Resync the recovery catalog.

Page 111: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

111

RESYNC CATALOG;

4. Exit RMAN.

6.7.2 Using Crosscheck to Update RMAN RepositoryTo ensure that data about backups in the RMAN Repository is synchronized with corresponding data in the NetVault: Backup Database, perform a crosscheck. The CROSSCHECK command operates update outdated RMAN repository information about backups whose repository records do not match their physical status. For example, if a user removes archived logs from disk with an operating system command, the repository still indicates that the logs are on disk, when in fact they are not.

Refer to Using CROSSCHECK to Update the RMAN Repository in Oracle® Database Backup and Recovery Basics for more information.

Crosscheck the archive logs, with the detailed steps below:

1. Start RMAN and connect to the target database and Recovery Catalog.> rman TARGET / CATALOG rman/<password>@<connect_identifier for catalog>

2. Crosscheck the archive logs.CROSSCHECK ARCHIVELOG ALL;

3. Exit RMAN.

Page 112: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 6Restore with the Oracle APM

112

Page 113: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s GuideChapter 7:

7.0.0 - CLI-based RMAN Backups and Restores ............................................ 115• 7.0.1 - Pre-Requisites ....................................................................................................... 115

- 7.0.1.a - Verifying the Proper RMAN Executable is in Use (Linux-based O/S ONLY) ............. 115- 7.0.1.b - Ensuring an “SBT_TAPE” Channel is Established................................................. 115

• 7.0.2 - Performing CLI-based Backups.............................................................................. 115- 7.0.2.a - Example of a Basic CLI Backup.......................................................................... 115- 7.0.2.b - Additional Parameters: The “format” Clause......................................................... 116- 7.0.2.c - Additional Parameters: The “send” and “PARMS” Clauses ..................................... 117

• 7.0.3 - Performing CLI-based Restores ............................................................................. 122

CLI-based RMAN Backups and Restores

Page 114: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 7CLI-based RMAN Backups and Restores

114

Page 115: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

115

7.0.0 CLI-based RMAN Backups and RestoresThe users who want to take advantage of advanced RMAN features that are not supported via the Oracle APM GUI can perform CLI-based RMAN backup and restores instead of or in conjunction with the Oracle APM. During CLI-based RMAN backup and restores, the Oracle APM is simply providing media management functionality for RMAN.

7.0.1 Pre-RequisitesThe following steps must be performed before initiating backups/restores from the command line:

Verifying the Proper RMAN Executable is in Use (Linux-based O/S ONLY)Ensuring an “SBT_TAPE” Channel is Established

These steps are covered in the sub-sections below:

7.0.1.a Verifying the Proper RMAN Executable is in Use(Linux-based O/S ONLY)Various installations of Linux include more than one executable named as rman. So, it is necessary to verify that the Oracle RMAN application is started when you issue the rman command at the prompt. This can be done by making the path to the Oracle RMAN executable ($ORACLE_HOME/bin) as the first search path in the PATH environmental variable.

7.0.1.b Ensuring an “SBT_TAPE” Channel is EstablishedThe Oracle APM uses an Oracle “SBT_TAPE” channel to conduct backups of an Oracle database. System Backup to Tape (or “SBT”) is most commonly used to specify a destination for RMAN commands used to back up to tape media. Please consult the section, Configuring and Allocating Channels for Use in Backups in the Oracle® Database Backup and Recovery Advanced User’s Guide for complete information on establishing this type of channel for use.

7.0.2 Performing CLI-based Backups

7.0.2.a Example of a Basic CLI BackupThis section shows how to take a full backup of “USERS” tablespace using RMAN commands:

1. Log on to the Oracle database server and initiate a terminal session.

Important: Prior to using this functionality, it is strongly recommended that you thoroughly review the Oracle® Database Backup and Recovery Advanced User’s Guide to familiarize yourself with the internals of the Recovery Manager.

Page 116: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 7CLI-based RMAN Backups and Restores

116

2. From the prompt, generate a “Run Block” as follows:run {allocate channel c1 device type SBT_TAPE;backup tablespace USERS;release channel c1;}

The commands shown above are the minimum required to perform a CLI-based backup. The Oracle APM provides several additional parameters that can be used to set different options for a CLI backup job. The sections that follow provide a description of these parameters.

7.0.2.b Additional Parameters: The “format” ClauseThe format clause specifies the pattern to use in creating a filename for the backup pieces or image copies it creates. The Oracle APM provides additional parameters that can be used as variables along with the format clause. These three variables allow you to specify three parameters for a backup job:

Server NameTarget SetAdvanced Options Set

Figure 7-1:The correct

placement ofthe “format”command in

the syntax of arun block

The “format” clause is used within a run block and is specified immediately after the “backup” command in the syntax (the order of the remaining commands within the Run Block remains the same). Specific variables are included with this clause, each following a designated sequence (e.g., “<Variable_1>”, “<Variable_2>” and “<Variable_3>”). Each corresponds to specific NetVault and RMAN values, and all are outlined in the following table. Ensure that each variable in the command is separated by a colon (“:”).

Variable Description<Variable_1> NetVault Server Name - The NetVault name of the machine

from which you will run the backup job. This is a required value.

Page 117: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

117

7.0.2.c Additional Parameters: The “send” and “PARMS” ClausesThe parameters described in this section can be used either with the SEND or the PARMS commands to set up the NetVault:Backup options for a backup job run from the command line. This section describes how the send and the PARMS clauses work.

The “send” Clause - The parameters specified with the “send” clause are applied to a specific job. send ‘<Variable>=<Value>';

An example is shown below:run { allocate channel ch1 type sbt send 'NV_TARGET_MEDIA=Mid' }run { allocate channel ch2 }

In this example, the command “NV_TARGET_MEDIA” will affect only to the SBT Channel “ch1”

<Variable_2> The Target Set Name - Specify a Target Set created for use with Oracle RMAN backups, in order to target a specific device during backup. Leave this option if you want to use NetVault’s default setting of “Any Device”. This option will override the Target Set specified in the Configure window.

<Variable_3> The Advanced Options Set Name - Specify an Advanced Options Set created for use with Oracle RMAN backups. Leave this option if you want to use NetVault’s default Advanced Options settings. This option will override the Advanced Options Set specified in the Configure window.

“%d_%s_%t” These values pertain to unique RMAN identifiers (i.e., they are Oracle environmental variables).

%d - Specifies the name of the database%s - Specifies the backup set number. This number is a counter in the Control File that is incremented for each backup set. The counter value starts at one and is unique for the life time of the Control File. If you restore a backup Control File, then duplicate values can result. Also, the command, “CREATE CONTROLFILE” initializes the counter back to one.%t - Specifies the backup set time stamp, which is a 4-byte value derived as the number of seconds elapsed since a fixed reference time. The combination of this variable and the “%t” variable can be used to form a unique name for the backup set.

Variable Description

Page 118: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 7CLI-based RMAN Backups and Restores

118

The “PARMS” Clause - The parameters specified with the “PARMS” clause are applied to all the jobs run from the Oracle instance.PARMS=“ENV=(<Variable>=<Value>)”

An example is shown below:run { allocate channel ch1 type sbt PARMS=“ENV=(NV_TARGET_MEDIA=Mid)” }run { allocate channel ch2 }

In this example, the command “NV_TARGET_MEDIA” will affect the SBT Channel “ch1”and any other channels set in the other Run Blocks.

Figure 7-23:An example of

the properplacement in

the Run Blockfor both the“Send” and

“PARMS”clauses

Variables Available with the “send”/”PARMS” ClausesA description of the variables available for use with the “send” and “PARMS” clauses is given in the table below:

Proper placement of the “send” clause in the syntax of a Run Block.

Proper placement of the “PARMS” clause in the syntax of a Run Block.

Variable DescriptionNV_AUTO_LABEL_MEDIA

This variable can be used to automatically label and use any blank media when no other media is available for the job. The permissible values are:

TrueFalse

Example:send ‘NV_AUTO_LABEL_MEDIA=TRUE’;PARMS=“ENV=(NV_AUTO_LABEL_MEDIA=TRUE)”;

NV_BACKUP_SERVER This variable is intended for use with the PARMS clause in order to establish the default NetVault Server for an entire Oracle instance. Example:PARMS=“ENV=(NV_BACKUP_SERVER=NVSERVER)”

Page 119: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

119

NV_BACKUP_LIFE This variable can be used to control exactly how long a backup will exist or “live” on its target media. The permissible values are:

count {full | days | weeks | years}The parameters within curly braces are optional. Count followed by full determines the number of generations the backup will be kept. This is the default parameter (i.e., if nothing is specified with count, the number of backup generations is considered for the backup life). Days, weeks, or years represents the number of days, weeks or years that the backup will be kept before it is discarded.Example:send ‘NV_BACKUP_LIFE=2’;PARMS=“ENV=(NV_BACKUP_LIFE=2)”;

NV_GROUP_LABEL This variable can be used to select a specific group of media based on its group label. This variable must be used in conjunction with the “NV_TARGET_MEDIA” variable, otherwise it will have no effect.Example:send ‘NV_TARGET_MEDIA=Group Label, NV_GROUP_LABEL=Group_2’;PARMS=“ENV=(NV_TARGET_MEDIA=Group Label,NV_GROUP_LABEL=Group_2)”;

NV_JOB_TITLE This variable can be used to assign a title to the job. It is recommended that this variable only be used with the “send” command on a per job basis (i.e., to avoid the chance of all future jobs being labeled with this Job Title, when applied with the PARMS clause).Example:send ‘NV_JOB_TITLE=Backup_1’;

NV_MID_LABEL This variable can be used to select a specific piece of media based on its media label. This variable must be used in conjunction with the “NV_TARGET_MEDIA” variable, otherwise it will have no effect.Example:send ‘NV_TARGET_MEDIA=Mid, NV_MID_LABEL=Media_1’;PARMS=“ENV=(NV_TARGET_MEDIA=Mid,NV_MID_LABEL=Media_1)”

Variable Description

Page 120: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 7CLI-based RMAN Backups and Restores

120

NV_NETWORK_COMPRESSION

This variable can be used to compress the backup data before it is transferred over the network (i.e., in the same manner as the Advanced Options tab’s “Network Compression” option. The permissible values are:

TrueFalse

Example:send ‘NV_NETWORK_COMPRESSION=True’;PARMS=“ENV=(NV_NETWORK_COMPRESSION=False)”;

NV_POSTSCRIPT This variable can be used to run a script after completion of a backup job. The script to be run must be saved in the “...\netvault\scripts” sub-directory on the Oracle Database Server (i.e., where “...” refers to the complete path to the installation of NetVault).Example:send ‘NV_POSTSCRIPT=C:\NetVault\scripts\p2.txt’;PARMS=“ENV=(NV_POSTSCRIPT=p2.txt)”;

NV_PRESCRIPT This variable can be used to run a script before a backup job. The script to be run must be saved in the “...\netvault\scripts” sub-directory on the Oracle Database Server (i.e., where “...” refers to the complete path to the installation of NetVault).Example:send ‘NV_PRESCRIPT=C:\NetVault\scripts\p1.txt’;PARMS=“ENV=(NV_PRESCRIPT=p1.txt)”;

NV_RESET_ENV_PARMS

This variable is used to reset the Oracle environment after the PARMS clause has been used in the Run Block.Example:send ‘NV_RESET_ENV_PARMS=TRUE’PARMS=“ENV=(NV_RESET_ENV_PARMS=TRUE)”

NV_VERIFICATION This variable can be used for verification of the completion of a backup job. The permissible values are:

TrueFalse

If set to True, the data transfer will be checked and a job message will be added to the NetVault Job log stating “Backup job has verified successfully.”Example:send ‘NV_VERIFICATION=TRUE’;PARMS=“ENV=(NV_VERIFICATION=TRUE)”;

Variable Description

Page 121: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

121

Resetting the RMAN Environment

Once the “PARMS” clause has been used, either of the following lines of syntax can be used in order to reset the RMAN environment:send ‘NV_RESET_ENV_PARMS=TRUE’PARMS=“ENV=(NV_RESET_ENV_PARMS=TRUE)”

NV_REUSE_MEDIA This variable can be used in order to set a specific media as reusable. The permissible values are:

NeverAnyWith same group label as target media

If the value for this parameter is set as Never, no media marked for re-use will be used for the backup. With the parameter set as Any, any media previously marked for re-use will be considered for the backup. And if it is set as With same group label as the target media, any media containing the group label specified, that has been previously marked for re-use will be considered for the backup.Example:send ‘NV_REUSE_MEDIA=Any’;PARMS=“ENV=(NV_REUSE_MEDIA=Any)”;

NV_TARGET_MEDIA This variable can be used to set the media in the targeted device. The permissible values are:

Any not in a group - To target any media that does not have a Group Label assigned to itAny - To target any available mediaMid - To target a specific piece of media based on its media label (in which case the NV_MID_LABEL variable will have to accompany this variable, and the desired piece of media must be named)Group Label - To target the media within a specific group based on its Group Label (in which case the NV_GROUP_LABEL variable will have to accompany this variable, and the desired Group Label must be named)

Example:send ‘NV_TARGET_MEDIA=Any’;PARMS=“ENV=(NV_TARGET_MEDIA=Mid, NV_MID_LABEL=Media_1)”;

Variable Description

Page 122: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Chapter 7CLI-based RMAN Backups and Restores

122

7.0.3 Performing CLI-based RestoresThis form of restore is performed using the RMAN CLI Utility. Through this utility, you can perform restores of backups, regardless of how they were created (i.e., either through the Oracle APM GUI, or from the command line). Refer to the Oracle® Database Backup and Recovery Backup and Recovery Reference Guide for more information on the RMAN commands.

Important: Even though this form of restore is initiated locally from a terminal session on the Oracle database server, job progress can be monitored from the Job Management or Status windows on the NetVault:Backup GUI. However, this applies only to data restores from the media contained in devices controlled by the NetVault:Backup Server.

Page 123: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s Guide

S E C T I O N 2 :

Appendix

Page 124: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

abc

Page 125: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s Guide

Appendix A:

A.0.0 - An Overview of Oracle Real Application Clusters ......................... 127

A.1.0 - About this Appendix ...................................................................................... 127A.2.0 - Recommended Additional Reading........................................................ 128A.3.0 - Deployment Overview................................................................................... 128A.4.0 - Licensing ............................................................................................................. 130A.5.0 - Installation ......................................................................................................... 131

• A.5.1 - Required RAC Configuration ................................................................................. 131• A.5.2 - Pre-Requisites ...................................................................................................... 133

- A.5.2.a - Enabling Control File Autobackup in a RAC Environment ...................................... 133• A.5.3 - Installation Process............................................................................................... 134• A.5.4 - Post-Installation Requirements for RAC Environments .......................................... 135

A.6.0 - Configuration..................................................................................................... 136• A.6.1 - Configuring Default Attributes............................................................................... 136• A.6.2 - Determining the Local Oracle SID and Home Directory in a RAC Environment ....... 137• A.6.3 - Adding a Database to the Oracle APM ................................................................... 138

A.7.0 - Backup.................................................................................................................. 139• A.7.1 - Performing Backups after Node Failure ................................................................. 140

A.8.0 - Restore ................................................................................................................. 140• A.8.1 - Types of RMAN Recovery Available in a RAC Environment .................................... 141

- A.8.1.a - Recovering Whole Database to Same RAC Environment ...................................... 141- A.8.1.b - Restoring SPFILE in a RAC Environment ............................................................ 143- A.8.1.c - Restoring Control Files in a RAC Environment ..................................................... 145- A.8.1.d - Performing Disaster Recovery in a RAC Environment........................................... 147- A.8.1.e - Performing Restores after Node Failure .............................................................. 150

Oracle APM and Oracle Real ApplicationClusters

Page 126: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

126

Page 127: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

127

A.0.0 An Overview of Oracle Real Application ClustersOracle Corporation defines Oracle's Real Application Clusters (RAC) option as "support for the transparent deployment of a single database across a cluster of servers, providing fault tolerance from hardware failures or planned outages. Oracle RAC running on clusters provides Oracle's highest level of capability in terms of availability, scalability, and low-cost computing. Oracle RAC supports mainstream business applications of all kinds. This includes OLTP, DSS, and Oracle's unique ability to effectively support mixed OLTP/DSS environments. This also includes popular packaged products such as SAP, PeopleSoft, Siebel, and Oracle E*Business Suite, as well as custom applications."

The Oracle APM v5.1 provides support for a limited number of Oracle versions and platforms in a RAC environment. The installation, configuration, backup and restore procedures differ in a multi-instance RAC environment. This section of the documentation is intended to offer specifics on how the Oracle APM operates in an Oracle RAC environment.

For a complete list of supported Oracle versions and platforms in a RAC environment refer to the NetVault: Backup Supported APM and Plugin matrix available at:

http://www.bakbone.com/support/product_documentation/

A.1.0 About this AppendixThis section of the guide is designed to point out any differences between the setup and usage of the Oracle APM in a multi-instance RAC environment vs. a single instance or traditional non-RAC environment. It is broken down in sections to mirror the sections found in the standard instructions, as follows:

Deployment OverviewLicensingInstallationConfigurationBackupRestore

Important: Unless outlined in the sections that follow, backups and restores performed with the Oracle APM for multi-instance RAC databases are the same as those performed with single instance databases.

Page 128: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

128

A.2.0 Recommended Additional ReadingIt is recommended that the following Oracle RAC documentation be readily available for reference when setting up, and while using the Oracle APM in a RAC environment.

Oracle® Clusterware and Oracle Real Application Clusters Administration and Deployment Guide

Overview of Oracle Real Application Clusters Management ToolsStarting and Stopping Instances and Oracle Real Application Clusters DatabasesOracle Clusterware Command-Line ReferenceOracle 10.2http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/toc.htmOracle 10.1 http://download.oracle.com/docs/cd/B14117_01/rac.101/b10765/toc.htm

Oracle® Database Administrator's GuideUsing Automatic Storage ManagementOracle 10.2http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/storeman.htm#g1040709 Oracle 10.1http://download.oracle.com/docs/cd/B14117_01/server.101/b10739/toc.htm

Oracle® Database Utilities ASM Command Line Utility

Oracle 10.2http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/asm_util.htm#SUTIL016 Oracle 10.1 http://download.oracle.com/docs/cd/B14117_01/server.101/b10825/toc.htm

A.3.0 Deployment OverviewDeploying the Oracle APM in a multi-instance database environment is almost identical to a single-instance database environment except that RMAN based backups are the only available backup method for RAC databases. The Oracle APM is installed on one of the nodes which host one of the instances for the RAC enabled database. All RMAN based backups and restores are performed from this

Page 129: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

129

single installation of the Oracle APM. The following section details how the Oracle APM performs RMAN backups and restores in a RAC environment.

Oracle APM RMAN Backup Process for RAC Environment

1. User defines backup job in NetVault: Backup Console2. NetVault: Backup APM for Oracle converts job definition into corresponding

RMAN backup commands3. RMAN executes backup commands which read data from Oracle database

datafiles4. RMAN uses Oracle Media Management API to store backup on backup

device managed by NetVault: Backup Server5. RMAN stores backup metadata in recovery catalog repository

NetVault: Backup Console

NetVault: Backup Server

NetVault: Backup APM for Oracle

NetVault: Backup Administrator Workstation

NetVault: Backup Server

Oracle RAC Node 2

Recovery Manager

Oracle Media Management API

1

Recovery Catalog Database

Recovery Catalog Server

4

Backup Media

Oracle RAC Node 1 Oracle RAC Node 3

54

ASMShared Storage

PROD Instance 1

PROD Instance 2

PROD Instance 3

2

SPFILEControl Files

Datafi lesLog Files

Archive Log Files

3

PRODDatabase

Page 130: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

130

Oracle APM RMAN Restore Process for RAC Environment

1. User defines restore job in NetVault: Backup Console2. NetVault: Backup APM for Oracle converts job definition into corresponding

RMAN restore and recovery commands3. RMAN reads backup metadata from recovery catalog repository4. RMAN uses Oracle Media Management API to read backup from backup

device managed by NetVault: Backup Server5. RMAN restores datafiles to Oracle server and recovers database

A.4.0 LicensingLicensing of the Oracle APM in a single-instance, or non-RAC environment, differs from the licensing of the Oracle APM in a multi-instance or RAC environment.

In a single-instance environment, one (1) Edition Based Oracle APM license provides the ability to backup and recover an unlimited number of Oracle databases that reside on a single database server.

In a multi-instance or RAC environment, one (1) RAC Database Based Oracle APM license allows the customer to backup and recover a single database within the single RAC environment no matter the number of instances or nodes that

NetVault: Backup Console

NetVault: Backup Server

NetVault: Backup APM for Oracle

NetVault: Backup Administrator Workstation

NetVault: Backup ServerOracle RAC Node 2

Recovery Manager

Oracle Media Management API

1

Recovery Catalog Database

Recovery Catalog Server

Backup Media

Oracle RAC Node 1 Oracle RAC Node 3

ASMShared Storage

PROD Instance 1

PROD Instance 2

PROD Instance 3

2

SPFILEControl Files

Datafi lesLog Files

Archive Log Files

45

3

4

PRODDatabase

Page 131: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

131

reside in the RAC environment. If the customer has five (5) databases residing in the single RAC environment, they will be required to purchase five (5) RAC Database Based Oracle APM licenses, etc.

Each RAC environment will need its own licensing. For example, if the production RAC environment has five (5) databases and the test RAC environment has one (1) database, five (5) RAC Database Based Oracle APM licenses would be required for the production RAC environment and one (1) RAC Database Based Oracle APM license would be required for the test RAC environment.

Visit http://www.bakbone.com/productlicensing to request permanent RAC Database Based Oracle APM license keys.

A.5.0 Installation

A.5.1 Required RAC ConfigurationThe Oracle APM's support for multi-instance RAC databases is limited to environments that meet the following criteria:

Version of Oracle and Platform is listed a Supporting RAC environment in the NetVault: Backup Supported APM and Plugin Products matrix available at:

http://www.bakbone.com/support/product_documentation/Oracle Clusterware is used as the Cluster SoftwareDatafiles, Control Files, SPFILE, Log Files, and Archive Log Files are stored on Shared StorageAutomated Storage Management (ASM) Filesystem is used for Shared StorageRecovery Catalog Database is the highly recommended location for the RMAN RepositorySingle or Multiple RAC databases within the same RAC environment is supported

Figure A-1 and Figure A-2 provide an overview of supported single and multiple RAC database deployments.

Page 132: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

132

Figure A-1:

SupportedSingle

DatabaseDeployments

Figure A-2:Supported

MultipleDatabase

Deployments

Oracle RAC Node 2

Recovery Catalog Database

Recovery Catalog Server

Oracle RAC Node 1 Oracle RAC Node 3

ASMShared Storage

Clusterware Clusterware Clusterware

SPFILEControl Files

Datafi lesLog Files

Archive Log Files

CRMDatabase

CRM Instance 3CRM Instance 2CRM Instance 1

Oracle RAC Node 2

Recovery Catalog Database

Recovery Catalog Server

Oracle RAC Node 1 Oracle RAC Node 3

ASMShared Storage

SPFILEControl Files

Datafi lesLog Files

Archive Log Files

CRMDatabase

CRM Instance 3

HR Instance 3

CRM Instance 2

HR Instance 2

CRM Instance 1

HR Instance 1

HRDatabase

Clusterware ClusterwareClusterware

Page 133: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

133

A.5.2 Pre-RequisitesThe following pre-requisites must be met before it is possible to install the Oracle APM in a RAC environment:

Oracle RAC Environment in Place - You must have a properly configured Oracle RAC environment that matches the configuration as specified in Required RAC Configuration on page 131.Separate NetVault: Backup Server Machine - The machine that is to serve as the NetVault: Backup Server must be properly configured and it must exist outside the Oracle RAC environment, but have network connectivity to the nodes/hosts within the RAC environment.Separate Recovery Catalog Server - It is highly recommended that the RMAN repository be stored in a Recovery Catalog database on a server outside the Oracle RAC environment. Refer to Creating the RMAN Repository of Chapter 3 on page 35 for more information.Other Pre-Installation Requirements - In addition to the above RAC specific requirements, you must meet the non-RAC specific pre-installation requirements that are specified Pre-installation Requirements of Chapter 3 on page 33.

A.5.2.a Enabling Control File Autobackup in a RAC EnvironmentControl File Autobackups are required in a RAC environment. Refer to Control File Backup Types of Chapter 2 on page 27 for more information on Control File Autobackups.

You can turn the autobackup feature on for multi-instance RAC databases by executing the following commands from the RMAN command line utility on the node where the Oracle APM will be installed:

1. After making sure the Recovery Catalog database is open, connect RMAN to the target database and Recovery Catalog database. For example, issue the following commands to connect to the catalog database:> rman TARGET / CATALOG rman/<password>@<connect_identifier for catalog>

2. Configure the default device type to SBT_TAPE.CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';

3. Configure parallelism for the default device type.CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 1;

4. Assign the channel for Control File Autobackups.

Important: For single-instance RAC databases, refer to Enabling Control File Autobackup of Chapter 3 on page 34 for more information.

Page 134: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

134

CONFIGURE CHANNEL 1 DEVICE TYPE ‘SBT_TAPE’ CONNECT ‘SYS/<password>@<connect_identifier for local instance>’;

5. Enable Control File Autobackups.CONFIGURE CONTROLFILE AUTOBACKUP ON;

6. Confirm Control File Autobackups are enabled by reviewing the RMAN configuration settings:SHOW ALL;

A.5.3 Installation ProcessInstalling the Oracle APM in a multi-instance database environment is almost identical to a single-instance database environment. The Oracle APM is installed on one of the nodes which host one of the instances for the RAC enabled database. All RMAN based backups and restores are performed from this single installation of the Oracle APM. Installing the Oracle APM is a two step process:

1. Install the NetVault: Backup Client SoftwareDuring the Installation of the NetVault: Backup Client Software on the selected node of the RAC environment, a name that represents the entire RAC environment should be specified as the NetVault Machine Name versus the machine name of the selected node. For example, if the machine name for the node where the NetVault: Backup Client Software is being installed is called RAC_NODE_1, RAC_NODE_1 should NOT be specified as the NetVault Machine Name; it should be a generic or virtual name that represents the entire RAC environment such as PROD_RAC.

Important: If the Oracle APM is relocated to a different node or the SYS password is altered, this process must be re-executed from node where the Oracle APM is installed to ensure that the Control File Autobackups are successfully completed.

Page 135: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

135

2. Install the Oracle APMFigure A-3:

Right-click toinstall the

Oracle APMon the node of

the RACenvironment.

Once the NetVault: Backup Client Software has been installed on the selected node of the RAC environment, the Oracle APM will need to be installed. The process is identical to installing the Oracle APM for a single instance database environment except that Oracle APM shall be installed on the NetVault: Backup Client that corresponds with the generic or virtual name provided as the NetVault Machine Name during the NetVault: Backup Client Software installation.

A.5.4 Post-Installation Requirements for RAC EnvironmentsYou must execute the nvpluginaccess utility on the NetVault: Backup Server and obtain the necessary security clearance for the Oracle APM to perform backup and restores. For single-instance RAC databases, refer to Post-installation Requirements for RMAN Method of Chapter 3 on page 39 for more information.

The nvpluginaccess tool is available in the ".../netvault/util" directory on the NetVault: Backup Server. Run this utility as detailed below:

1. Initiate a command line session and navigate to the .../netvault/util (where "..." represents the path to the NetVault: Backup Server installation directory):

2. Run the following commands at the prompt:nvpluginaccess -remove -client <NetVault Machine Name>

(where <NetVault Machine Name> is the NetVault Machine Name that was specified during the installation of the NetVault: Backup Client Software to represent the entire RAC environment)nvpluginaccess -client <NetVault Machine Name> -account <NetVault username> -password <user password>

(where <NetVault Machine Name> is the NetVault Machine Name that was specified during the installation of the NetVault: Backup Client Software to represent the entire RAC environment)

Important: Failure to perform these post-installation steps will cause RMAN Control File Autobackups to hang which typically result in job abortion. Subsequent backup jobs will encounter ORA-00230: operation disallowed: snapshot control file enqueue unavailable errors. Refer to Troubleshooting/Support of Appendix D on page 163 for more information on resolving snapshot control file enqueue unavailable errors.

Page 136: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

136

An example is shown below:nvpluginaccess -client PROD_RAC -account Default

1. A list of available plugin(s) will be displayed. Enter the number corresponding to the Oracle APM (Oracle RMAN Plugin) and press Enter.

2. If you did not specify a password, you will be prompted for a password. Press Enter to specify a blank password if you have not modified the password for the Default NetVault: Backup User.

3. A confirmation message will be displayed stating that access has been granted for the specified client.

Figure A-4:Run

nvpluginaccess from thecommand

prompt

Verify that the nvpluginaccess utility has been correctly configured by reviewing the contents of the hookplugs.cfg file located in …/netvault/config directory (where "..." represents the path to the NetVault: Backup Server installation directory).

The following entry in the hookplugs.cfg corresponds to the above example:[PROD_RAC]Plugins=Oracle Rman!,Oracle Rman APMAccount=DefaultPassword=

A.6.0 ConfigurationConfiguring the Oracle APM in a multi-instance RAC environment is almost identical as configuring the Oracle APM in a single-instance non-RAC environment except for the following differences:

A.6.1 Configuring Default AttributesNetVault Server - (Required for RMAN Backups in a RAC Environment) - Specify the name of the NetVault: Backup Server where the nvpluginaccess utility was executed to grant security access to the NetVault Machine name where the Oracle APM is installed. Do Restores from NetVault Server (Required for RMAN Backups in a RAC Environment) - Specify the name of the NetVault: Backup Server

Important: Specify the account name as Default if you have not configured any NetVault users. Leave the password option blank if no password has been set.

Page 137: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

137

where the nvpluginaccess utility was executed to grant security access to the NetVault Machine name where the Oracle APM is installed.CLI Backup Target Set - (Required for RMAN Backups in a RAC Environment) - Specify the name of the Backup Target Set that was specified in the Defining Default Backup Target Set for RMAN Backups of Chapter 4 on page 45

Figure A-5:Default

Attributes forthe Oracle

APM in a RACEnvironment

A.6.2 Determining the Local Oracle SID and Home Directory in a RAC EnvironmentIn a multi-instance RAC environment, the local SID and Oracle Home can be determined with the srvctl database config commands as detailed in the following the steps below:

1. From a terminal window connect as the Oracle Software Owner to the node where Oracle APM is installed.

2. Execute the following command: SRVCTL STATUS DATABASE

3. A list of the all the databases in the RAC environment will be displayed.

Page 138: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

138

4. Execute the following command where <database_name> represents the database that is currently being added to the Oracle APM:srvctl status database -d <database_name>

5. The name of the node, local Oracle SID, and local Oracle Home will be displayed for each node in the RAC environment in the format: <node> <local Oracle SID> <local Oracle Home>

In Figure A-6, if the Oracle APM is being installed on the faro node, the local Oracle SID is o10rac3 and the local Oracle Home is /home/o10g/db.

Figure A-6:Run srvctl from

the commandline

A.6.3 Adding a Database to the Oracle APMAdding a multi-instance database in the Oracle APM is almost identical to adding a single-instance non-RAC database except for the following differences:

Oracle SID - Enter the local SID for the target RAC database. The local SID is the instance name for the target RAC database on the node where the Oracle APM is installed.Parameter File(s) Path - In a multi-instance RAC environment, the Oracle APM requires the usage of a server parameter file (SPFILE) as dynamic means of maintaining initialization parameters. The SPFILE must be stored on the shared storage in ASM. The SPFILE is included in the Control File Autobackups, therefore, this field should be left blank in a RAC environment.

Refer to Configuring the Oracle APM of Chapter 4 on page 45 for more information.

Page 139: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

139

Figure A-7:RAC Database

Configurationfor the Oracle

APM.

A.7.0 BackupRMAN based backups are the only supported backup method for multi-instance RAC databases. RMAN is RAC aware in that it automatically identifies that a database is multi-instance RAC database and backups the selected data accordingly.

With the Oracle APM installed on one of the nodes that hosts one of the instances for the RAC enabled database, all RMAN based backups and restores are performed from this single installation of the Oracle APM.

The Parameter File node will not be selectable in the Backup Selection tab.

Refer to Performing RMAN Backups of Chapter 5 on page 69 for more information on Selecting Data for Backup, Setting Backup Options, and Finalizing and Submitting the Job.

Page 140: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

140

A.7.1 Performing Backups after Node FailureIf the node where the Oracle APM is installed in the RAC environment experiences a node failure and the node is or will be unavailable at the time of the next scheduled backup, the Oracle APM needs to be relocated to an alternate node in the RAC environment. Relocating the Oracle APM is a two step process:

1. Install the NetVault: Backup Client Software on Alternate NodeInstall the NetVault: Backup Client Software on an alternate node in the RAC environment. During the installation process, be sure to use the same NetVault Machine Name that was used during the installation of the NetVault: Backup Client Software on the original node. For example, if PROD_RAC was the NetVault Machine Name specified during the installation of the original node, PROD_RAC should be used as the NetVault Machine Name on the alternate node.

2. Install the Oracle APMOnce the NetVault: Backup Client Software has been installed on the selected node of the RAC environment, the Oracle APM will need to be installed. The process is identical to installing the Oracle APM for a single instance non RAC environment except that Oracle APM will be installed on the NetVault: Backup Client that corresponds with the generic or virtual name provided as the NetVault Machine Name during the NetVault: Backup Client Software installation.

With the Oracle APM installed on the alternate node, update the following fields in the Database Configuration window. Refer to Editing Database Information of Chapter 4 on page 59 for more information.

Oracle SID - Enter the local SID for the target RAC database. The local SID is the instance name for the target RAC database on the node where the Oracle APM has been relocated.

Refer to Performing RMAN Backups of Chapter 5 on page 69 for more information on Selecting Data for Backup, Setting Backup Options, and Finalizing and Submitting the Job.

A.8.0 RestoreRMAN is RAC aware in that it automatically identifies that a database is multi-instance RAC database and restores the selected data accordingly.

Important: If the relocation of the Oracle APM is expected to be permanent or last longer than 45 days, email [email protected] to request a relocation of the RAC Database Based Oracle APM license keys.

Page 141: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

141

With the Oracle APM installed on one of the nodes that hosts one of the instances for the RAC enabled database, all RMAN based restores are performed from this single installation of the Oracle APM. Refer to Performing RMAN Restores of Chapter 6 on page 98 for more information on Preparing Database for Recovery, Selecting Data Items for a Restore, Setting Restore Options, Finalizing and Submitting the Job, and Opening Database for Use.

A.8.1 Types of RMAN Recovery Available in a RAC Environment

A.8.1.a Recovering Whole Database to Same RAC Environment This type of recovery is performed when the current Control File and SPFILE are intact but all the datafiles are damaged or lost. You will be able to perform complete recovery or recover the database to a specific point-in-time. Following is an overview of the process to recover the whole database in a RAC environment.

1. From a terminal window connect as the Oracle Software Owner to the node where Oracle APM is installed.

2. Set ORACLE_SID environment variable to local instance.export ORACLE_SID = <local_SID>

3. Start SQL*Plus and connect with administrator privileges to the local instance. SQLPLUS SYS AS SYSDBA

4. Shutdown the local instance.SHUTDOWN ABORT;

5. Startup the local instance with the nomount option.STARTUP FORCE NOMOUNT;

6. Disable cluster_database initialization parameter for the local instance.ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE SID='<local_SID>';

7. Shutdown the local instance.SHUTDOWN ABORT;

8. Exit SQL*Plus.9. Shutdown all RAC instances.

> srvctl STOP DATABASE -d <database_name> -o abort

10.Ensure all RAC instances are shutdown.

Important: If the Oracle APM was relocated to an alternate node and backups were performed from multiple instances, use the current Oracle SID when selecting data in the Restore Selections Tab.

Page 142: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

142

>srvctl STATUS DATABASE -d <database_name>

11.Start SQL*Plus and connect with administrator privileges to the local instance. SQLPLUS SYS AS SYSDBA

12.In SQL*Plus, start the local instance with the MOUNT option.STARTUP MOUNT;

13.In the Oracle APM Restore Selections window, find the latest available backup that included ALL the tablespaces and select the Whole Database node.

14.In the Restore Options window: a. Select the Check Read-Only Datafiles and Restore if Necessary and

the Check Read-Only Datafiles and Recover if Not Current to include read-only datafiles in the restore and recovery process. The read-only files will be included only if they are needed for the complete recovery. If they are not damaged, RMAN will omit them.

b. Select the Delete Archived Logs No Longer Needed option to delete the restored archived logs that Oracle itself deems are no longer necessary.

c. To perform recovery on the database, i.e., reconstruct the database up to the current or specified point-in-time; select one of the following options in the Perform Recovery window:

Perform Complete Recovery - Recovers the database to the current time, i.e., last committed transaction available in the archived and online redo logs.Perform Database Point-in-Time Recovery - Recovers the database to a specific point-in- time whether it is a specific time, log sequence number, or SCN.

d. Select the Use Catalog option in the Recovery Catalog tab and specify the Recovery Catalog connection details.

15.Complete the Schedule, Target Client and Advanced Options, and submit the job. RMAN will automatically choose the best available full, incremental, or archived log backups and restore and recover the database.

16.From a terminal window connect as the Oracle Software Owner to the node where Oracle APM is installed.

17.Start SQL*Plus and connect with administrator privileges to the local instance. SQLPLUS SYS AS SYSDBA

18.Enable cluster_database initialization parameter for the local instance.ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=SPFILE SID='<local_SID>';

Page 143: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

143

19.Shutdown the local instance.SHUTDOWN ABORT;

20.Exit SQL*Plus21.Startup all RAC instances.

>srvctl START DATABASE -d <database_name>

22.Start up all RAC Services.>srvctl START SERVICE -d <database_name>

23.Ensure all RAC instances are running.>srvctl STATUS DATABASE -d <database_name>

A.8.1.b Restoring SPFILE in a RAC EnvironmentSince Control File Autobackups are a pre-requisite in a multi-instance RAC environment, the SPFILE is backed up with the Control File whenever an autobackup is performed. The SPFILE is restored from the autobackup to the default location with the detailed steps below. If the instance is already started with the server parameter file, you cannot overwrite the existing server parameter file. Refer to Restoring the Server Parameter File (SPFILE) from Backup section in Oracle® Database Backup and Recovery Basics for details on restoring a SPFILE to a non-default location.

1. From a terminal window connect as the Oracle Software Owner to the node where Oracle APM is installed.

2. Set ORACLE_SID environment variable to local instance.export ORACLE_SID = <local_SID>

3. Start SQL*Plus and connect with administrator privileges to the local instance. SQLPLUS SYS AS SYSDBA

4. Shutdown the local instance.SHUTDOWN ABORT;

5. Startup the local instance with the nomount option.STARTUP FORCE NOMOUNT;

6. Disable cluster_database initialization parameter for the local instance.ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE SID='<local_SID>';

7. Shutdown the local instance.

Important: After completing a restore of the Whole Database, it is highly recommended that a Full or Incremental Level 0 backup with the entire database selected in the Backup Selections tab be performed.

Page 144: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

144

SHUTDOWN ABORT;

8. Exit SQL*Plus.9. Shutdown all RAC instances.

>srvctl STOP DATABASE -d <database_name> -o abort

10.Ensure all RAC instances are shutdown.>srvctl STATUS DATABASE -d <database_name>

11.Start RMAN and connect to the target database and Recovery Catalog.>rman TARGET / CATALOG rman/<password>@<connect_identifier for catalog>

12.Startup the local instance with the FORCE NOMOUNT option.STARTUP FORCE NOMOUNT;

13.Set the database identifier for the target database with SET DBID. RMAN displays the DBID whenever you connect to the target. You can also obtain it by inspecting saved RMAN log files, querying the Catalog, or looking at the filenames of Control File autobackup. SET DBID <DBID>;

14.Restore the SPFILE Autobackup. If restoring the SPFILE to the default location execute: RUN {ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';RESTORE SPFILE FROM AUTOBACKUP;}

15.Startup the instance with the FORCE option.STARTUP FORCE;

16.Exit RMAN.17.Start SQL*Plus and connect with administrator privileges to the local

instance. SQLPLUS SYS AS SYSDBA

18.Enable cluster_database initialization parameter for the local instance.ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=SPFILE SID='<local_SID>';

19.Shutdown the local instance.SHUTDOWN ABORT;

20.Exit SQL*Plus21.Startup all RAC instances.

>srvctl START DATABASE -d <database_name>

22.Start up all RAC Services.

Page 145: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

145

>srvctl START SERVICE -d <database_name>

23.Ensure all RAC instances are running.>srvctl STATUS DATABASE -d <database_name>

A.8.1.c Restoring Control Files in a RAC EnvironmentRestoring the Control File should only be performed in the following cases:

All current copies of the control file have been lost due to a media failure, accidental user deletion or have become corrupted and are not usable Oracle Customer Support has advised that a Control File restore is required

Since Control File Autobackups are a pre-requisite in a multi-instance RAC environment, the Control Files are restored from the Autobackup with the detailed steps below.

1. From a terminal window connect as the Oracle Software Owner to the node where Oracle APM is installed.

2. Set ORACLE_SID environment variable to local instance.export ORACLE_SID = <local_SID>

3. Start SQL*Plus and connect with administrator privileges to the local instance. SQLPLUS SYS AS SYSDBA

4. Shutdown the local instance.SHUTDOWN ABORT;

5. Startup the local instance with the nomount option.STARTUP FORCE NOMOUNT;

6. Disable cluster_database initialization parameter for the local instance.ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE SID='<local_SID>';

7. Shutdown the local instance.SHUTDOWN ABORT;

8. Exit SQL*Plus.9. Shutdown all RAC instances.

>srvctl STOP DATABASE -d <database_name> -o abort

10.Ensure all RAC instances are shutdown.>srvctl STATUS DATABASE -d <database_name>

11.Start RMAN and connect to the target database.>rman TARGET /

12.Startup the local instance with the FORCE NOMOUNT option.STARTUP FORCE NOMOUNT;

Page 146: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

146

13.Set the database identifier for the target database with SET DBID. RMAN displays the DBID whenever you connect to the target. You can also obtain it by inspecting saved RMAN log files, querying the Catalog, or looking at the filenames of Control File autobackup. SET DBID <DBID>;

14.Restore the Control File Autobackup. If restoring the Control File from the last autobackup execute: RUN {ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';RESTORE CONTROLFILE FROM AUTOBACKUP;ALTER DATABASE MOUNT;RESTORE DATABASE;RECOVER DATABASE;}

15.Open the database with the RESETLOGS option.ALTER DATABASE OPEN RESETLOGS;

16.Exit RMAN.17.Start SQL*Plus and connect with administrator privileges to the local

instance.SQLPLUS SYS AS SYSDBA

18.Enable cluster_database initialization parameter for the local instance.ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=SPFILE SID='<local_SID>';

19.Shutdown the local instance.SHUTDOWN ABORT;

20.Exit SQL*Plus21.Startup all RAC instances.

>srvctl START DATABASE -d <database_name>

22.Start up all RAC Services.>srvctl START SERVICE -d <database_name>

23.Ensure all RAC instances are running.>srvctl STATUS DATABASE -d <database_name>

Important: After restoring a Control File from an autobackup, it is highly recommended that a Full or Incremental Level 0 backup with the entire database selected in the Backup Selections tab be performed.

Page 147: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

147

A.8.1.d Performing Disaster Recovery in a RAC EnvironmentDisaster recovery includes the restore and recovery of a multi-instance RAC database after a complete media failure of all the shared storage including the current control files, all online redo log files, and all parameter files and the Recovery Catalog. To perform a disaster recovery, the minimum required set of backups including the backups of all the datafiles, some archived redo logs generated after the time of the backup, and at least one autobackup of the control file.

If your goal is to create a new copy of your target database for ongoing use on a standby RAC environment or independent RAC environment these procedures should not be used. RMAN's DUPLICATE command should be used. The DUPLICATE command assigns a new DBID to the duplicate database it creates, allowing it to be registered in the same recovery catalog as the original target database. Future releases of the Oracle APM will provide support for RMAN's Duplicate Database functionality through the GUI.

The following procedure details the steps to perform a disaster recovery to the same RAC environment where the source database previously resided. This procedure would be utilized in the scenario in which a complete media failure of the shared storage occurred and the damaged shared storage was rebuilt using the same configuration or a new shared storage was configured imitating the original shared storage's configuration.

For variations to the Disaster Recovery procedure below, refer to Performing Disaster Recovery section in Oracle® Database Backup and Recovery Advanced User's Guide for more information.

Pre-Requisites

To perform a disaster recovery without a Recovery Catalog, the following requirements must be met:

Oracle RAC Environment in Place - You must have a properly configured Oracle RAC environment that matches the configuration as specified Performing User Managed Backups of Chapter 5 on page 65. In addition, the

Important: When performing a test recovery ensure that you do not connect to the Recovery Catalog during datafile restoration. Otherwise, RMAN will record information about the restored datafiles to the recovery catalog. This interferes with future attempts to restore and recover the primary database. If you must use a recovery catalog because the control file is not large enough to contain the RMAN repository data on all of the backups that you need to restore, then export the catalog and import it into a different schema or database and use the copied recovery catalog for the test restore. Otherwise, the catalog considers the restored database as the current target database.

Page 148: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

148

same version of the Oracle database software must be installed in the RAC environment as it existed on the damaged RAC environment. The ORACLE_HOME should be identical on both the original and new node. You do not have to create the database but you do need to configure Oracle Net Services and Automated Storage Management for shared storage.NetVault: Backup Software and the Oracle APM Installed - The same version of NetVault: Backup software and the Oracle APM must be installed on one of the nodes in the RAC using the same NetVault Machine Name as previously defined for the RAC environment. Ensure the Oracle APM default attributes are defined as specified in Configuring Default Attributes on page 136. When adding the RAC Database to the Oracle APM, ensure that the Use Catalog for RMAN Based Backups and Restores is disabled.DBID of the Source Database Identified - Identify the DBID of the damaged database. If the DBID was not recorded as part of the initial Oracle APM installation, the DBID can be obtained by examining the NetVault: Backup binary logs for RMAN based backups of the source database.Default Location for SPFILE must Exist - Default location in the ASM Shared Storage must exist before executing the steps below. Failure to ensure that the default location already exists will result in an ORA-17502 Failed to create file error during the SPFILE restore.Backups of All Tablespaces Made Available - Make sure that you have the latest backups of all the tablespaces.

Disaster Recovery Procedure

1. Start RMAN and connect to the target database.> rman TARGET /

2. Set the database identifier for the target database with SET DBID. RMAN displays the DBID whenever you connect to the target. You can also obtain it by inspecting saved RMAN log files, querying the Catalog, or looking at the filenames of Control File autobackup. SET DBID <DBID>;

3. Startup the local instance with the FORCE NOMOUNT option.STARTUP FORCE NOMOUNT;

4. Restore the SPFILE autobackup. If restoring the SPFILE to the default location, execute: RUN {ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';RESTORE SPFILE FROM AUTOBACKUP;}

Page 149: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

149

5. Startup the local instance with the FORCE NOMOUNT option.STARTUP FORCE NOMOUNT;

6. Restore the Control File Autobackup. If restoring the Control File from the last autobackup execute: RUN {ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE';RESTORE CONTROLFILE FROM AUTOBACKUP;}

7. Mount the database:ALTER DATABASE MOUNT;

8. Disable Block Change Tracking.SQL "ALTER DATABASE DISABLE BLOCK CHANGE TRACKING";

9. In the Oracle APM Restore Selections window, navigate to the source NetVault: Backup Client and database, and find the latest available backup that included ALL the tablespaces and select the Whole Database node.

10.In the Restore Options window:a. Select the Check Read-Only Datafiles and Restore if Necessary and the

Check Read-Only Datafiles and Recover if Not Current to include read-only datafiles in the restore and recovery process.

b. Recovery must be performed in a disaster recovery scenario. In the Perform Recovery tab, select the Perform Database Point-in-Time Recovery option. Point-in-time recovery recovers the database to a specific time, log sequence number or SCN. If the specific time or log sequence of the failure is not known, it is recommended that the SCN option be utilized.

c. Disable the Use Catalog in the Recovery Catalog window.

11.Complete the Schedule, Target Client and Advanced Options and submit the job.

12.RMAN will automatically choose the best available full, incremental, or archived log backups and restore and recover the database.

13.In RMAN, Enable Block Change Tracking.SQL "ALTER DATABASE ENABLE BLOCK CHANGE TRACKING";

14.Update the RMAN metadata.CROSSCHECK ARCHIVELOG ALL;

Important: To ensure that the Recovery Catalog is not used for this restore, the Use Catalog for RMAN Based Backups and Restores must also be disabled in the Database Configuration window.

Page 150: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

150

15.Exit RMAN.16.Startup all RAC instances.

>srvctl START DATABASE -d <database_name>

17.Start up all RAC Services.>srvctl START SERVICE -d <database_name>

18.Ensure all RAC instances are running.>srvctl STATUS DATABASE -d <database_name>

A.8.1.e Performing Restores after Node FailureIf the multi-instance RAC database experiences a media failure or data corruption simultaneously with a node failure of the node where the Oracle APM is installed, the Oracle APM must be relocated to an alternate node in the RAC environment in order to perform an RMAN based restore and recovery. Relocating the Oracle APM is a two step process:

1. Install the NetVault: Backup Client Software on Alternate NodeInstall the NetVault: Backup Client Software on an alternate node in the RAC environment. During the installation process, be sure to use the same NetVault Machine Name that was used during the installation of the NetVault: Backup Client Software on the original node. For example, if PROD_RAC was the NetVault Machine Name specified during the installation of the original node, PROD_RAC should be used as the NetVault Machine Name on the alternate node.

2. Install the Oracle APMOnce the NetVault: Backup Client Software has been installed on the selected node of the RAC environment, the Oracle APM will need to be installed. The process is identical to installing the Oracle APM for a single instance database environment except that Oracle APM shall be installed on the NetVault: Backup Client that corresponds with the generic or virtual name provided as the NetVault Machine Name during the NetVault: Backup Client Software installation.

Important: After completing a disaster recovery, it is highly recommended that a Full or Incremental Level 0 backup with the entire database selected in the Backup Selections tab be performed.

Important: If the relocation of the Oracle APM is expected to be permanent or last longer than 45 days, email [email protected] to request a relocation of the RAC Database Based Oracle APM license keys.

Page 151: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

151

With the Oracle APM installed on the alternate node, the restore process will be similar to performing restores in a single-instance non-RAC environment except for the following two differences:

During the Selecting Data Items for a Restore phase of performing RMAN restores, select the backup set from the node in the Restore Selections tab where the Oracle SID equals the Oracle SID of the instance where the Oracle APM was originally installed immediately before the relocation.During the Setting Restore Options phase, set the Target Database Authentication Details to the appropriate values for the local instance on the alternate node where the Oracle APM now resides. Refer to the Setting Target Database Authentication Details (ONLY if Changed Since Backup) of Chapter 6 on page 107 for more information.

Refer to Performing RMAN Restores of Chapter 6 on page 98 for complete details on Preparing Database for Recovery, Selecting Data Items for a Restore, Setting Restore Options, Finalizing and Submitting the Job, and Opening Database for Use.

Page 152: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix AOracle APM and Oracle Real Application Clusters

152

Page 153: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s Guide

Appendix B:

B.0.0 - Glossary............................................................................................................... 155

Glossary

Page 154: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix BGlossary

154

Page 155: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

155

B.0.0 GlossaryAutomated Storage Management (ASM)Integrated file system and volume manager expressly built for Oracle database files.

backup pieceA backup file generated by RMAN. Backup pieces are written in a proprietary format that can only be created or restored by RMAN and are stored in a logical container called a backup set.

backup setA backup of one or more datafiles, control files, SPFILE and archived redo log files. Each backup set consists of one or more binary files called backup pieces. By default, a backup set consists of only one backup piece.

complete recoveryComplete Recovery recovers the database to the most recent time without the loss of any committed transactions. Typically, you perform complete recovery when media failure damages one or more datafiles or control files.

cumulative incremental backupAn incremental backup that backs up all the blocks changed since the most recent backup at level 0. When recovering with cumulative incremental backups, only the most recent cumulative incremental backup needs to be applied.

database point-in-time recovery (DBPITR)The recovery of an entire database to a specified past target time, SCN, or log sequence number.

DBIDAn internal, uniquely generated number that differentiates databases. Oracle creates this number automatically when you create the database. The DBID is needed during disaster recovery scenarios.

differential incremental backupA type of incremental backup that backs up all blocks that have changed since the most recent backup at level 1 or level 0. Differential backups are the default type of incremental backup. When recovering using differential incremental backups, the Oracle APM must apply all differential incremental level 1 backups since the restored tablespace backup.

instanceA combination of background processes and memory buffers.

Page 156: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix BGlossary

156

log sequence number (LSN)A number that uniquely identifies a set of redo records in a redo log file. When Oracle fills one online redo log file and switches to a different one, Oracle automatically assigns the new file a log sequence number.

Oracle ClusterwareA portable cluster management solution that is integrated with the Oracle database.

parallelismAllocating multiple channels for simultaneous RMAN backup and recovery operations. Allows a single job to read or write multiple backup sets in parallel. The number of channels should be less than or equal (<=) to the number of drives for the backup devices.

Real Application Clusters (RAC)Support for the transparent deployment of a single database across a cluster of servers, providing fault tolerance from hardware failures or planned outages.

recoveryTo recover a datafile (also called performing recovery on a datafile), is to take a restored copy of the datafile and apply to it changes recorded in the database's archived and online redo logs. Often the term Recovery is used to encompass both the Restore and Recovery processes.

Recovery Manager (RMAN)RMAN is the preferred utility for backup and recovery of Oracle databases. RMAN backups provide maximum reliability while providing the most flexibility when defining a backup strategy. Support for the full range of backup types and options available with Oracle's RMAN tool are provided along with the ability to perform a number of recovery scenarios with less reliance on human interaction and DBA expertise.

RMAN also reduces the administration work associated with your backup strategy by maintaining an extensive record of metadata about backups, archived logs, and its own activities, known as the RMAN repository. In restore operations, RMAN will use this information to eliminate the need to identify backup files for use in restores in most situations.

Page 157: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

157

resetlogsA method for opening a database, which is required after incomplete recovery or recovery with a backup control file. OPEN RESETLOGS resets the log sequence number to 1, and clears the online redo logs.

Backups from before the OPEN RESETLOGS operation remain valid and can be used along with backups taken after the OPEN RESETLOGS operation to repair any damage to the database.

restoreTo restore a datafile or control file from backup is to retrieve the file onto disk from a backup location on tape, disk or other media, and make it available to the database server.

system change number (SCN)A stamp that defines a committed version of a database at a point in time. Oracle assigns every committed transaction a unique SCN.

System Global Area (SGA)A memory region within main memory used to store data for fast access.

user managed backup methodWith this backup method, the files that make up the database are fundamentally backed up and restored with a mixture of host operating system commands and SQL*Plus backup and recovery-related capabilities.

Page 158: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix BGlossary

158

Page 159: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s Guide

Appendix C:

C.0.0 - The About Window ......................................................................................... 161

The About Window

Page 160: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix CThe About Window

160

Page 161: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

161

C.0.0 The About WindowThe About window shows you the software version and the license serial number. You can access this window from the Backup Selections tab. The steps are given below:

Figure C-1:The OracleAPM About

window

1. From the GUI on the NetVault:Backup Server, open the Backup window (via either of the buttons offered in the command toolbars, or by using the Backup command in the Operations pull-down menu). A list of machines added as NetVault:Backup Clients will be displayed in the Selections tab.

2. Locate the Client configured as the Oracle database server, and open it to display a list of APMs/plugins installed on the machine.

3. Locate the Oracle APM in the list and right-click on it.

4. Select About from the pop-up menu.5. To close this window, click on OK.

Page 162: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix CThe About Window

162

Page 163: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

User’s Guide

Appendix D:

D.0.0 - Troubleshooting ............................................................................................... 165

D.1.0 - Technical Support........................................................................................... 167

Troubleshooting/Support

Page 164: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix DTroubleshooting/Support

164

Page 165: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

165

D.0.0 TroubleshootingThe following table describes commonly encountered problems and possible solutions. In cases where an error occurs and it is not described in this table, view the job log to extract the Oracle Database error number and then refer to the relevant Oracle documentation for the resolution.

D.0.1 Backup Fails

D.0.2 Backup Job HangsProblem:There is a lock on the control file and a backup job hangs at log output: "Log Message: Starting Control File and SPFILE Autobackup at <date>". Or this job is aborted and a subsequent backup job completes with an error message in the log of the job: "ORA-00230: operation disallowed: snapshot control file enqueue unavailable".

Possible Causes:1. The Oracle APM has not been properly configured, i.e. the "NetVault

Server" field has not been set in the Oracle APM Configure window; (Backup window > Right Click "Oracle APM").

Error ExplanationFailed to Connect to Database or ORA-01034: Oracle in not available

Oracle instance specified in the Oracle SID field in the Database Configuration window must be in an open state. The instance must be in an open state in order to perform backup.

ORA-01031: insufficient privileges on Oracle Backup error

User name specified in the Oracle SYS-DBA User Name in the Database Configu-ration window must have SYSDBA privileges or be included in the Oracle Password File, or be a member of the ORA_DBA operating system group.

ORA-01123: Cannot start online backup; media recovery not enabled

Oracle instance is not running in ARCHIVELOG mode as specified in Pre-installation Requirements of Chapter 3 on page 33

Failed to backup all data If the SYSDBA password has been changed on the Oracle server, it must be updated in the Oracle APM Database Con-figuration. Refer to Resetting Authentication Details of Chapter 4 on page 60

Page 166: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix DTroubleshooting/Support

166

2. Control File Autobackup has been enabled without proper configuration of the Oracle APM.

Resolution:1. Abort the hung backup job.2. Remove the lock on the Control File.

a. Start SQL*Plus and connect with administrator privileges to the local instance.SQLPLUS SYS AS SYSDBA

b. Verify there is a lock on the Control File and obtain the offending SID with the following query:SELECT s.SID, USERNAME AS "User" FROM V$SESSION s,V$ENQUEUE_LOCK l WHERE l.SID = s.SID AND l.TYPE = 'CF' AND l.ID1 = 0 AND l.ID2 = 2;

Figure D-1:Verify andobtain the

offending SIDfrom SQL*Plus

In Figure D-1, the offending SID is 133.c. Obtain the Process ID (SPID) that matches the SID with the following

query:SELECT s.sid,p.spid FROM v$process p, v$session s WHERE p.addr = s.paddr order by s.sid;

Figure D-2:Obtain the

Process ID(SPID) from

SQL*Plus

In Figure D-2, the offending SPID is 3184

Page 167: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

NetVault®: BackupUser’s Guide

167

d. Exit SQL*Plus and stop the Process in the OS shell:Kill -9 <spid>

Figure D-3:Stop the

offendingprocess in the

OS shell.

3. Ensure that Post-installation Requirements for RMAN as defined in Post-installation Requirements for RMAN Method of Chapter 3 on page 39 have been executed. After executing these commands, ensure that the NetVault: Server and Do Restore from NetVault Server are defined in the Default Attributes as detailed in Configuring Default Attributes of Chapter 4 on page 46.

D.0.3 Restore Fails

D.1.0 Technical SupportBakBone Software is dedicated to providing friendly, expert advice to NetVault customers. Our highly trained professionals are available to answer your questions, offer solutions to your problems and generally help you make the most of your NetVault purchase. Log on to our web site for more information.

http://www.bakbone.com/supportportal

Error ExplanationORA-27007: failed to open file The Post Installation Requirements for

RMAN as defined in Post-installation Requirements for RMAN Method of Chapter 3 on page 39 have not been executed. After executing these commands, ensure that NetVault: Server and Do Restore from NetVault Server settings are defined as detailed in Configuring Default Attributes of Chapter 4 on page 46.

ORA-19511: Error received from media manager, error text: SBT error=7011, errno=1, sbtopen: system error

ORA-27012: Read from file failed

ORA-19511: Error received from media manager layer, error text: SBT error= 7063, errno = 0, sbtread: i/o error

Page 168: Redefining Data Protection - dellsw.jp · • RMAN Recovery Catalog Maintenance ... Through an intuitive GUI and automated workflow process, ... enough to account for a large number

Appendix DTroubleshooting/Support

168