HP A.06.11 User Manual

HP Data Protector A.06.11

Integration guide for Oracle and SAP

B6960-90158
Part number: B6960-90158 First edition: September 2009
Legal and notice information
© Copyright 2004, 2009 Hewlett-Packard Development Company, L.P.
Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.
The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
Intel®, Itanium®, Pentium®, Intel Inside®, and the Intel Inside logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
Microsoft®, Windows®, Windows XP®, and Windows NT® are U.S. registered trademarks of Microsoft Corporation.
Adobe and Acrobat are trademarks of Adobe Systems Incorporated.
Java is a US trademark of Sun Microsystems, Inc.
Oracle® is a registered US trademark of Oracle Corporation, Redwood City, California.
UNIX® is a registered trademark of The Open Group.
Printed in the US
Contents
Publication history .............................................................. 13
About this guide ................................................................. 15
Intended audience ............................................................................................. 15
Documentation set ............................................................................................. 15
Guides ...................................................................................................... 15
Online Help ............................................................................................... 18
Documentation map .................................................................................... 19
Abbreviations ...................................................................................... 19
Map ................................................................................................... 20
Integrations ......................................................................................... 21
Document conventions and symbols ..................................................................... 23
Data Protector graphical user interface ................................................................. 24
General information .......................................................................................... 25
HP technical support .......................................................................................... 25
Subscription service ........................................................................................... 26
HP websites ...................................................................................................... 26
Documentation feedback .................................................................................... 26
1 Integrating Oracle and Data Protector ................................ 27
Introduction ...................................................................................................... 27
Integration concepts .......................................................................................... 28
Configuring the integration ................................................................................. 33
Prerequisites ............................................................................................... 33
Limitations .................................................................................................. 34
Before you begin ........................................................................................ 35
Cluster-aware clients .................................................................................... 35
Linking Oracle Server with the Data Protector MML ......................................... 36
Linking on HP OpenVMS systems ........................................................... 36
Configuring Oracle user accounts ................................................................. 37
Configuring Oracle operating system user accounts .................................. 37
Configuring Oracle database users accounts ........................................... 39
Configuring user accounts on HP OpenVMS ............................................ 39
Integration guide for Oracle and SAP 3
Configuring Oracle databases ...................................................................... 41
Using the Data Protector GUI ................................................................. 42
Using the Data Protector CLI .................................................................. 45
Checking the configuration .......................................................................... 53
Using the Data Protector GUI ................................................................. 53
Using the Data Protector CLI .................................................................. 53
Setting environmental variables ..................................................................... 55
Using the Data Protector GUI ................................................................. 55
Using the Data Protector CLI .................................................................. 56
Backup ............................................................................................................ 57
Creating new templates ............................................................................... 57
Creating backup specifications ..................................................................... 58
Examples of pre-exec and post-exec scripts on UNIX ................................. 69
Editing the Oracle RMAN script .................................................................... 70
Creating copies of backed up objects ............................................................ 73
Testing the integration ................................................................................. 74
Testing using the Data Protector GUI ....................................................... 75
Testing using the CLI ............................................................................. 76
Starting backup sessions .............................................................................. 77
Scheduling backup specifications ........................................................... 81
Running an interactive backup ................................................................ 82
Starting Oracle backup using RMAN ...................................................... 85
Restore ............................................................................................................. 94
Prerequisites ............................................................................................... 96
Restoring Oracle using the Data Protector GUI ................................................ 96
Restoring database items in a disaster recovery ........................................ 96
Changing the database state ................................................................. 97
Restoring the recovery catalog database ................................................. 97
Restoring the control file ...................................................................... 100
Restoring Oracle database objects ........................................................ 102
Restoring tablespaces and datafiles ...................................................... 108
Restoring and recovering an Oracle database in Oracle Data Guard
environment ............................................................................................. 109
Restoring and recovering a primary database ........................................ 109
Restoring and recovering a standby database ........................................ 109
Duplicating an Oracle database ................................................................. 110
Restore, recovery, and duplicate options ...................................................... 114
Restore action options ......................................................................... 114
General options ................................................................................. 114
Duplicate options ............................................................................... 115
Restore and recovery options ............................................................... 116
Restoring Oracle using RMAN .................................................................... 118
Preparing the Oracle database for restore ............................................. 118
4
Connection strings used in the examples ................................................ 120
SBT_LIBRARY parameter ...................................................................... 121
Example of full database restore and recovery ....................................... 121
Example of point-in-time restore ............................................................ 122
Example of tablespace restore and recovery .......................................... 124
Example of datafile restore and recovery ............................................... 126
Example of archive log restore ............................................................. 129
Example of database restore using a different device (with the automatic
device selection functionality disabled) .................................................. 130
Restoring using another device ................................................................... 131
Disaster recovery ...................................................................................... 132
Monitoring sessions ......................................................................................... 132
Monitoring current sessions ........................................................................ 132
Viewing previous sessions .......................................................................... 133
Resuming sessions ........................................................................................... 134
Using the Data Protector GUI ...................................................................... 136
Using the Data Protector CLI ....................................................................... 137
Aborting sessions ............................................................................................ 138
Oracle RMAN metadata and Data Protector Media Management Database
synchronization ............................................................................................... 138
Troubleshooting ............................................................................................... 139
Before you begin ...................................................................................... 139
Checks and verifications ............................................................................ 140
Problems .................................................................................................. 147
2 Integrating SAP R/3 and Data Protector ........................... 153
Introduction .................................................................................................... 153
Integration concepts ........................................................................................ 154
Backup flow ............................................................................................. 158
Restore flow ............................................................................................. 160
Data Protector SAP R/3 configuration file ........................................................... 160
Setting, retrieving, listing, and deleting Data Protector SAP R/3 configuration file
parameters using the CLI ............................................................................ 163
Configuring the integration ............................................................................... 166
Prerequisites ............................................................................................. 167
Before you begin ...................................................................................... 167
Cluster-aware clients .................................................................................. 168
Configuring user accounts .......................................................................... 168
Checking the connection ............................................................................ 169
Authentication password file ....................................................................... 170
Enabling archived logging ......................................................................... 170
Linking Oracle Server with the Data Protector MML ....................................... 172
Integration guide for Oracle and SAP 5
Choosing authentication mode ................................................................... 173
Configuring SAP R/3 databases ................................................................. 173
Before you begin ................................................................................ 174
Using the Data Protector GUI ............................................................... 174
Using the Data Protector CLI ................................................................ 177
Checking the configuration ........................................................................ 179
Using the Data Protector GUI ............................................................... 179
Using the Data Protector CLI ................................................................ 180
Backup .......................................................................................................... 181
Considerations ........................................................................................ 183
Creating backup specifications ................................................................... 183
Modifying backup specifications ................................................................. 190
Scheduling backup specifications ................................................................ 190
Scheduling example ........................................................................... 190
Previewing backup sessions ........................................................................ 191
Using the Data Protector GUI ............................................................... 191
Using the Data Protector CLI ................................................................ 191
What happens during the preview? ...................................................... 192
Starting backup sessions ............................................................................ 192
Backup methods ................................................................................. 192
Using the Data Protector GUI ............................................................... 192
Using the Data Protector CLI ................................................................ 193
Using the SAP BRTOOLS ..................................................................... 193
Backing up using Oracle Recovery Manager ................................................ 194
Manual balancing .................................................................................... 195
Restore ........................................................................................................... 196
Considerations ......................................................................................... 196
Restoring using the Data Protector GUI ........................................................ 197
Restoring using the Data Protector CLI .......................................................... 200
Restoring using the SAP commands ............................................................. 201
Restoring using another device ................................................................... 201
Using the Data Protector GUI ............................................................... 201
Using the Data Protector CLI or SAP commands ...................................... 202
Localized SAP R/3 objects ......................................................................... 202
Sparse files .............................................................................................. 203
Disaster recovery ...................................................................................... 203
Restoring the control file ...................................................................... 203
Monitoring sessions ......................................................................................... 204
Troubleshooting ............................................................................................... 204
Before you begin ...................................................................................... 204
General troubleshooting ............................................................................ 205
Troubleshooting on Windows systems .......................................................... 205
Prerequisites concerning the Oracle side of the integration ....................... 205
6
Prerequisites on the SAP side of the integration ....................................... 208
Configuration problems ....................................................................... 209
Backup problems ................................................................................ 212
Restore problems ................................................................................ 214
Troubleshooting on UNIX systems ................................................................ 217
Prerequisites concerning the Oracle side of the integration ....................... 217
Prerequisites on the SAP side of the integration ....................................... 221
Configuration problems ....................................................................... 223
Backup problems ................................................................................ 224
Restore problems ................................................................................ 228
3 Integrating SAP DB/MaxDB and Data Protector ................ 233
Introduction .................................................................................................... 233
Integration concepts ........................................................................................ 234
Backup flow ............................................................................................. 236
Restore flow ............................................................................................. 236
Configuring the integration ............................................................................... 237
Prerequisites ............................................................................................. 237
Limitations ................................................................................................ 237
Before you begin ...................................................................................... 237
Cluster-aware clients .................................................................................. 238
Configuring SAP DB/MaxDB users .............................................................. 238
Configuring SAP DB/MaxDB instances ........................................................ 238
Before you begin ................................................................................ 239
Using the Data Protector GUI ............................................................... 239
Using the Data Protector CLI ................................................................ 241
Handling errors .................................................................................. 243
Checking the configuration ........................................................................ 243
Using the Data Protector GUI ............................................................... 243
Using the Data Protector CLI ................................................................ 243
Backup .......................................................................................................... 244
Creating backup specifications ................................................................... 244
Modifying backup specifications ................................................................. 247
Scheduling backup specifications ................................................................ 247
Scheduling example ........................................................................... 248
Previewing backup sessions ........................................................................ 248
Using the Data Protector GUI ............................................................... 249
Using the Data Protector CLI ................................................................ 249
What happens during the preview? ...................................................... 249
Starting backup sessions ............................................................................ 250
Backup methods ................................................................................. 250
Using the Data Protector GUI ............................................................... 250
Integration guide for Oracle and SAP 7
Using the Data Protector CLI ................................................................ 250
Using SAP DB/MaxDB utilities ............................................................. 251
Restore ........................................................................................................... 255
Restore and recovery overview .................................................................... 255
Before you begin ...................................................................................... 259
Restoring using the Data Protector GUI ........................................................ 259
Restoring using the Data Protector CLI .......................................................... 262
Restoring using SAP DB/MaxDB utilities ....................................................... 263
SAP DB/MaxDB restore and recovery ................................................... 264
SAP DB/MaxDB migration .................................................................. 269
Finding information for restore .................................................................... 269
SAP DB/MaxDB restore options .................................................................. 269
Restoring using another device ................................................................... 274
Monitoring sessions ......................................................................................... 274
Troubleshooting ............................................................................................... 274
Before you begin ...................................................................................... 274
Problems .................................................................................................. 275
SAP DB/MaxDB cluster-related troubleshooting ............................................. 278
Glossary ......................................................................... 279
Index .............................................................................. 337
8
Figures
Data Protector graphical user interface ............................................... 251
Data Protector Oracle integration concept ........................................... 322
Finding the Oracle user .................................................................... 373
Configuring Oracle - General (Windows) ........................................... 424
Configuring Oracle - General (UNIX) ................................................. 425
Configuring Oracle - Primary ............................................................ 436
Configuring Oracle - Catalog ............................................................ 447
Configuring Oracle - Standby ............................................................ 448
Keeping parameters in an XLS file ...................................................... 509
Keeping parameters in a CSV file ...................................................... 5010
Encoding a password ...................................................................... 5111
Setting environmental variables ......................................................... 5612
Specifying an Oracle Server system (UNIX) ......................................... 6213
Selecting backup objects .................................................................. 6414
Oracle specific options ..................................................................... 6615
Saving the backup specification ......................................................... 6716
Previewing a backup ........................................................................ 7617
Scheduling backups ......................................................................... 8218
Starting an interactive backup ........................................................... 8419
Taking the Oracle resource group offline ............................................ 9520
Checking properties ......................................................................... 9521
Recovery catalog settings dialog ....................................................... 9922
Source page ................................................................................. 10323
Options page ............................................................................... 10624
Integration guide for Oracle and SAP 9
Devices page ................................................................................ 10725
Oracle duplicate options ................................................................ 11326
Resuming a session ........................................................................ 13727
Checking the status of the Oracle listener ......................................... 14128
SAP R/3 architecture ..................................................................... 15529
SAP R/3 architecture: backint mode ................................................. 15630
SAP R/3 architecture: RMAN mode ................................................. 15831
Specifying an SAP R/3 system and Oracle instance ........................... 17532
Configuring an SAP R/3 database on a UNIX system (operating system
33
authentication mode) ..................................................................... 176
Configuring an SAP R/3 database on a Windows system (database
34
authentication mode) ..................................................................... 177
Checking the SAP R/3 configuration ................................................ 18035
Selecting backup objects ................................................................ 18636
Application specific options ............................................................ 18737
Scheduling backups ....................................................................... 19138
Selecting objects for restore ............................................................ 19839
10
Selecting the target client ................................................................ 19940
Checking the status of the Oracle listener .......................................... 20741
Checking the Inet start-up parameters ............................................... 21142
SAP DB integration architecture ....................................................... 23543
Specifying an SAP DB/MaxDB instance ........................................... 24044
SAP DB/MaxDB configuration ........................................................ 24145
Selecting SAP DB/MaxDB objects ................................................... 24546
Application specific options ............................................................ 24647
Scheduling the backup specification ................................................. 24848
SAP DB/MaxDB restore process ...................................................... 25849
SAP DB/MaxDB archive logs restore process—redo logs details .......... 25850
Selecting objects for restore ............................................................ 26051
Properties for data ......................................................................... 26152
SAP DB/MaxDB restore and recovery options ................................... 27053
Integration guide for Oracle and SAP 11
Tables
Edition history ................................................................................. 131
Document conventions ...................................................................... 232
Oracle database user accounts ......................................................... 393
Oracle database configuration parameters ......................................... 484
Environmental variables .................................................................... 555
Oracle backup options ..................................................................... 686
MML filenames on different platforms ................................................. 887
Required database states .................................................................. 978
Backup types ................................................................................ 1539
SAP backup and restore utilities ....................................................... 15410
Backup types ................................................................................ 18111
What is backed up ........................................................................ 18112
Two alternatives of specifying backup options .................................... 18213
Backup templates .......................................................................... 18414
12
SAP R/3 backup options ................................................................ 18815
Backup types ................................................................................ 23316
What is backed up ........................................................................ 24417
SAP DB/MaxDB backup options ..................................................... 24718

Publication history

Guide updates may be issued between editions to correct errors or document product changes. To ensure that you receive updated or new editions, subscribe to the appropriate product support service. See your HP sales representative for details.
Table 1 Edition history
ProductGuide editionPart number
Data Protector Release A.05.50October 2004B6960-90109
Data Protector Release A.06.00July 2006B6960-96008
Data Protector Release A.06.10November 2008B6960-96042
Data Protector Release A.06.11September 2009B6960-90158
Integration guide for Oracle and SAP 13
Publication history14

About this guide

This guide describes how to configure and use Data Protector with Oracle, SAP R/3, and SAP DB/MaxDB.

Intended audience

This guide is intended for backup administrators responsible for planning, setting up, and maintaining network backups. It assumes you are familiar with:
Basic Data Protector functionality
Database administration
Conceptual information can be found in the HP Data Protector concepts guide, which is recommended to fully understand the fundamentals and the model of Data Protector.

Documentation set

Other documents and online Help provide related information.

Guides

Data Protector guides are available in printed format and in PDF format. Install the PDF files during the Data Protector setup procedure by selecting the English Documentation & Help component on Windows or the OB2-DOCS component on UNIX. Once installed, the guides reside in the Data_Protector_home\docs directory on Windows and in the /opt/omni/doc/C directory on UNIX.
You can find these documents from the Manuals page of the HP Business Support Center website:
http://www.hp.com/support/manuals
In the Storage section, click Storage Software and then select your product.
HP Data Protector concepts guide
Integration guide for Oracle and SAP 15
This guide describes Data Protector concepts and provides background information
on how Data Protector works. It is intended to be used with the task-oriented
online Help.
HP Data Protector installation and licensing guide
This guide describes how to install the Data Protector software, taking into account the operating system and architecture of your environment. This guide also gives details on how to upgrade Data Protector, as well as how to obtain the proper licenses for your environment.
HP Data Protector troubleshooting guide
This guide describes how to troubleshoot problems you may encounter when using Data Protector.
HP Data Protector disaster recovery guide
This guide describes how to plan, prepare for, test and perform a disaster recovery.
HP Data Protector integration guides
These guides describe how to configure and use Data Protector to back up and restore various databases and applications. They are intended for backup administrators or operators. There are four guides:
HP Data Protector integration guide for Microsoft applications: SQL Server,
SharePoint Portal Server, Exchange Server, and Volume Shadow Copy Service
This guide describes the integrations of Data Protector with the following Microsoft applications: Microsoft Exchange Server, Microsoft SQL Server, and Volume Shadow Copy Service.
HP Data Protector integration guide for Oracle and SAP
This guide describes the integrations of Data Protector with Oracle, SAP R/3, and SAP DB/MaxDB.
HP Data Protector integration guide for IBM applications: Informix, DB2, and
Lotus Notes/Domino
This guide describes the integrations of Data Protector with the following IBM applications: Informix Server, IBM DB2, and Lotus Notes/Domino Server.
HP Data Protector integration guide for VMware Virtual Infrastructure, Sybase,
Network Node Manager, and Network Data Management Protocol Server
This guide describes the integrations of Data Protector with VMware Virtual Infrastructure, Sybase, Network Node Manager, Network Data Management Protocol Server, and Citrix XenServer.
HP Data Protector integration guide for HP Service Information Portal
About this guide16
This guide describes how to install, configure, and use the integration of Data Protector with HP Service Information Portal. It is intended for backup administrators. It discusses how to use the application for Data Protector service management.
HP Data Protector integration guide for HP Reporter
This manual describes how to install, configure, and use the integration of Data Protector with HP Reporter. It is intended for backup administrators. It discusses how to use the application for Data Protector service management.
HP Data Protector integration guide for HP Operations Manager for UNIX
This guide describes how to monitor and manage the health and performance of the Data Protector environment with HP Operations Manager and HP Service Navigator on UNIX.
HP Data Protector integration guide for HP Operations Manager for Windows
This guide describes how to monitor and manage the health and performance of the Data Protector environment with HP Operations Manager and HP Service Navigator on Windows.
HP Data Protector integration guide for HP Performance Manager and HP
Performance Agent
This guide provides information about how to monitor and manage the health and performance of the Data Protector environment with HP Performance Manager (PM) and HP Performance Agent (PA) on Windows, HP-UX, Solaris, and Linux.
HP Data Protector zero downtime backup concepts guide
This guide describes Data Protector zero downtime backup and instant recovery concepts and provides background information on how Data Protector works in a zero downtime backup environment. It is intended to be used with the task-oriented HP Data Protector zero downtime backup administrator's guide and the HP Data Protector zero downtime backup integration guide.
HP Data Protector zero downtime backup administrator's guide
This guide describes how to configure and use the integration of Data Protector with HP StorageWorks Virtual Array, HP StorageWorks Enterprise Virtual Array, EMC Symmetrix Remote Data Facility and TimeFinder, and HP StorageWorks Disk Array XP. It is intended for backup administrators or operators. It covers the zero downtime backup, instant recovery, and the restore of filesystems and disk images.
HP Data Protector zero downtime backup integration guide
This guide describes how to configure and use Data Protector to perform zero downtime backup, instant recovery, and standard restore of Oracle, SAP R/3, Microsoft Exchange Server, and Microsoft SQL Server databases. The guide also
Integration guide for Oracle and SAP 17
describes how to configure and use Data Protector to perform backup and restore using the Microsoft Volume Shadow Copy Service.
HP Data Protector MPE/iX system user guide
This guide describes how to configure MPE/iX clients and how to back up and restore MPE/iX data.
HP Data Protector Media Operations user guide
This guide provides tracking and management of offline storage media. It describes the tasks of installing and configuring the application, performing daily media operations and producing reports.
HP Data Protector product announcements, software notes, and references
This guide gives a description of new features of HP Data Protector A.06.11. It also provides information on installation requirements, required patches, and limitations, as well as known issues and workarounds.
HP Data Protector product announcements, software notes, and references for
integrations to HP Operations Manager, HP Reporter, HP Performance Manager, HP Performance Agent, and HP Service Information Portal
This guide fulfills a similar function for the listed integrations.
HP Data Protector Media Operations product announcements, software notes,
and references
This guide fulfills a similar function for Media Operations.
HP Data Protector command line interface reference
This guide describes the Data Protector command-line interface, command options and their usage as well as provides some basic command-line examples.

Online Help

Data Protector provides context-sensitive (F1) Help and Help Topics for Windows and UNIX platforms.
You can access the online Help from the top-level directory on the installation DVD-ROM without installing Data Protector:
Windows:
UNIX:
system through DP_help.htm.
Unzip DP_help.zip and open DP_help.chm.
Unpack the zipped tar file DP_help.tar.gz, and access the online Help
About this guide18

Documentation map

Abbreviations
Abbreviations in the documentation map that follows are explained below. The guide titles are all preceded by the words “HP Data Protector”.
GuideAbbreviation
Command line interface referenceCLI
Concepts guideConcepts
Disaster recovery guideDR
Getting started guideGS
Online HelpHelp
IG-IBM
IG-MS
IG-PM/PA
IG-Var
Integration guide for IBM applications: Informix, DB2, and Lotus Notes/Domino
Integration guide for Microsoft applications: SQL Server, SharePoint Portal Server, Exchange Server, and Volume Shadow Copy Service
Integration guide for Oracle and SAPIG-O/S
Integration guide for HP Operations Manager for UNIXIG-OMU
Integration guide for HP Operations Manager for WindowsIG-OMW
Integration guide for HP Performance Manager and HP Performance Agent
Integration guide for HP ReporterIG-Report
Integration guide for HP Service Information PortalIG-SIP
Integration guide for VMware Virtual Infrastructure, Sybase, Network Node Manager, Network Data Management Protocol Server, and Citrix XenServer.
Integration guide for Oracle and SAP 19
GuideAbbreviation
Installation and licensing guideInstall
Media Operations getting started guideMO GS
Map
MO RN
Media Operations product announcements, software notes, and references
Media Operations user guideMO UG
MPE/iX system user guideMPE/iX
Product announcements, software notes, and referencesPA
Troubleshooting guideTrouble
ZDB administrator's guideZDB Admin
ZDB concepts guideZDB Concept
ZDB integration guideZDB IG
The following table shows where to find information of different kinds. Shaded squares are a good place to look first.
About this guide20
Integrations
Look in these guides for details of the following integrations:
GuideIntegration
IG-OMU, IG-OMWHP Operations Manager for UNIX/for Windows
IG-PM/PAHP Performance Manager
IG-PM/PAHP Performance Agent
Integration guide for Oracle and SAP 21
GuideIntegration
IG-RHP Reporter
IG-SIPHP Service Information Portal
all ZDBHP StorageWorks Disk Array XP
all ZDBHP StorageWorks Enterprise Virtual Array (EVA)
all ZDBHP StorageWorks Virtual Array (VA)
IG-IBMIBM DB2 UDB
IG-IBMInformix
IG-IBMLotus Notes/Domino
MO UserMedia Operations
MPE/iXMPE/iX system
IG-MS, ZDB IGMicrosoft Exchange Server
IG-MSMicrosoft Exchange Single Mailbox
IG-MS, ZDB IGMicrosoft SQL Server
IG-MS, ZDB IGMicrosoft Volume Shadow Copy Service (VSS)
IG-VarNDMP Server
IG-VarNetwork Node Manager (NNM)
IG-O/SOracle
ZDB IGOracle ZDB
IG-O/SSAP DB
IG-O/S, ZDB IGSAP R/3
About this guide22

Document conventions and symbols

Table 2 Document conventions
ElementConvention
Cross-reference links and e-mail addressesBlue text: Table 2 on page 23
Website addressesBlue, underlined text: http://www.hp.com
Text emphasisItalic text
File and directory names
System output
Monospace text
Code
Commands, their arguments, and
argument values
GuideIntegration
IG-VarSybase
all ZDBEMC Symmetrix
IG-VarVMware
Monospace, italic text
Monospace, bold text
Code variables
Command variables
Emphasized monospace text
CAUTION:
Indicates that failure to follow directions could result in damage to equipment or data.
IMPORTANT:
Provides clarifying information or specific instructions.
Integration guide for Oracle and SAP 23
NOTE:
Provides additional information.
TIP:
Provides helpful hints and shortcuts.

Data Protector graphical user interface

Data Protector provides a cross-platform (Windows and UNIX) graphical user interface. You can use the original Data Protector GUI (Windows only) or the Data Protector Java GUI. For information about the Data Protector graphical user interface, see the online Help.
About this guide24
Figure 1 Data Protector graphical user interface

General information

General information about Data Protector can be found at http://www.hp.com/go/
dataprotector.

HP technical support

For worldwide technical support information, see the HP support website:
http://www.hp.com/support
Before contacting HP, collect the following information:
Product model names and numbers
Technical support registration number (if applicable)
Product serial numbers
Error messages
Operating system type and revision level
Detailed questions
Integration guide for Oracle and SAP 25

Subscription service

HP recommends that you register your product at the Subscriber's Choice for Business website:
http://www.hp.com/go/e-updates
After registering, you will receive e-mail notification of product enhancements, new driver versions, firmware updates, and other product resources.

HP websites

For additional information, see the following HP websites:
• http://www.hp.com
• http://www.hp.com/go/software
• http://www.hp.com/support/manuals
• http://h20230.www2.hp.com/selfsolve/manuals
• http://www.hp.com/support/downloads

Documentation feedback

HP welcomes your feedback.
To make comments and suggestions about product documentation, please send a message to DP.DocFeedback@hp.com. All submissions become the property of HP.
About this guide26

1 Integrating Oracle and Data Protector

Introduction

Data Protector offers offline as well as online backup of the Oracle Server instances. To enable database recovery from an online backup, the respective Oracle Server instance must operate in the ARCHIVELOG mode.
The online backup concept is widely accepted. It addresses the business requirements for high application availability, as opposed to the offline concept. During an online backup, a database remains available for use, while during an offline backup, the database cannot be used by an application.
Backup types
Using the Data Protector Oracle integration, you can perform the following types of backups:
Online backup of a whole database or parts of it
Online incremental backup (Oracle differential incremental backup 1 to 4)
Offline backup of a whole database
Backup of Archived Redo Logs only
Backup of the Oracle database recovery catalog
Backup of the Oracle control files
With Oracle 10g/11g, backup of recovery files residing in the flash recovery
area. The following recovery files in the flash recovery area are backed up:
• full and incremental backup sets
• control file autobackup (SPFILE included if used)
• archived redo logs
• datafile copies, control file copies
Integration guide for Oracle and SAP 27
Flashback logs, the current control file, and online redo logs are not backed up.
In Oracle Data Guard environment, backup of standby database.
Restore types
Using the Data Protector Oracle integration, you can restore the following:
The whole database or parts of it
The database to a specific point in time
From incremental backup
To a host other than the one where the database originally resided
A datafile to a location other than its original one
A catalog before restoring the database
From a chain of incremental backups
Duplicating a database
Using the Data Protector Oracle integration, you can perform duplication of a production database.

Integration concepts

The Data Protector Oracle integration links the Oracle database management software with Data Protector. From the Oracle point of view, Data Protector represents a media management software. On the other hand, the Oracle database management system can be seen as a data source for backup, using media controlled by Data Protector.
Components
The software components involved in backup and restore processes are:
The Oracle Recovery Manager (RMAN)
The Data Protector Oracle integration software
Integration functionality overview
The Data Protector Oracle Integration agent (ob2rman.pl) works with RMAN to manage all aspects of the following operations on the Oracle target database:
Backups (backup and copy)
Recovery (restore, recovery, and duplication)
Integrating Oracle and Data Protector28
How does the integration work?
Ob2rman.pl executes RMAN, which directs the Oracle server processes on the target database to perform backup, restore and recovery. RMAN maintains the required information about the target databases in the recovery catalog, the Oracle central repository of information, and in the control file of a particular target database.
The main information which ob2rman.pl provides to RMAN is:
Number of allocated RMAN channels
RMAN channel environment parameters
Information on the database objects to be backed up or restored
For backup, ob2rman.pl uses the Oracle target database views to get information on which logical (tablespaces) and physical (datafiles) target database objects are available for backup.
For restore, ob2rman.pl uses current control file or recovery catalog (if used) to get information on which objects are available for restore.
Using the Data Protector integration with RMAN, you can back up and restore the Oracle control files, datafiles, and Archived Redo Logs.
The interface from the Oracle server processes to Data Protector is provided by the Data Protector Oracle integration Media Management Library (MML), which is a set of routines that allows the reading and writing of data to General Media Agents.
Besides handling direct interaction with the media devices, Data Protector provides scheduling, media management, network backups, monitoring, and interactive backup.
Oracle backup types handled by the integration
Using this integration, you can perform the Oracle full and incremental (up to incremental level 4) backup types.
With Oracle full and incremental level 0 backups all data blocks per datafile are backed up. With Oracle incremental backup (level 1 or higher), only the data blocks that have changed since a previous backup are backed up.
The difference between a full backup and an incremental level 0 backup is that the incremental 0 is a base for subsequent incremental backups. Therefore, Data Protector always performs Oracle incremental 0 when you select the full backup type in a backup specification.
The full backup type is not related to the number of datafiles included in the backup, and can therefore be performed per single datafile. The data being backed up,
Integration guide for Oracle and SAP 29
regardless of the backup type (full or incremental), is selected and controlled by Oracle.
Oracle incremental backups can be differential or cumulative. By default, Data Protector performs Oracle differential incremental backups. By changing the default RMAN script created by Data Protector, you can specify also a cumulative backup. For information on differential and cumulative Oracle backups, see the Oracle Recovery Manager User’s Guide.
NOTE:
Regardless of the Oracle backup type specified, Data Protector always marks the Oracle backups as full in the Data Protector database, since the Data Protector incremental backup concept is different from the Oracle incremental backup concept.
A backup that includes all datafiles and current control file that belong to an Oracle Server instance is known as a whole database backup.
These features can be used for online or offline backup of the Oracle target database. However, you must ensure that the backup objects (such as tablespaces) are switched into the appropriate state before and after a backup session. For online backup, the database instance must operate in the ARCHIVELOG mode; whereas for offline backup, objects need to be prepared for backup using the Pre-exec and Post-exec options in the backup specification.
Backup flow
The Data Protector backup specification contains information about backup options, commands for RMAN, Pre- and Post-exec commands, media, and devices.
The Data Protector backup specification allows you to configure a backup and then use the same specification several times. Furthermore, scheduled backups can only be performed using a backup specification.
Backup and restore of an Oracle target database can be performed using the Data Protector User Interface, the RMAN utility, or the Oracle Enterprise Manager utility.
The heart of the Data Protector Oracle integration is MML, which enables an Oracle server process to issue commands to Data Protector for backing up or restoring parts or all of the Oracle target database files. The main purpose is to control direct interaction with media and devices.
A Data Protector scheduled or interactive backup is triggered by the Data Protector Backup Session Manager, which reads the backup specification and starts the ob2rman.pl command on the Oracle Server under the operating system user account
Integrating Oracle and Data Protector30
Restore flow
specified in the backup specification. Further on, ob2rman.pl prepares the environment to start the backup, and issues the RMAN backup command. RMAN instructs the Oracle Server processes to perform the specified command.
The Oracle Server processes initialize the backup through MML, which establishes a connection to the Data Protector Backup Session Manager. The Backup Session Manager starts the General Media Agent, sets up a connection between MML and the General Media Agent, and then monitors the backup process.
The Oracle Server processes read the data from the disks and send it to the backup devices through MML and the General Media Agent.
RMAN writes information regarding the backup either to the recovery catalog (if one is used) or to the control file of the Oracle target database.
Messages from the backup session are sent to the Backup Session Manager, which writes messages and information regarding the backup session to the IDB.
The Data Protector General Media Agent writes data to the backup devices.
A restore session can be started using:
Data Protector GUI
RMAN CLI
Oracle Enterprise Manager GUI
You must specify which objects are to be restored.
A restore from the Data Protector user interface is triggered by the Data Protector Restore Session Manager, which starts the ob2rman.pl command. Ob2rman.pl prepares the environment to start the restore, and issues the RMAN restore command. RMAN checks the recovery catalog (if one is used) or the control file to gather the information about the Oracle backup objects. It also contacts the Oracle Server processes, which initialize the restore through MML. MML establishes a connection with the Restore Session Manager and passes along the information about which objects and object versions are needed.
The Restore Session Manager checks the IDB to find the appropriate devices and media, starts the General Media Agent, establishes a connection between MML and the General Media Agent, and then monitors the restore and writes messages and information regarding the restore to the IDB.
The General Media Agent reads the data from the backup devices and sends it to the Oracle Server processes through MML. The Oracle Server Processes write the data to the disks.
Integration guide for Oracle and SAP 31
The concept of Oracle integration, data and the control flow are shown in Figure
2 on page 32, and the related terms are explained in the following table.
Figure 2 Data Protector Oracle integration concept
Oracle 10g/11g database files can also be part of ASM configuration. They can reside in the flash recovery area.
Legend
SM The Data Protector Session Manager, which can be the
Data Protector Backup Session Manager during a backup session and the Data Protector Restore Session Manager during a restore session.
RMAN The Oracle Recovery Manager.
Data Protector MML The Data Protector Oracle integration Media
Management Library, which is a set of routines that
Integrating Oracle and Data Protector32
enables data transfer between the Oracle Server and Data Protector.
Backup API The Oracle-defined application programming interface.
IDB The IDB where all the information about Data Protector
sessions, including session messages, objects, data, used devices, and media is written.
MA The Data Protector General Media Agent, which reads
and writes data from and to media devices.

Configuring the integration

Prerequisites

It is assumed that you are familiar with the Oracle database administration and
the basic Data Protector functionality.
You need a license to use the Data Protector Oracle integration. See the HP Data
Protector installation and licensing guide for information about licensing.
Before you begin, ensure that you have correctly installed and configured the
Oracle Server and Data Protector systems. See the:
• For an up-to-date list of supported versions, platforms, devices, and other
information, see the latest support matrices at http://www.hp.com/support/
manuals.
HP Data Protector installation and licensing guide for instructions on how to
install Data Protector on various architectures and how to install the Data Protector Oracle integration.
Oracle Recovery Manager User’s Guide and References for Oracle concepts
and backup/recovery strategies.
Oracle Backup and Recovery Guide for the configuration and use of Recovery
Manager, as well as for Oracle backup terminology and concepts.
Oracle Enterprise Manager User’s Guide for information about backup and
recovery with the Oracle Enterprise Manager, as well as information about SQL*Plus.
The Oracle Server software must be installed and the Oracle target database
must be open or mounted.
Integration guide for Oracle and SAP 33
If the Oracle recovery catalog database is used, ensure that it is properly
configured and open.
Oracle net services must be properly configured and running for the Oracle target
database and the recovery catalog, if you use it. See the Oracle Recovery Manager User’s Guide and References for more
information about different connection options. See “Troubleshooting” on page 139 for details about how to check the prerequisites
listed above.
On Windows, if the Oracle target database and the Oracle recovery catalog
are installed on two different systems, configure a domain user account that is a member of the Administrators group on both systems. After that, on the system with the Oracle target database installed, if the system is not Windows Server 2008, restart the Data Protector Inet service under this account.
For information on how to change the Data Protector Inet service account, see the online Help index: “changing Data Protector Inet account”.
To successfully back up the recovery files residing in the flash recovery area
(Oracle 10g/11g only), ensure that you have correctly configured the flash recovery area.
In case of Real Application Cluster (RAC), each node must have a dedicated disk
for storing archive logs. Such disks must be NFS mounted on all other RAC nodes. However, if the archive logs are not on a NFS mounted disk, you must modify
the archive log backup specification. See Problem on page 148.

Limitations

The MAXPIECESIZE RMAN parameter option is not supported because the
The Data Protector Oracle integration does not support the RMAN disk backup
On an HP OpenVMS client running the Oracle integration, you can only configure
restore of multiple backup pieces created during a backup is not possible using the Data Protector Oracle integration.
of a target database to the flash recovery area. The Data Protector Oracle integration supports only backups from the flash recovery area to a backup device. However, you can create an RMAN script that backs up the target database to the flash recovery area before or after the Data Protector backs up files from the flash recovery area to a backup device. The script can be set up using the Pre-exec or Post-exec option when creating a backup specification.
a Data Protector admin user with the username <Any> and the group name <Any>. This limitation is due to the lack of the user group name concept on OpenVMS.
Integrating Oracle and Data Protector34
Oracle database identifiers (DBIDs) of all databases must be unique within a Data
Protector cell.
Oracle Data Guard:
• You cannot configure only a standby database (without configuring primary
database).
• Only physical standby database backup is supported.
• Recovery catalog database is required for standby configurations.
• For other limitations regarding RMAN backup, restore, recovery, and
duplication in Oracle Data Guard environment, see the Oracle documentation.

Before you begin

Configure devices and media for use with Data Protector.
Test whether the Oracle Server system and the Cell Manager communicate
properly: Configure and run a Data Protector filesystem backup and restore on the Oracle Server system.
Identify the Oracle database user that will be used by Data Protector for backup.
This user must have the SYSDBA privilege granted. For example, it could be the Oracle user sys, which is created during database creation.
See the Oracle documentation for more information on user privileges in Oracle.

Cluster-aware clients

In cluster environment, if you intend to use the Data Protector CLI, set the Data Protector environment variable OB2BARHOSTNAME to the virtual server name. Set the variable on the Oracle Server system as follows:
Windows:
UNIX:
RAC:
backups and restores.
HP-UX with RAC:
package containing only the virtual IP and the virtual hostname parameters and distribute it among the RAC nodes.
set OB2BARHOSTNAME=virtual_server_name
export OB2BARHOSTNAME=virtual_server_name
Configure an Oracle database on every node from where you want to run
If you want to use virtual hostname, create an MC/ServiceGuard
Integration guide for Oracle and SAP 35

Linking Oracle Server with the Data Protector MML

To use the Data Protector Oracle integration, the Oracle Server software needs to be linked with the Data Protector Oracle integration Media Management Library (MML) on every client on which an Oracle instance is running.
You do not need to link Oracle Server with the Data Protector MML manually. When you start backups or restores using the Data Protector GUI or CLI, Data Protector automatically links Oracle Server with the correct platform–specific Data Protector MML. However, for testing purposes, you can override this automatic selection. You can manually specify which platform–specific Data Protector MML should be used by setting the Data Protector SBT_LIBRARY parameter. On how to set the parameter, see the util_cmd man page. The parameter is saved in the Data Protector Oracle instance configuration file.
MML is invoked by the Oracle server when it needs to write to or read from devices using Data Protector.
Linking on HP OpenVMS systems
On Oracle Server systems running on HP OpenVMS, link the MML SYS$SHARE:LIBOBK2SHR64.EXE with the Oracle Server:
1. Make sure Oracle RMAN is set up and you are able to access it. This can be
achieved by performing a test backup using the following RMAN script:
{ allocate channel d1 type disk; backup tablespace system; release channel d1; }
You can skip this step if you are already using RMAN for backing up Oracle.
2. Check the presence of the MML LIBOBK2SHR64.EXE in the SYS$SHARE:
directory.
NOTE:
The logical definition for SYS$SHARE:LIBOBK2SHR64.EXE is $DEFINE/SYSTEM DP_SBT SYS$SHARE:LIBOBK2SHR64.EXE.
Integrating Oracle and Data Protector36
You are now ready to use the MML with RMAN to perform backups. For information on how to use RMAN, see the Oracle documentation.
After relinking
To test the MML (SBT) interface, configure Oracle using the GUI (see “Configuring
Oracle databases” on page 41).

Configuring Oracle user accounts

Decide under which user accounts you want backups to run. Data Protector requires the following user accounts:
Oracle operating system user account
For details, see “Configuring Oracle operating system user accounts” on page 37.
Oracle database user accounts
For details, see “Configuring Oracle database users accounts” on page 39.
Configuring Oracle operating system user accounts
For each Oracle database, Data Protector requires an operating system user account that has Oracle rights to back up the database. This user account usually belongs to the DBA user group (OSDBA user). The user account under which the Oracle database is running has these rights. For example, to find such a user on UNIX clients, run:
ps -ef|grep ora_pmon_DB_NAME
or
ps -ef|grep ora_lgwr_DB_NAME
Figure 3 Finding the Oracle user
The following table explains how to configure users on different operating systems:
Integration guide for Oracle and SAP 37
UNIX clients
Windows clients
DescriptionClients
Add the OSDBA user account to the Data Protector admin or operator user group.
NOTE:
If you plan to configure Oracle databases using the omniintconfig.pl command, note that specified OSDBA user accounts are automatically added to the Data Protector admin user group. For details, see Configuring multiple
Oracle databases simultaneously.
On Windows clients, Data Protector connects to the Oracle database using the Data Protector Inet service on the related client. By default, the service runs under the Local System
account, which is automatically added to the Data Protector admin user group. However, if you have restarted the Data
Protector Inet service under an OSDBA user account, you need to add the new user to the Data Protector admin or operator user group.
Clusters
HP OpenVMS clients
Configure a Data Protector admin user with the username <Any> and the group name <Any>.
For information on adding users to Data Protector user groups, see the online Help index: “adding users”.
In cluster environments, ensure to add he following users to the Data Protector admin or operator user group:
OSDBA user for all physical nodes
OSDBA user for the virtual server (applicable for MC/ServiceGuard clusters)
Integrating Oracle and Data Protector38
Configuring Oracle database users accounts
Identify or create the following Oracle database user accounts. You need to provide these user accounts when you configure the Oracle database as described in “Configuring Oracle databases” on page 41.
Table 3 Oracle database user accounts
DescriptionUser
Primary database user
Recovery catalog user
Standby database user
Required to log in to the primary database.
The owner of the recovery catalog (for example, rman). Required to log in to the catalog database. Needed if you use the recovery catalog.
Required to log in to the standby database. Applicable only in Oracle Data Guard environments. Needed to back up the standby database.
Configuring user accounts on HP OpenVMS
To configure an Oracle user on HP OpenVMS, proceed as follows:
1. Modify the location of ORAUSER.COM and ORATAB files as instructed in
OMNI$ROOT:[LOG]LOGIN.COM based on the Oracle version used.
For example:
$PIPE@DKA0:[ORACLE]ORAUSER.COM > NLA0: Suppose ORAUSER.COM is located in DKC0:[ORACLE9i], then change
and uncomment the above statement to $PIPE@DKC0:[ORACLE9i]ORAUSER.COM > NLA0:.
$DEFINE/NOLOG/JOB ORATAB_LOC DKA0:[ORACLE]ORATAB Suppose ORATAB is located in DKC0:[ORACLE9i], then change and
uncomment the above statement to $DEFINE/NOLOG/JOB ORATAB_LOC DKCF0:[ORACLE9i]ORATAB.
Integration guide for Oracle and SAP 39
2. Uncomment the following lines in OMNI$ROOT:[LOG]LOGIN.COM:
$@OMNI$ROOT:[BIN]OMNI$CLI_SETUP.COM
$@OMNI$ROOT:[BIN.PERLl]PERL_SETUP.COM
$DEFINE /NOLOG /PROCESS PERL_ENV_TABLES "LNM$PROCESS", "LNM$JOB", "LNM$SERVER", "LNM$GROUP", "LNM$SYSTEM"
3.
Oracle 10g R2
Uncomment the following line:
$@OMNI$ROOT:[BIN]OMNI$ORA_OCI_SETUP.COM
4.
Oracle 9i
If you run the Media Agent and Data Protector Oracle integration agents on the same OpenVMS system, modify the group ID of the omniadmin user as DBA using the MCR AUTHORIZE utility:
a. Log in as a privileged user.
b. Execute:
$set def sys$system
$mcr authorize
UAF> show omniadmin
UAF> show oracle_user
c. Compare the accounts for Oracle and omniadmin users. If the accounts
are different, execute:
UAF> modify omniadmin /UIC=[Group_ID_of_Oracle_user, User_ID]
d. Verify the changes of the group ID.
5.
Oracle 9i
If you use CLI commands for Oracle integration agents, execute OMNI$ROOT:[LOG]LOGIN.COM.
Integrating Oracle and Data Protector40
TIP:
To determine the status of processes (OMNI$I*) and subprocesses (OMNI$ADMIN_*) on your OpenVMS system, use the following command procedure:
$@OMNI$ROOT:[BIN}OMNI$DIAGNOSE.COM
This command procedure displays the active parent processes, the session of job name, and the logfile name.

Configuring Oracle databases

Configuration of an Oracle database consists of providing Data Protector with the following data:
Oracle Server home directory
Login information to the target database
Optionally, login information to the recovery catalog database
Optionally, login information to the standby database
During the configuration, the util_oracle8.pl command, which is started on the Oracle server system, saves the specified parameters in the Data Protector Oracle database specific configuration file on the Cell Manager.
If a recovery catalog has been created and the Oracle target database has not yet been registered in the recovery catalog database, this will occur during configuration. Information about the Oracle database’s structure is transferred to the recovery catalog from the Oracle database’s control files.
Ensure that the database is open during the configuration procedure.
To configure an Oracle database, use the Data Protector GUI or CLI.
TIP:
In large environments with multiple Oracle databases, consider using the configuration procedure described in “Configuring multiple Oracle databases
simultaneously” on page 48. However, note that this procedure cannot be used to
configure standby databases.
Integration guide for Oracle and SAP 41
Using the Data Protector GUI
Configure an Oracle database when you create the first backup specification for the database. Start with the procedure described in “Creating backup
specifications” on page 58 and at Step 5 on page 62 proceed as follows:
1. In the Configure Oracle dialog box and in the General page, specify the
pathname of the Oracle Server home directory.
Figure 4 Configuring Oracle - General (Windows)
Figure 5 Configuring Oracle - General (UNIX)
Integrating Oracle and Data Protector42
2. In the Primary page, specify the login information to the primary database.
Note that the user must have the SYSDBA privilege granted.
In Services, type the net service name for the primary database instance. The backup will be performed on the system where this database instance resides.
RAC:
List all net services names for the primary database separated by a comma.
Figure 6 Configuring Oracle - Primary
3. In the Catalog page, select Use target database control file instead of recovery
catalog to use the primary database control file.
To use the recovery database catalog as an RMAN repository for backup history, select Use recovery catalog and specify the login information to the recovery catalog.
Oracle Data Guard:
the recovery catalog.
The user specified must be the owner of the recovery catalog.
In Services, type the net service name for the recovery catalog.
If you intend to back up a standby database, you must use
Integration guide for Oracle and SAP 43
Figure 7 Configuring Oracle - Catalog
4.
Oracle Data Guard:
If you intend to back up a standby database, configure also
the standby database:
In the Standby page, select Configure standby database and specify the login information to the standby database.
In Services, type the net service name for the standby database instance.
RAC:
List all net services names for the standby database separated by a comma.
Figure 8 Configuring Oracle - Standby
5. Click OK.
The Oracle database is configured. Exit the GUI or proceed with creating the backup specification at Step 6 on page 63.
Integrating Oracle and Data Protector44
Using the Data Protector CLI
NOTE:
On HP OpenVMS, to invoke the Data Protector CLI, run:
$@OMNI$ROOT:[BIN]OMNI$CLI_SETUP.COM
1.
UNIX only:
2. On the Oracle Server system, from the directory:
Log in to the Oracle Server system with an OSDBA user account.
Windows:
HP-UX, Solaris, and Linux:
Other UNIX:
run:
Data_Protector_home\bin
/opt/omni/lbin
/usr/omni/bin/
Windows:
perl -I..\lib\perl util_oracle8.pl -config -dbname DB_NAME
-orahome ORACLE_HOME PRIMARY_DB_LOGIN [CATALOG_DB_LOGIN]
[STANDBY_DB_LOGIN] [-client CLIENT_NAME]
UNIX:
util_oracle8.pl -config -dbname DB_NAME -orahome ORACLE_HOME PRIMARY_DB_LOGIN [CATALOG_DB_LOGIN] [STANDBY_DB_LOGIN] [-client CLIENT_NAME]
HP OpenVMS:
util_oracle8 -config -dbname DB_NAME -orahome ORACLE_HOME PRIMARY_DB_LOGIN [CATALOG_DB_LOGIN] [STANDBY_DB_LOGIN] [-client CLIENT_NAME]
where:
PRIMARY_DB_LOGIN is:
-prmuser PRIMARY_USERNAME
-prmpasswd PRIMARY_PASSWORD
-prmservice primary_net_service_name_1[,primary_net_service_name_2, ...]
Integration guide for Oracle and SAP 45
CATALOG_DB_LOGIN is:
-rcuser CATALOG_USERNAME
-rcpasswd CATALOG_PASSWORD
-rcservice catalog_net_service_name
STANDBY_DB_LOGIN is:
-stbuser STANDBY_USERNAME
-stbpasswd STANDBY_PASSWORD
-stbservice standby_net_service_name_1[,standby_net_service_name_2, ...]
Oracle Data Guard:
the STANDBY_DB_LOGIN information. For standby database backup, a recovery catalog must be used. Therefore, you must also provide the CATALOG_DB_LOGIN information.
If you intend to back up a standby database, you must provide
Parameter description
CLIENT_NAME
Name of the Oracle Server system with the database to be configured. It needs to be specified only in a cluster environment.
RAC:
The virtual server of the Oracle resource group.
Oracle Data Guard:
system.
DB_NAME
Name of the database to be configured.
ORACLE_HOME
Pathname of the Oracle Server home directory.
PRIMARY_USERNAME PRIMARY_PASSWORD
Username and password for login to the target or primary database. Note that the user must have the SYSDBA privilege granted.
primary_net_service_name_1 [,primary_net_service_name_2, ...]
Net services names for the primary database.
RAC:
Each net service name must resolve into a specific database instance.
CATALOG_USERNAME CATALOG_PASSWORD
Username and password for login to the recovery catalog. This is optional and is used only if you use the recovery catalog database as an RMAN repository for backup history.
Name of either a primary system or secondary (standby)
Integrating Oracle and Data Protector46
Example
catalog_net_service_name
Net service name for the recovery catalog.
STANDBY_USERNAME STANDBY_PASSWORD
This is used in Oracle Data Guard environment for backing up a standby database. Username and password for login to the standby database.
standby_net_service_name_1 [,standby_net_service_name_2, ...]
Net services names for the standby database.
The message *RETVAL*0 indicates successful configuration, even if followed by additional messages.
The following example represents configuration on HP-UX or Solaris of an Oracle database and its recovery catalog in Oracle Data Guard environment.
The following names are used in the example:
database name: oracl
primary user name: system
primary password: manager
primary net service name 1: netservice1
primary net service name 2: netservice2
recovery catalog user name: rman
recovery catalog password: manager
recovery catalog net service name: catservice
standby user name: system
standby password: manager
standby net service name 1: netservicesb1
standby net service name 2: netservicesb2
Syntax
/opt/omni/lbin/util_oracle8.pl -config -dbname oracl -orahome /app10g/oracle10g/product/10.1.0 -prmuser system -prmpasswd manager -prmservice netservice1,netservice2 -rcuser rman
-rcpasswd manager -rcservice catservice -stbuser system
-stbpasswd manager -stbservice netservicesb1,netservicesb2
Integration guide for Oracle and SAP 47
If you need to export some variables before starting SQL*Plus, listener, or RMAN, these variables must be defined in the Environment section of the Data Protector Oracle global configuration file or using the Data Protector GUI.
Configuring multiple Oracle databases simultaneously
In large environments with multiple Oracle databases, it can be time-consuming to configure each database separately, especially if the configuration parameters need to be updated frequently.
For these reasons, Data Protector enables you to keep configuration parameters of multiple databases in a single file. In this way, you can do all necessary updates in one place. Once the file is ready, you run the Data Protector omniintconfig.pl command, which reads the file and configures all the Oracle databases specified. It means that, for each Oracle database, a separate Data Protector configuration file is created or updated (if it already exists), similarly as if the standard configuration method were used. If specified, Data Protector also performs a configuration check.
In your configuration file, you specify the following parameters for each Oracle database:
Table 4 Oracle database configuration parameters
DescriptionParameter
MoM
(optional)
CellManager
Client
Instance
Integrating Oracle and Data Protector48
Manager of managers
Data Protector Cell Manager Default: Cell Manager of the local client
Client with the Oracle Server installed. In cluster environments, specify the virtual server or, in RAC,
one of the cluster nodes. Default: local client
Oracle database instance (mandatory)
DescriptionParameter
OSUSER
(UNIX and Windows Server 2008 clients only)
OSGROUP
(UNIX and Windows Server 2008 clients only)
ORACLE_HOME
TGTUser
TGTPasswd
TGTService
RCUser
(optional)
RCPasswd
(optional)
RCService
(optional)
An operating system user account (user name and group or domain) under which you want the configuration and browsing of Oracle databases to start. This user will be automatically added to the Data Protector admin user group for the client specified in Client.
On Windows Server 2008, it is not mandatory to specify the user account.
Oracle Server home directory
Login information for the target database (username and password)
Target database service(s). If there is more than one service, separate them with a semicolon (service1;service2...).
Login information for the recovery catalog database (username and password)
Recovery catalog database service
File formats
Cluster nodes (applicable in cluster environments). The user
OSUSER, OSGROUP will be automatically added to the Data
ClusterNodes
(optional)
Protector admin user group for each cluster node listed here. Separate cluster nodes with a semicolon (node1;node2...).
If you do not specify this parameter, you need to add these users manually as described in “Configuring Oracle user
accounts” on page 37.
Your file must be created in one of the following formats:
XLS (Microsoft Office Excel file)
Integration guide for Oracle and SAP 49
XLS files
CSV files
CSV (comma separated values file)
When creating the file, consider the following:
In the first line, list parameters that you want to specify. In subsequent lines, list
parameter values for Oracle databases that you want to configure.
Parameter names in the first line are not case-sensitive.
Empty columns are not allowed.
Empty rows are allowed.
Empty cells are allowed only for optional parameters.
In XLS files, you can format cells as you like. However, you are not allowed to add any information in extra cells. See Figure 9.
Figure 9 Keeping parameters in an XLS file
A CSV file is created by saving a text file in CSV format (for example, C:\My_documents\Oracle_databases.csv). Parameters in the file must be separated with commas. You can omit the specification of parameters that are not applicable by leaving the place between two commas empty. See Figure 10.
Figure 10 Keeping parameters in a CSV file
Encoding passwords
Data Protector requires that passwords in Data Protector Oracle database configuration files are encoded. You can achieve this in two different ways:
Integrating Oracle and Data Protector50
Encode the passwords before you save them in your XLS or CSV file, using the
Data Protector util_cmd command. For example, to encode the password
BlueMoon, run:
util_cmd –encode BlueMoon
Figure 11 Encoding a password
Once you receive the encoded password, copy it to your file. Figure 9 shows an example of a file in which all the passwords are encoded.
If you keep your passwords encoded, you do not need to specify the –encode option when you run the omniintconfig.pl comman.
If your passwords are not encoded, specify the –encode option when you run
the omniintconfig.pl command.
IMPORTANT:
Ensure that the passwords in your XLS or CSV file are either all encoded or all plain-text.
omniintconfig.pl command syntax
NOTE:
The omniintconfig.pl command can be run on any Data Protector client that has the User Interface component installed.
1. Log in to the client under an operating system user account that is added to the
Data Protector admin user group (actually, it suffices if the user has the Data Protector User configuration and See private objects user rights).
Integration guide for Oracle and SAP 51
2. Go to the following directory:
Examples
Windows:
HP-UX, Solaris, and Linux:
Other UNIX:
Data_Protector_home\bin
/opt/omni/lbin
/usr/omni/bin/
3. Run:
Windows:
UNIX:
perl.exe omniintconfig.pl Options
omniintconfig.pl Options
where Options are:
[-encode] [-chkconf] [-force] {-passwordfile FileName|Param=Value [Param=Value...]}
For the options description, see the omniintconfig.pl man page or the HP Data Protector command line interface reference.
1. Suppose you are logged in to the Windows client on which you have created
the file C:\My_documents\Oracle_instances.xls. To configure the Oracle databases IN1 and IN2 using the information from the file, run:
perl.exe omniintconfig.pl -passwordfile C:\My_documents\Oracle_instances.xls
2. Suppose you are logged in to a UNIX client. To configure the Oracle database
IN2 by specifying parameters at run time, run:
omniintconfig.pl –encode CellManager=galaxy Client=star Instance=IN2 ORACLE_HOME=C:\oracle\product\10.2.0\db_1 TGTUser=system TGTService=IN2_1;IN2_2 TGTPasswd=BlueMoon
Note that the password BlueMoon is not encoded. Therefore, you must specify the option –encode.
Parameters can be specified only for one Oracle database at a time.
3. Suppose you are logged in to a Windows client. To configure and check the
configuration of all Oracle databases specified in
C:\My_documents\Oracle_instances.xls, run:
perl.exe omniintconfig.pl -chkconf –force –passwordfile C:\My_documents\Oracle_instances.xls
Integrating Oracle and Data Protector52
The -force option instructs Data Protector to continue configuring Oracle databases if the configuration check for an Oracle database fails.
4. Suppose you are logged in to a UNIX client. To check the configuration of the
Oracle database IN2, run:
omniintconfig.pl -chkconf CellManager=galaxy Client=star Instance=IN2

Checking the configuration

You can check the configuration of an Oracle database after you have created at least one backup specification for the database. If you use the Data Protector CLI, a backup specification is not needed.
Using the Data Protector GUI
1. In the Context List, select Backup.
2. In the Scoping Pane, expand Backup Specifications and then Oracle Server.
Click the backup specification to display the server with the database to be checked.
3. Right-click the server and click Check configuration.
IMPORTANT:
Data Protector does not check if the specified user has appropriate Oracle backup permissions.
Using the Data Protector CLI
1.
UNIX only:
Log in to the Oracle Server system with an OSDBA user account.
Integration guide for Oracle and SAP 53
2. From the directory:
Handling errors
If an error occurs, the error number is displayed in the form *RETVAL*error_number.
To get the error description, on the Cell Manager, run:
Windows:
HP-UX, Solaris, and Linux:
Windows:
HP-UX, Solaris, and Linux:
Other UNIX
run:
Data_Protector_home\bin
/opt/omni/lbin
: /usr/omni/bin/
Windows:
perl -I..\lib\perl util_oracle8.pl -CHKCONF -dbname DB_NAME
UNIX:
util_oracle8.pl -CHKCONF -dbname DB_NAME
HP OpenVMS:
util_oracle8 -CHKCONF -dbname DB_NAME
Data_Protector_home\bin\omnigetmsg 12 error_number
/opt/omni/lbin/omnigetmsg 12 error_number
Other UNIX systems:
/usr/omni/bin/omnigetmsg 12 error_number
HP OpenVMS:
Set up the Data Protector CLI environment by running:
$@OMNI$ROOT:[BIN]OMNI$CLI_SETUP.COM
Run:
$OMNIGETMSG 12 error_number
IMPORTANT:
On UNIX, it is possible that although you receive *RETVAL*0, backup still fails because Data Protector does not check if the specified user has appropriate Oracle backup permissions.
Integrating Oracle and Data Protector54

Setting environmental variables

Use environmental variables to modify backup environment to suit your needs. Environmental variables are Oracle database specific. It means that they can be set differently for different Oracle databases. Once specified, they are saved to related Data Protector Oracle database configuration files.
For details on how environmental variables affect your environment, see Table 5.
NOTE:
Environmental variables are not supported on HP OpenVMS systems.
Table 5 Environmental variables
Environmental variable
To set environmental variables, use the Data Protector GUI or CLI.
Using the Data Protector GUI
You can set a variable when you create a backup specification or modify an existing one:
value
300 sOB2_RMAN_COMMAND_TIMEOUT
300 sOB2_SQLP_SCRIPT_TIMEOUT
DescriptionDefault
This variable is applicable when Data Protector tries to connect to a target or catalog database. It specifies how long (in seconds) Data Protector waits for RMAN to respond that the connection succeeded. If RMAN does not respond within the specified time, Data Protector aborts the current session.
This variable is applicable when Data Protector issues an SQL*Plus query. It specifies how long Data Protector waits for SQL*Plus to respond that the query completed successfully. If SQL*Plus does not respond within the specified time, Data Protector aborts the current session.
Integration guide for Oracle and SAP 55
1. In the Source page of the backup specification, right-click the Oracle database
at the top and click Set Environmental Variables.
2. In the Advanced dialog box, specify the variable name, its value, and click Add.
See Figure 12.
Figure 12 Setting environmental variables
Click OK.
Using the Data Protector CLI
From the directory:
Windows:
HP-UX, Solaris, and Linux:
Data_Protector_home\bin
Integrating Oracle and Data Protector56
/opt/omni/lbin/
Other UNIX
run:
util_cmd –putopt Oracle8 DatabaseName Variable Value –sublist Environment
For details, see the util_cmd man page or the HP Data Protector command line interface reference.
Example
To set the environmental variable OB2_RMAN_COMMAND_TIMEOUT to 100 seconds for the Oracle database INST2, run:
util_cmd –putopt Oracle8 INST2 OB2_RMAN_COMMAND_TIMEOUT 100 –sublist Environment

Backup

To configure an Oracle backup, perform the following steps:
1. Configure the devices you plan to use for a backup. See the online Help index:
2. Configure media pools and media for a backup. See the online Help index:
: /usr/omni/bin/
“configuring devices” for instructions.
“creating media pools” for instructions.
3. Create a Data Protector Oracle backup specification. See “Creating backup
specifications” on page 58.
HP OpenVMS
On HP OpenVMS, before performing Data Protector tasks using the CLI, execute:
$@OMNI$ROOT:[BIN]OMNI$CLI_SETUP.COM
This command procedure defines the symbols needed to invoke the Data Protector CLI. It gets installed when you chose the CLI option during the installation. Execute this command procedure from LOGIN.COM for all CLI users.

Creating new templates

You can use backup templates to apply same set of options to a number of backup specifications. By creating your own template, you can specify the options exactly as you want them to be.
Integration guide for Oracle and SAP 57
This allows you to apply all the options to a backup specification with a few mouse clicks, rather than having to specify all the options over and over again. This task is optional, as you can use one of the default templates as well.
If you prefer using predefined templates, see “Creating backup
specifications” on page 58 for a detailed explanation.
To create a new backup template, proceed as follows:
1. In the Data Protector Manager, switch to the Backup context.
2. In the Scoping Pane, expand Backup and then Templates, and then right-click
Oracle Server.
3. Click Add Template. Follow the wizard to define the appropriate backup options
in your template.

Creating backup specifications

Cluster-aware clients
Before you perform an offline backup in a cluster environment, take the Oracle Database resource offline and bring it back online after the backup. This can be done using the Oracle fscmd command line interface commands in the Pre-exec and Post-exec commands for the client system in a particular backup specification, or by using the Cluster Administrator.
To create an Oracle backup specification:
1. In the Context List, click Backup.
2. In the Scoping Pane, expand Backup Specifications, right-click Oracle Server,
and click Add Backup.
Integrating Oracle and Data Protector58
3. In the Create New Backup dialog box, double-click Blank Oracle Backup to
create a backup specification without predefined options, or use one of the pre-defined templates given below
Archive Backs up the Archived Redo Logs.
Archive_Delete Backs up the Archived Redo Logs,
then deletes them after the backup.
Whole_Online Backs up the database instance and
the Archived Redo Logs.
Whole_Online_Delete Backs up the database instance and
the Archived Redo Logs, and then deletes the Archived Redo Logs.
Database_Archive Backs up the database instance and
the Archived Redo Logs.
Database_Switch_Archive Backs up the database instance,
switches the Online Redo Logs and backs up the Archived Redo Logs.
Database_Switch_ArchiveDel Backs up the database instance,
switches the Online Redo Logs, backs up the Archived Redo Logs and then deletes the Archived Redo Logs.
Direct_Database Backs up the database instance and
controlfile.
SMB_Proxy_Database Backs up the database instance and
control file in the ZDB (split mirror or snapshot) mode using the proxy-copy method.
SMB_BackupSet_Database Backs up the database instance and
control file in the ZDB (split mirror or snapshot) mode using the backup set method.
Integration guide for Oracle and SAP 59
Click OK.
Integrating Oracle and Data Protector60
4. In the Client, select the Data Protector Oracle integration client. In a cluster
environment, select the virtual server.
RAC:
Select the virtual server of the Oracle resource group.
Oracle Data Guard:
In Application database, type the name of the database to be backed up.
The database name can be obtained using SQL*Plus:
SQL>select name from v$database;
NOTE:
In a single-instance configuration, the database name is usually the same as its instance name. In this case, the instance name can be also used. The instance name can be obtained as follows:
SQL>select instance_name from v$instance;
Specify the User and group/domain options, which are available on UNIX and Windws Server 2008 clients, as follows:
UNIX:
In Username and Group/Domain name, specify the OSDBA user
account under which you want the backup to start (for example, the user name ora, group DBA). This user must be configured as described in “Configuring Oracle user accounts” on page 37.
Windows Server 2008:
they are not specified, the backup runs under the Local System Account. In Username and Group/Domain name, specify the operating system user
account under which you want the backup session to run (for example, the user name Administrator, domain DP).
Select either a primary system or secondary (standby) system.
It is not mandatory to specify these options and if
Ensure that this user has been added to the Data Protector admin or operator user group and has the Oracle database backup rights. This user becomes the backup owner.
NOTE:
If this is not your first backup specification, Data Protector fills in Username and Group/Domain name for you, providing the values of the last configured Oracle database.
Integration guide for Oracle and SAP 61
Figure 13 Specifying an Oracle Server system (UNIX)
Click Next.
NOTE:
When you click Next, Data Protector performs a configuration check.
UNIX clients only:
The check is started under the specified OSDBA user account. If it completes successfully, the OSDBA user and group are also saved in both the Oracle database specific configuration file and Oracle client global configuration file, overriding previous values if they exist.
5. If the Oracle database is not configured yet for use with Data Protector, the
Configure Oracle dialog box is displayed. Configure the Oracle database for use with Data Protector as described in “Configuring Oracle
databases” on page 41.
Integrating Oracle and Data Protector62
6. Select the Oracle database objects to be backed up.
For example, a single tablespace can be separately selected for backup, but for a complete online backup of the database, the ARCHIVELOGS must also be selected.
Oracle 10g/11g:
case, if you select the FLASH RECOVERY AREA to be backed up, you do not need to select also ARCHIVELOGS.
Oracle Data Guard (10g/11g):
connection, you can back up a control file for the standby database, which can be used when restoring the standby database.
NOTE:
Since temporary tablespaces do not contain permanent database objects, RMAN and Data Protector do not back them up. For more information, see Oracle documentation.
NOTE:
If your database uses a recovery catalog, it is backed up by default after each database backup, unless otherwise specified in the backup specification.
The archived logs can reside in the flash recovery area. In this
If the database is configured with standby
Integration guide for Oracle and SAP 63
Figure 14 Selecting backup objects
Click Next.
7. Select the device(s) you want to use for the backup. Click Properties to set the
device concurrency, media pool, and preallocation policy. For more information on these options, click Help.
You can also specify whether you want to create additional copies (mirrors) of the backup during the backup session. Specify the desired number of mirrors by clicking the Add mirror and Remove mirror buttons. Select separate devices for the backup and for each mirror.
For detailed information on the object mirror functionality, see the online Help index: “object mirroring”.
Click Next to proceed.
Integrating Oracle and Data Protector64
8. Set the backup options.
For information on other the Backup Specification Options and Common Application Options, press F1.
Oracle Data Guard:
standby database in the Application Specific Options dialog box.
For information on the Application Specific Options (Figure 15 on page 66), see Table 6 on page 68 or press F1.
TIP:
When backing up data from the Oracle 10g/11g flash recovery area to tape, you can specify the location of the RMAN script that performs backups to the flash recovery area in the Pre-exec or Post-exec text box. The script will be executed every time before (Pre-exec) or after (Post-exec) the Data Protector Oracle integration backup to tape.
To back up a standby database, you must select Back up
Integration guide for Oracle and SAP 65
Figure 15 Oracle specific options
Click Next.
9. Optionally, schedule the backup. For more details, see “Scheduling backup
specifications” on page 81.
Click Next.
Integrating Oracle and Data Protector66
10. Save the backup specification. It is recommended that you save all Oracle
backup specifications in the Oracle group.
IMPORTANT:
The word DEFAULT is a reserved word and therefore must not be used for backup specification names or labels of any kind. Therefore, do not use a punctuation in the names of backup specifications, since the Oracle channel format is created from the backup specification name.
Figure 16 Saving the backup specification
Click OK.
To start the backup, see “Starting backup sessions” on page 77.
11. You can examine the newly-created and saved backup specification in the
Backup context, under the specified group of backup specifications. The backup specification is stored in the following file on the Cell Manager:
Windows:
Data_Protector_home\Config\server\Barlists\Oracle8\Backup_Specification_Name
UNIX:
/etc/opt/omni/server/barlists/oracle8/Backup_Spec_Name
Integration guide for Oracle and SAP 67
12. It is recommended to test the backup specification. See “Testing the
integration” on page 74 for details.
Table 6 Oracle backup options
Disable recovery catalog auto backup
Disable Data Protector managed control file backup
Back up standby database
RMAN Script
By default, Data Protector backs up the recovery catalog in every backup session. Select this option to disable backup of the recovery catalog.
By default, Data Protector backs up the Data Protector managed control file in every backup session. Select this option to disable backup of the Data Protector managed control file.
Oracle Data Guard:
is configured with the standby connection. By default, RMAN backs up the database files and archived redo logs on the primary system. Select this option to enable backup of the database files and archive logs on standby system. However, only the archive logs created after the standby database was configured can be backed up at standby site. Archive logs created before the standby database was configured must be backed up on the primary database.
Note that the current control file or the control file for standby will still be backed up from the primary system.
You can edit the Oracle RMAN script section of the Data Protector Oracle backup specification. The script is created by Data Protector during the creation of a backup specification and reflects the backup specification’s selections and settings. You can edit the script only after the backup specification has been saved. For information on how to edit the RMAN script section, see “Editing the Oracle RMAN
script” on page 70.
This option is applicable if the database
Integrating Oracle and Data Protector68
Pre-exec, Post-exec
Specify a command or RMAN script that will be started by ob2rman.pl on the Oracle Server system before the backup (pre-exec) or after it (post-exec). RMAN scripts must have the .rman extension. Do not use double quotes.
For example, you can provide scripts to shut down and start an Oracle instance. For examples of shut-downing and starting an Oracle instance on UNIX, see “Examples of
pre-exec and post-exec scripts on UNIX” on page 69.
Provide the pathname of the command or RMAN script.
HP OpenVMS
(OMNI$ROOT:[BIN]).
: Provide the pathname of the command
Examples of pre-exec and post-exec scripts on UNIX
Pre-exec example
The following is an example of a script that shuts down an Oracle instance:
#!/bin/sh export ORACLE_HOME=$2 export ORACLE_SQLNET_NAME=$1 if [ -f $ORACLE_HOME/bin/sqlplus ]; then $ORACLE_HOME/bin/sqlplus << EOF connect sys/manager@$ORACLE_SQLNET_NAME as sysdba shutdown EOF echo "Oracle database \"$DB_NAME\" shut down." exit 0 else echo "Cannot find Oracle SQLPLUS ($ORACLE_HOME/bin/sqlplus)." exit 1 fi
Post-exec example
The following is an example of a script that starts an Oracle instance:
#!/bin/sh export ORACLE_HOME=$2 export ORACLE_SQLNET_NAME=$1 if [ -f $ORACLE_HOME/bin/sqlplus ]; then $ORACLE_HOME/bin/sqlplus << EOF connect sys/manager@$ORACLE_SQLNET_NAME as sysdba startup
Integration guide for Oracle and SAP 69
EOF echo "Oracle database \"$DB_NAME\" started." exit 0 else echo "Cannot find Oracle SQLPLUS ($ORACLE_HOME/bin/sqlplus)." exit 1 fi

Editing the Oracle RMAN script

The RMAN script is used when the Data Protector backup specification is started to perform a backup of the Oracle objects.
The RMAN script section is not written to the backup specification until the backup specification is either saved or manually edited by clicking the Edit button.
You can edit the RMAN script section of only after the Data Protector Oracle backup specification has been saved.
Limitations
When editing the RMAN script sections of the Data Protector backup specifications, consider the following limitations:
The Oracle manual configuration convention must be used and not the Oracle
automatic configuration convention.
Double quotes (") must not be used - single quotes should be used instead.
By default, RMAN scripts created by Data Protector contain instructions for backing
up one or more of the following objects:
• Databases, tablespaces, or datafiles (the first backup command)
• Archive logs (the second backup command)
• With Oracle 10g/11g, the flash recovery area (the third backup command)
• Control files (the last backup command) The RMAN scripts with all combinations of the above listed backup objects are
recognized by Data Protector as its own scripts and it is possible to modify the selection of objects that will be backed up in the Source tab of the Results Area.
If the RMAN script contains additional manually entered backup commands, for example a second backup command for backing up a database that is already listed in the first backup command, the object selection is disabled and it is only possible to browse the Source tab.
Integrating Oracle and Data Protector70
To edit an Oracle RMAN script, click Edit in the Application Specific Options window (see Figure 22 on page 99), edit the script, and then click Save to save the changes to the script.
See the Oracle Recovery Manager User’s Guide and References for more information on Oracle RMAN commands.
Data Protector RMAN script structure
The RMAN script created by Data Protector consists of the following parts:
The Oracle channel allocation together with the Oracle environment parameters’
definition for every allocated channel. The number of allocated channels is the same as the sum of concurrency numbers
for all devices selected for backup.
NOTE:
Once the backup specification has been saved, changing the concurrency number does not change the number of allocated channels in the RMAN script. This has to be done manually by editing the RMAN script.
IMPORTANT:
On Windows systems, a maximum of 32 or 64 (if device is local) channels can be allocated. If the calculated number exceeds this limitation, you have to manually edit the RMAN script and reduce the number of allocated channels.
When an Oracle channel is manually defined by editing the RMAN script, the environment parameters must be added in the following format:
parms 'ENV=(OB2BARTYPE=Oracle8, OB2APPNAME=DB_NAME, OB2BARLIST=Backup_Specification_Name)';
Depending on the backup objects selection, an RMAN backup statement for the
backup of the whole database instance, and/or for any combination of RMAN commands to back up tablespaces, datafile, or the flash recovery area. The
backup statement consists of the following:
• The Oracle format of the backup file in the following format:
format 'Backup_Specification_Name<DB_NAME_%s:%t:%p>.dbf' database;
Integration guide for Oracle and SAP 71
NOTE:
When an Oracle format of the backup file is manually defined or changed by editing the RMAN script, any user-defined combination of the Oracle substitution variables can be
added
to the %s:%t:%p substitution variables
and DB_NAME, which are obligatory.
• The RMAN datafile tablespace_name*datafile_name command.
If the Archived Redo Logs were selected for a backup, an RMAN backup statement
for the backup of Oracle archive logs. If an appropriate template was selected, or if the statement was manually added,
the RMAN sql statement to switch the Online Redo Logs before backing up the Archived Redo Logs:
sql 'alter system archive log current';
The backup statement consists of the following:
• The Oracle format of the backup file in the following format:
format 'Backup_Specification_NameDB_NAME_%s:%t:%p>.dbf'
NOTE:
When an Oracle format of the backup file is manually defined or changed by editing the RMAN script, any user-defined combination of the Oracle substitution variables can be
added
to the obligatory %s:%t:%p substitution
variables and DB_NAME.
• The RMAN archivelog all command. If an appropriate template was selected, or if the statement was manually added,
the RMAN statement to delete the Archived Redo Logs after they are backed up: archivelog all delete input;
If the control file was selected for a backup, an RMAN backup statement for the
backup of Oracle control files. The backup statement consists of the following:
• The Oracle format of the backup file in the following format:
format 'Backup_Specification_Name<DB_NAME_%s:%t:%p>.dbf' current controlfile;
Integrating Oracle and Data Protector72
NOTE:
When an Oracle format of the backup file is manually defined or changed by editing the RMAN script, any user-defined combination of the Oracle substitution variables can be and DB_NAME, which are obligatory.
• The RMAN current controlfile command.
Example of the RMAN script
The following is an example of the RMAN script section as created by Data Protector based on the Blank Oracle Backup template, after the whole database selection:
run { allocate channel 'dev_0' type 'sbt_tape' parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=DIPSI,OB2BARLIST=New1)'; allocate channel 'dev_1' type 'sbt_tape' parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=DIPSI,OB2BARLIST=New1)'; allocate channel 'dev_2' type 'sbt_tape' parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=DIPSI,OB2BARLIST=New1)'; backup incremental level <incr_level> format 'New1<DIPSI_%s:%t:%p>.dbf' database ; backup format 'New1<DIPSI_%s:%t:%p>.dbf' archivelog all; backup format 'New1<DIPSI_%s:%t:%p>.dbf' current controlfile ; }
added
to the %s:%t:%p substitution variables

Creating copies of backed up objects

Oracle duplex mode
Oracle supports the duplex mode, which allows you to create copies of every backed up object to a separate backup device. To enable the duplex feature, perform the following steps:
Integration guide for Oracle and SAP 73
1. Add the following command to the RMAN script before any allocate channel
command:
set duplex=<on | 2 | ... >
IMPORTANT:
If more than one allocated channel is used, it may happen that some original and copied objects are backed up to the same medium. To prevent this, you should use only one allocated channel when backing up using the duplex mode.
2. Add the following parameter to every format string used for backup:
%c
3. Set the concurrency of each device used for backup to 1.
4. Set the MIN and MAX load balancing parameters according to the following
formula:
(number of duplex copies)*(number of allocated channels)
Example
If the duplex is set to 2 and the backup runs with 1 allocated channel, then the MIN and MAX parameters should be set to 2.
IMPORTANT:
If the MIN and MAX load balancing parameters are set to lower values, the backup will hang.
If the MIN and MAX load balancing parameters are set to higher values, it may happen that the original and copied objects are backed up to the same medium.

Testing the integration

Once you have created and saved a backup specification, you should test it before running a backup. The test verifies both parts of the integration, the Oracle side and the Data Protector side. In addition, the configuration is tested as well.
Integrating Oracle and Data Protector74
The procedure consists of checking both the Oracle and the Data Protector parts of the integration to ensure that communication between Oracle and Data Protector is established, that the data transfer works properly, and that the transactions are recorded either in the recovery catalog (if used) or in the control file.
Details of the test backup, such as media protection, backup user and backup status are registered in the Data Protector database and in the Oracle control files. Set the Protection option of your test backup specification to None.
Testing using the Data Protector GUI
Follow the procedure below to test the backup of an Oracle backup specification:
1. In the Data Protector Manager, switch to the Backup context.
2. In the Scoping Pane, expand Backup, then Backup Specifications. Expand Oracle
Server and right-click the backup specification you want to preview.
3. Click Preview Backup.
Integration guide for Oracle and SAP 75
Figure 17 Previewing a backup
Testing using the CLI
A test can be executed from the command line on the Oracle Server system or on any Data Protector client system within the same Data Protector cell, provided that the system has the Data Protector User Interface installed.
NOTE:
On OpenVMS, to invoke the Data Protector CLI, execute:
$@OMNI$ROOT:[BIN]OMNI$CLI_SETUP.COM
Run the omnib command with the -test_bar option as follows:
On Windows: Data_Protector_home\bin\omnib -oracle8_list
backup_specification_name -test_bar
On HP-UX, Solaris, and Linux: /opt/omni/bin/omnib -oracle8_list \
backup_specification_name -test_bar
Integrating Oracle and Data Protector76
On other UNIX systems: /usr/omni/bin/omnib -oracle8_list \
backup_specification_name -test_bar
On OpenVMS: $omnib -oracle8_l qist backup_specification_name
-test_bar
The ob2rman.pl command is started, which then starts the BACKUP VALIDATE DATABASE RMAN command.

Starting backup sessions

There are two strategies for backing up a database. These are an offline or consistent database backup, and an online or inconsistent database backup. The latter is also known as a hot backup. Special attention is required to reach a consistent state with an online backup.
A decision about your database backup strategy depends on a number of factors. If the database must be open and available all the time, then online backup is your only choice. If you can afford to have the database offline at a certain time, then you are more likely to make periodic offline backups of the entire database, supplementing them with online backups of the dynamically changing tablespaces.
Oracle offline
An offline backup of a database is a backup of the datafiles and control files which are consistent at a certain point in time. The only way to achieve this consistency is to cleanly shut down the database and then back up the files while the database is either closed or mounted.
If the database is closed, the offline backup of an Oracle target database can be performed using a Data Protector filesystem backup specification. In this case, the Data Protector Disk Agent is used.
If the database is mounted, a Data Protector Oracle backup specification, based on which Data Protector automatically generates and executes the RMAN script, can be used. In this case, the Data Protector Oracle integration software component is used.
Typically, you would perform an offline backup of the entire database, which must include all datafiles and control files, while the parameter files may be included optionally.
The whole offline database backup is performed as follows:
Integration guide for Oracle and SAP 77
1. Shut down the database cleanly.
2. Mount the database if you are backing it up using RMAN.
3. Back up all datafiles, control files and, optionally, parameter files.
4. Restart the database in the normal online mode.
Oracle online
As opposed to an offline backup, an online backup is performed when a database is open.
The backup of an open database is inconsistent, because portions of the database are being modified and written to disk while the backup is progressing. Such changes to the database are entered into the online redo logs as well. A database running in the ARCHIVELOG mode enables the archiving of the online redo logs. In the case of a restore, this feature is essential to bring a database to a consistent state as part of the entire restore process.
When using an online backup, the following must be done in order to bring the database to a consistent state:
1. Restore the database files (which are inconsistent) to disk.
A clean shutdown means that the database is not shut down using the ABORT option.
2. Perform database recovery, which requires applying the Archived Redo Logs.
This is an Oracle operation.
An Oracle online database backup can be performed using the Oracle RMAN utility or Data Protector GUI. In the latter case, Data Protector creates and executes the RMAN script automatically based on data entered in the Data Protector GUI. During an Oracle online backup, the Oracle target database is open, while tablespaces, datafiles, control files, and archived redo logs are being backed up.
The database must operate in the ARCHIVELOG mode so that the current Online Redo Logs are archived to the Archived Redo Logs.
IMPORTANT:
Before you run an Oracle online backup, make sure that the database is really operating in ARCHIVELOG mode. This can be done on the Oracle server system by starting SQL*Plus and issuing the following command:
archive log list;
Integrating Oracle and Data Protector78
If the Oracle target database is not operating in the ARCHIVELOG mode, proceed as follows:
If SPFILE is used:
1. Shut down the database.
2. Mount the database.
3. Start SQL*Plus and type:
alter database archivelog;
alter database open;
alter system archive log start SCOPE=SPFILE;
If PFILE is used:
1. Shut down the database.
2. Change PFILE to enable log archiving by setting:
log_archive_start = true
3. Mount the database.
4. Start SQL*Plus and type:
alter database archivelog;
alter database open;
Oracle Data Guard:
be manually cataloged so that they are known to RMAN for future backups when:
The primary or standby control file is re-created. The archive logs must be
re-cataloged because RMAN uses the control file to determine which archive logs must be backed up.
The primary database role changes to standby after a failover. The archive logs
must be re-cataloged because a change in database role resets the version time of the mounted control file.
Use the RMAN command CATALOG ARCHIVELOG 'archive_log_file_name'; to manually catalog the archived redo logs.
Now you are ready to run an online backup of the Oracle database, using any of the following methods:
The archive logs generated after an archive log backup must
Integration guide for Oracle and SAP 79
Backup methods
Schedule a backup of an existing Oracle backup specification using the Data
Protector Scheduler. See “Scheduling backup specifications” on page 81.
Start an interactive backup of an existing Oracle backup specification using the
Data Protector GUI or the Data Protector CLI. See “Running an interactive
backup” on page 82.
Start a backup on the Oracle server using either Oracle Recovery Manager or
Oracle Enterprise Manager. See “Starting Oracle backup using
RMAN” on page 85.
Backup procedure
The following happens when you start a backup using the Data Protector user interface:
1. Data Protector executes ob2rman.pl on the client. This command starts RMAN
and sends the Oracle RMAN Backup Command Script to the standard input of the RMAN command.
2. The Oracle RMAN contacts the Oracle Server, which contacts Data Protector
via the MML interface and initiates a backup.
3. During the backup session, the Oracle Server reads data from the disk and sends
it to Data Protector for writing to the backup device.
Messages from the Data Protector backup session and messages generated by Oracle are logged to the Data Protector database.
A backup of the Oracle recovery catalog is performed automatically following each Oracle target database backup, unless otherwise specified in the backup specification. Using the standard Oracle export utility, the Data Protector ob2rman.pl starts an export of the Oracle recovery catalog to a file which is then backed up by Data Protector.
Deleting data from the recovery catalog
When backing up an Oracle database using the recovery catalog database, all information about the backup, restore, and database recovery is stored in the recovery catalog. This information is used by RMAN during the restore. If you overwrite or format the media on which this data is backed up, Data Protector exports the object from the Data Protector database. You must manually delete the data from the recovery catalog while logged on to RMAN. See the Oracle Recovery Manager User’s Guide and References for detailed information about deleting data from the recovery catalog.
Integrating Oracle and Data Protector80
Scheduling backup specifications
For more information on scheduling, see the online Help index: “scheduled backups”.
A backup schedule can be tailored according to your business needs. If you have to keep the database online continuously, then you should back it up frequently, including the backup of the Archived Redo Logs, which is required in case you need database recovery to a particular point in time.
For example, you may decide to perform daily backups and make multiple copies of the online redo logs and the Archived Redo Logs to several different locations.
An example of scheduling backups of production databases:
Weekly full backup
Daily incremental backup
Archived Log backups as needed
To schedule an Oracle backup specification, proceed as follows:
1. In the Data Protector Manager, switch to the Backup context.
2. In the Scoping Pane, expand Backup Specifications and then Oracle Server.
3. Double-click the backup specification you want to schedule and click the Schedule
tab.
4. In the Schedule page, select a date in the calendar and click Add to open the
Schedule Backup dialog box.
Integration guide for Oracle and SAP 81
5. Specify Recurring, Time options, Recurring options, and Session options..
Note that the backup type can be full or incremental, with the incremental level as high as Incr 4. See Figure 18 on page 82. See the RMAN documentation for details on incremental backup levels.
Figure 18 Scheduling backups
Click OK and then Apply to save the changes.
Running an interactive backup
An interactive backup can be performed any time after a backup specification has been created and saved. You can use the Data Protector GUI or CLI.
Starting a backup using the GUI
To start an interactive backup of an Oracle database using the Data Protector GUI, proceed as follows:
1. In the Context List, click Backup context.
Integrating Oracle and Data Protector82
2. In the Scoping Pane, expand Backup Specifications and then Oracle Server.
Right-click the backup specification you want to start and click Start Backup.
Integration guide for Oracle and SAP 83
3. In the Start Backup dialog box, select the Backup type and Network load options.
For information on these options, click Help.
Note that the backup type can be full or incremental, with the incremental level as high as Incr 4. See Figure 18 on page 82. See the RMAN documentation for details on incremental backup levels.
Click OK.
Figure 19 Starting an interactive backup
Starting a backup using the CLI
1. On an Oracle Server, switch to the directory:
Windows:
Data_Protector_home\bin
HP-UX, Solaris, and Linux:
Other UNIX:
/usr/omni/bin
HP OpenVMS:
$@OMNI$ROOT:[BIN]OMNI$CLI_SETUP.COM
Integrating Oracle and Data Protector84
/opt/omni/bin
To set up the CLI, run:
2. Run:
omnib -oracle8_list backup_specification_name [-barmode Oracle8Mode][list_options]
You can select among the following list_options:
-protect {none | weeks n | days n | until date | permanent}
-load {low | medium | high}
-crc
-no_monitor
Oracle8Mode = {-full | -incr1 | -incr2 | -incr3 | -incr4}
See the omnib man page for details.
Example
To start a backup using an Oracle backup specification called RONA, run the following command:
omnib -oracle8_list RONA
Starting Oracle backup using RMAN
To start an Oracle backup using RMAN, an Oracle backup specification must be created.
See “Backup” on page 57 for information on how to create an Oracle backup specification.
To start an Oracle backup using RMAN:
Integration guide for Oracle and SAP 85
1. Connect to the Oracle target database specified in the backup specification:
If you use the recovery catalog, run:
• On Windows: ORACLE_HOME\bin\rman target
Target_Database_Login catalog Recovery_Catalog_Login
• On UNIX: ORACLE_HOME/bin/rman target Target_Database_Login
catalog Recovery_Catalog_Login
• On HP OpenVMS:
a. Run ORAUSER.COM using $@OMNI$ROOT:[LOG]LOGIN.COM. b. Execute $rman target target_connect_string catalog
catalog_connect_string.
Target database login
The format of the target database login is user_name/password@service,
where:
user_name is the name by which a user is known to Oracle Server and to other users. Every user name is associated with a password and both have to be entered to connect to an Oracle target database. This user must have been granted Oracle SYSDBA or SYSOPER rights.
password must be the same as the password specified in the Oracle password file (orapwd), which is used for authentication of users performing database administration.
service is the name used to identify an SQL*Net server process for the target database.
Recovery catalog login
The format of the Recovery Catalog Database login is user_name/password@service,
where the description of the user name and password is the same as for the login information to the target database. Note that the Oracle user specified here has to be the owner of the Oracle Recovery Catalog.
service is the name used to identify SQL*Net server process for the Recovery Catalog Database.
Integrating Oracle and Data Protector86
2. Allocate the Oracle channels.
Allocating a channel tells RMAN to initiate an Oracle Server process for backup, restore, or recovery on the Oracle target database. For example:
allocate channel 'dev_0' type 'disk';
or
allocate channel 'dev_1' type 'sbt_tape';
where you specify the backup directly to disk in the first case and directly to tape in the second case.
To use Data Protector backup media, specify the channel type SBT_TAPE. For this channel type, RMAN needs the Data Protector MML:
• On OpenVMS clients with, ensure that a symbolic link to the Data Protector
MML exists.
• On Windows and UNIX clients, specify the path to the Data Protector MML
at run time by setting the SBT_LIBRARY RMAN script parameter. For details, see Step 3 on page 88.
If you specify more than a single allocate channel command, RMAN will establish multiple logon sessions and conduct multiple backup sets in parallel. This “parallelization” of backup and restore commands is handled internally by RMAN.
IMPORTANT:
On Windows, a maximum of 32 or 64 (if device is local) channels can be allocated.
Integration guide for Oracle and SAP 87
3. Specify the parms operand:
parms 'SBT_LIBRARY=Path_to_Data_Protector_MML, ENV(OB2BARTYPE=Oracle8, OB2APPNAME=DB_NAME,OB2BARLIST=backup_specification_name)';
Note that the RMAN script will not work without the above parameters being specified in this form.
On Windows and UNIX clients, set the SBT_LIBRARY parameter to point to the correct platform–specific Data Protector MML. The location and the filename of the Data Protector MML depend on the platform:
HP-UX, Solaris, and Linux:
Other UNIX systems:
Windows:
Data_Protector_home\bin
/opt/omni/lib
/usr/omni/lib
Table 7 MML filenames on different platforms
64-bit32-bitPlatform
libob2oracle8_64bit.sllibob2oracle8.slHP-UX
libob2oracle8_64bit.solibob2oracle8.soHP-UX on IA-64
libob2oracle8_64bit.solibob2oracle8.soSolaris
libob2oracle8_64bit.alibob2oracle8.aAIX
libob2oracle8_64bit.solibob2oracle8.soOther UNIX
orasbt.dllorasbt.dllWindows
N/AHP OpenVMS
LIBOBK2SHR_64.EXE
For example, on 32-bit Solaris client, set SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so.
Integrating Oracle and Data Protector88
4. Specify format:
format 'backup_specification<DB_NAME_%s:%t:%p>.dbf'
Note that %s:%t:%p and the Oracle database name are required, whereas the backup specification is recommended.
For example, if you have created and saved a backup specification named bspec1 for backing up an Oracle database identified by the Oracle instance called inst1, you would enter the following string:
format 'bspec1<inst1_%s:%t:%p>.dbf'
See the Oracle Recovery Manager User’s Guide and References for information on substitution variables. The Oracle channel format specifies which Oracle backup specification to use for the backup.
5. Optionally, specify backup incremental level.
Note that a Data Protector full backup performs the same operation as an incremental level 0 backup type in the Oracle RMAN scripts. They both back up all the blocks that have ever been used.
This option is required if you want to use the backup as a base for subsequent incremental backups.
To run a backup using RMAN, start RMAN by running the following command from the ORACLE_HOME directory (if you use the recovery catalog):
On Windows: bin\rman target Target_Database_Login catalog
Recovery_Catalog_Login
On UNIX: bin/rman target Target_Database_Login catalog
Recovery_Catalog_Login
On HP OpenVMS:
1. Run ORAUSER.COM using $@OMNI$ROOT:[LOG]LOGIN.COM.
2. Execute $rman target target_connect_string catalog
catalog_connect_string.
Examples of the RMAN scripts
Some examples of RMAN scripts that must be executed from the RMAN> prompt are listed below:
Integration guide for Oracle and SAP 89
NOTE:
In the following examples, the SBT_LIBRARY parameter is set to /opt/omni/lib/libob2oracle8.so, which is the correct path for 32–bit Solaris clients.
Backing up a single channel
To back up the Oracle instance ORACL , using a backup specification named ora1, enter the following command sequence:
run { allocate channel 'dev_0' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; backup incremental level 0 format 'oracl1<ORACL_%s:%t>.dbf' database; }
Backing up three channels in parallel
The RMAN backup script for backing up the database by using three parallel channels for the same backup specification would look like this:
run { allocate channel 'dev_0' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_1' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_2' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; backup incremental level 0 format 'ora1<ORACL_%s:%t>.dbf' database; }
Integrating Oracle and Data Protector90
Backing up all archived logs and tablespaces
If you want to back up the Archived Redo Logs and the tablespace SYSTEM and RONA of the previous database using three parallel channels and a backup specification named ora1, the RMAN script should look like this:
run { allocate channel 'dev_0' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_1' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_2' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; backup incremental level 0 format 'ora1<ORACL_%s:%t>.dbf' tablespace SYSTEM, RONA sql 'alter system archive log current' format 'ora1<ORACL_%s:%f:%p>.dbf' archivelog all; }
Backing up particular archived logs
To back up all Archived Redo Logs from sequence #5 to sequence #105 and delete the Archived Redo Logs after backup of the instance named ora1 is complete, run the following script:
run { allocate channel 'dev_0' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_1' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_2' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; backup (archivelog sequence between 5 and 105 delete input format 'ora1<ORACL_%s:%t:%p>.dbf'); }
If the backup fails, the logs are not deleted.
Integration guide for Oracle and SAP 91
Backing up the flash recovery area
If you want to back up the Oracle 10g/11g Flash Recovery Area using three parallel channels and a backup specification named ora1, the RMAN script should look like this:
run { allocate channel 'dev_0' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_1' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_2' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; backup format 'ora1<ORACL_%s:%t>.dbf' recovery area; }
Including control file in a backup specification
The current control file is automatically backed up when the first datafile of the system tablespace is backed up. The current control file can also be explicitly included in a backup, or backed up individually. To include the current control file after backing up a tablespace named COSTS, run the following script:
run { allocate channel 'dev_0' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_1' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_2' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; backup format 'ora1<ORACL_%s:%t>.dbf' (tablespace COSTS current controlfile); }
Backing up while allowing for some corrupted blocks
The set maxcorrupt command determines the number of corrupted blocks per datafile that can be tolerated by RMAN before a particular backup will fail.
Integrating Oracle and Data Protector92
If a backup specification named ora1 backs up the database and allows for up to 10 corrupted blocks per datafile /oracle/data1.dbs (UNIX systems) or C:\oracle\data1.dbs (Windows systems), then the appropriate RMAN script would be:
On UNIX
run { set maxcorrupt for datafile '/oracle/data1.dbs' to 10; allocate channel 'dev_0' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_1' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_2' type 'sbt_tape' parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8.so, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; backup incremental level 0 format 'ora1<ORACL_%s:%t>.dbf' database; }
On Windows
run { set maxcorrupt for datafile 'C:\oracle\data1.dbs' to 10; allocate channel 'dev_0' type 'sbt_tape' parms 'SBT_LIBRARY=Oracle_home\bin\orasbt.dll, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_1' type 'sbt_tape' parms 'SBT_LIBRARY=Oracle_home\bin\orasbt.dll, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; allocate channel 'dev_2' type 'sbt_tape' parms 'SBT_LIBRARY=Oracle_home\bin\orasbt.dll, ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=ora1)'; backup incremental level 0 format 'ora1<ORACL_%s:%t>.dbf' database; }
Integration guide for Oracle and SAP 93

Restore

You can restore the database objects using:
Data Protector GUI. See “Restoring Oracle using the Data Protector GUI” on page 96.
RMAN. See “Restoring Oracle using RMAN” on page 118.
Restorable items
You can restore the following database objects using both the Data Protector GUI or RMAN:
Control files
Datafiles
Tablespaces
Databases
Recovery Catalog Databases
Duplicating databases
Using the Data Protector GUI, you can also duplicate a production database. See “Duplicating an Oracle database” on page 110.
Microsoft Cluster Server clients
Before you start restoring a cluster-aware Oracle server, take the Oracle Database resource offline using, for example, the Cluster Administrator utility. See Figure
20 on page 95.
Integrating Oracle and Data Protector94
Figure 20 Taking the Oracle resource group offline
Verify that you have set the Prevent Failback option for the Oracle resource group and Do not restart for the DB_NAME.world resource, which is an Oracle Database resource.
Figure 21 Checking properties
MC/ServiceGuard clients
When restoring the database from a backup performed on a virtual host, you should set OB2BARHOSTNAME environment variable in the RMAN script. For example:
Integration guide for Oracle and SAP 95
run { allocate channel dev1 type 'sbt_tape' parms 'SBT_LIBRARY=Path_to_Data_Protector_MML, ENV=(OB2BARHOSTNAME=virtual.domain.com)'; restore datafile '/opt/ora9i/oradata/MAKI/example02.dbf'; release channel dev1; }

Prerequisites

An instance of Oracle must be created on the system to which you want to restore
or duplicate the database.
The database must be in the Mount state if the whole database is being restored,
or in the NoMount state if the control file is being restored or a database duplication is performed.

Restoring Oracle using the Data Protector GUI

For restore, RMAN scripts are generated with necessary commands, depending on selections made in the GUI. To use additional commands, use them manually from RMAN itself. You can also use the workaround described in “How to modify the RMAN restore script” on page 151.
Restoring database items in a disaster recovery
In a disaster recovery situation, database objects must be restored in a certain order. The following list shows you in which order database items must be restored. Under normal conditions it is possible to restore database items in any order.
If the recovery catalog was used:
1. Restore the recovery catalog database (if it was lost)
2. Restore the control file
3. Restore the entire database or data items
If the recovery catalog was not used:
1. Restore the control file from automatic backup.
If no automatic backup of the control file is available, see “The Recovery Catalog was lost and the control file cannot be restored” on page 150.
2. Restore the database or data items.
Integrating Oracle and Data Protector96
Changing the database state
Before you restore any database item or you perform a duplication of a database, ensure that the database is in the correct state:
Table 8 Required database states
Database stateItem to restore
NoMount (started)Control file, duplicating a database
All other items
1
When restoring only a few tablespaces or datafiles, then the database can be open with the tablespaces
or datafiles to be restored offline.
1
To put the database into the correct state, run:
sqlplus /nolog
SQL>connect user/password@service as sysdba;
SQL>shutdown immediate;
To put the database into NoMount state, run:
SQL>startup nomount;
To put the database into Mount state, run:
SQL>startup mount;
Restoring the recovery catalog database
The Oracle recovery catalog database is exported using the Oracle export utility to a binary file and backed up by Data Protector. This file has to be restored back to the disk and then imported into the Oracle database using the Oracle import utility. Data Protector provides a facility to do this automatically using the Oracle integration.
Mount
To restore the recovery catalog database:
1. Ensure that the recovery catalog database is in the Open state.
2. Remove the recovery catalog from the database (if it exists), using the RMAN
command DROP CATALOG.
3. In the Data Protector GUI, switch to the Restore context.
Integration guide for Oracle and SAP 97
4. Under Restore Objects, expand Oracle Server, expand the client on which the
database, for which you want to restore the recovery catalog, resides, and then click the database.
Integrating Oracle and Data Protector98
5. In the Restore action drop-down list, select Perform RMAN Repository Restore.
In the Results Area, select RECOVERY CATALOG.
If you want to change the recovery catalog login information, right-click RECOVERY CATALOG and click Properties. In Recovery Catalog Settings, specify the login information for recovery catalog.
Figure 22 Recovery catalog settings dialog
Integration guide for Oracle and SAP 99
6. In the Options page:
In User name and User group, specify the user name and password to the recovery catalog database.
From the Session ID drop-down list, select the Session ID.
For further information, see “Restore, recovery, and duplicate
options” on page 114.
7. Click Restore.
Proceed to restore the control file.
Restoring the control file
The control file contains all the information about the database structure. If the control file has been lost, you must restore it before you restore any other part of the database. The database should be in the NoMount state.
Depending on the type of the control file backup, the following types of restore are possible when restoring the control file:
Restoring from Data Protector managed control file backup (CONTROLFILE FROM
DP MANAGED BACKUP) The control file was backed up automatically by ob2rman.pl at the end of a
backup session, unless the option Disable Data Protector managed control file backup was selected.
The recovery catalog is not required for this restore option. The control files (ctrlDB_NAME.dbf) are restored to:
Windows: HP-UX, Solaris, and Linux: Other UNIX: HP OpenVMS:
After the restore, run the following script:
Data_Protector_home\tmp
/var/opt/omni/tmp
/usr/opt/omni/tmp
OMNI$ROOT:[TMP]
run { allocate channel 'dev0' type disk; restore controlfile from 'TMP_FILENAME'; release channel 'dev0'; }
Where TMP_FILENAME is the location to which the file was restored.
Restoring from RMAN autobackup (CONTROLFILE FROM RMAN AUTOBACKUP)
Integrating Oracle and Data Protector100
Loading...