Documente Academic
Documente Profesional
Documente Cultură
0
for Oracle
N15262B
September 2005
Disclaimer
The information contained in this publication is subject to change without notice. VERITAS Software
Corporation makes no warranty of any kind with regard to this manual, including, but not limited to,
the implied warranties of merchantability and fitness for a particular purpose. VERITAS Software
Corporation shall not be liable for errors contained herein or for incidental or consequential damages
in connection with the furnishing, performance, or use of this manual.
Third-Party Copyrights
For a list of third-party copyrights, see the NetBackup Release Notes appendix.
ii NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Restores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Oracle Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
iii
Chapter 2. NetBackup for Oracle QuickStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 3. Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
NetBackup Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Cluster Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Pushing the Software to All Clients Currently Specified in an Oracle Policy Type
33
Manually Linking AIX (32-bit or 64-bit) Using 32-bit Oracle8 or Oracle8i Software
46
Manually Linking HP-UX (32-bit or 64-bit) Using 32-bit Oracle8 or Oracle8i Soft-
ware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Manually Linking HP-UX (64 bit) Using 64-bit Oracle8 or Oracle8i Software . 51
iv NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Manually Linking IRIX (64-bit) Using 64-bit Oracle8i Software . . . . . . . . . . . . . 53
Manually Linking Solaris (32-bit or 64-bit) Using 32-bit Oracle8 or Oracle 8i Soft-
ware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
ware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Manually Linking Solaris (32-bit or 64-bit) Using 32-bit Oracle9i or Later Soft-
ware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
67
Chapter 4. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Description of Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Adding Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Schedule Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Adding Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Contents
v
Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Shell scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Creating RMAN Templates Using the NetBackup for Oracle RMAN Template
Generation Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Creating XML Export Templates Using the NetBackup for Oracle Wizard . . . 95
vi NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Browsing Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Running the NetBackup for Oracle Recovery Wizard on the Client . . . . . . . . . . . 113
Running a NetBackup for Oracle Recovery Shell Script on the Client . . . . . . . . . . 116
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Running the NetBackup for Oracle XML Export Script on the Client . . . . . . . 124
Contents vii
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
How Does NetBackup for Oracle with Advanced Client Work? . . . . . . . . . . . . . . . . . 153
Multistreaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Examples: Using Multiple Channels in RMAN Scripts with Proxy Backups . . . 157
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
viii NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Contents
ix
Enabling Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
x NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Restoring Archive Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
207
Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Retention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Contents
xi
Automatic Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
xii NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Preface
This guide describes how to install, configure, and use NetBackup for Oracle on UNIX
and Linux platforms. Throughout the NetBackup for Oracle documentation, the term
UNIX refers to both UNIX and Linux platforms. For information about the NetBackup
server software, see one of the following platform-specific manuals:
◆ NetBackup System Administrator’s Guide for UNIX and Linux, Volumes I and II
◆ NetBackup System Administrator’s Guide for Windows, Volumes I and II
Getting Help
You can find answers to questions and get help from the NetBackup documentation and
from the VERITAS technical support web site.
xiii
Getting Help
◆ Contact the VERITAS Technical Support staff and post questions to them
◆ View the NetBackup for Oracle Frequently Asked Questions (FAQ) page
◆ Search the knowledge base for answers to technical support questions
Note Telephone support for NetBackup for Oracle is only available with a valid
support contract. To contact VERITAS for technical support, dial the
appropriate phone number listed on the Technical Support Guide included in
the product box and have your product license information ready for quick
navigation to the proper support group.
xiv NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Accessibility Features
a. From the main http://support.veritas.com page, click the E-mail Support icon.
A wizard guides you to do the following:
● Select a language of your preference
Accessibility Features
NetBackup contains features that make the user interface easier to use by people who are
visually impaired and by people who have limited dexterity. Accessibility features
include:
◆ Support for assistive technologies such as screen readers and voice input (Windows
servers only)
◆ Support for keyboard (mouseless) navigation using accelerator keys and mnemonic
keys
For more information, see the NetBackup Installation Guide.
Preface xv
Comment on the Documentation
Please only use this address to comment on product documentation. See “Getting Help”
in this preface for information on how to contact Technical Support about our software.
xvi NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Introduction 1
NetBackup for Oracle integrates the database backup and recovery capabilities of the
Oracle Recovery Manager (RMAN) with the backup and recovery management
capabilities of NetBackup. NetBackup for Oracle also allows you to export and import
Oracle data in XML format for long-term archiving and retrieval.
This chapter introduces NetBackup for Oracle. It includes the following topics:
◆ NetBackup for Oracle features
◆ NetBackup for Oracle terminology
◆ NetBackup for Oracle overview
To install, configure, and run a test backup of your Oracle database, follow the
instructions in the next chapter, “NetBackup for Oracle QuickStart” on page 15.
1
NetBackup for Oracle Features
Feature Description
Media and device All devices supported by Media Manager are available to NetBackup
management for Oracle.
Scheduling facilities NetBackup scheduling facilities on the master server can be used to
schedule automatic and unattended Oracle backups.
This also lets you choose the times when these operations can occur.
Multiplexed backups and NetBackup for Oracle lets you take advantage of NetBackup’s
restores multiplexing capabilities. Multiplexing directs multiple data streams
to one backup device, thereby reducing the time necessary to
complete the operation.
Transparent execution of All backups and restores run simultaneously and transparently
both Oracle and regular file without any action from the NetBackup administrator.
system backup and restore The database administrator can run database backup and restore
operations operations through NetBackup. Alternatively, you can use Oracle’s
Recovery Manager (RMAN) as if NetBackup were not present.
Sharing the same Media It is possible to share the same devices and media used for other
Manager and disk storage backups or to give Oracle exclusive use of certain devices and media.
units used for other file
backups
Centralized and networked From the NetBackup master server, you can schedule database
backup operations backups or start them manually for any client. The Oracle databases
can also reside on hosts that are different from the devices on which
NetBackup stores the backups.
2 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle Features
Feature Description
Graphical user interfaces NetBackup provides the following graphical user interfaces for client
users and administrators:
◆ Backup, Archive, and Restore user interface
◆ NetBackup Administration Console for Java
◆ NetBackup Administration Console for Windows
A database administrator or NetBackup administrator can start
backup or restore operations for Oracle from the NetBackup
graphical user interface on the master server.
Parallel backup and restore NetBackup for Oracle supports the parallel backup and restore
operations capabilities of the RMAN. For example, this permits the user to run
more than one tape device at a time for a single Oracle backup or
restore, thereby reducing the time necessary to complete the
operation.
Templates The NetBackup for Oracle database wizards can create backup and
recovery templates. You can launch the Backup Wizard and the
Recovery Wizard from the NetBackup Backup, Archive, and Restore
interface. The wizards generate platform-independent templates that
contain configuration information that the software uses when
performing backups and restores. Because the wizard-generated
templates do not support all the features native to Oracle, you might
want to write a customized backup or restore script in an
operating-system defined scripting language. You can use a template
as the base for a script.
The following list describes the NetBackup for Oracle XML Export and XML Import
archiving features:
Feature Description
System- and database- NetBackup for Oracle uses the eXtensible Markup Language (XML)
independent archive format standard to represent relational database table data extracted from an
Oracle database.
Self-identifying archive The XML Schema standard is used to describe the table data that is
format included in an archive. In this way, the archive contains the key to
understanding the format of the data as well as the data itself.
Chapter 1, Introduction 3
NetBackup for Oracle Terminology
Feature Description
Command line interfaces Parameter files specify the table data to include in an archive and the
that allow export and table data to extract from an archive for import into an Oracle
import at row-level database.
granularity
Restore destination option NetBackup for Oracle can either restore XML data to an Operating
System directory or import the data back into the Oracle database.
Flexible archive image The NetBackup catalog contains information on the contents of the
searches archive that can be searched using flexible search criteria, such as
tablename or user.
eXtensible Markup Language XML 1.0 is a universal format for structured documents and data. The
(XML) XML 1.0 standards are produced by the World Wide Web Consortium
and include the XML Schema standard.
Unicode UTF-8 The character set encoding generated by NetBackup for Oracle.
UTF-8 is supported by standard XML processors and US7ASCII is a
strict subset of UTF-8.
4 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle Terminology
Archives
OS
Directory
Oracle XML Archive NetBackup for Oracle extracts database table data, converts it into
XML format, and stores XML data to either of the following types of
repositories:
◆ A directory
◆ A NetBackup Media Manager storage unit or disk storage unit
XML export NetBackup for Oracle converts Oracle table data to XML format (XML
schema, or metadata, and XML instance, or data).
Archive NetBackup stores the XML data on a NetBackup storage unit.
bporaexp command NetBackup for Oracle’s XML export utility converts Oracle database
table data into a self-identifying XML schema document and instance
document that can be archived by NetBackup or redirected to an OS
directory.
Chapter 1, Introduction 5
NetBackup for Oracle Terminology
Restores
OS
Directory
Format
OS
Directory
Oracle XML Restore NetBackup for Oracle manages the retrieval of archived database
table data, the parsing of the XML format, and the insertion of the
data back into the Oracle database.
Restore NetBackup retrieves the XML-formatted data from the storage unit.
XML import NetBackup for Oracle parses XML-formatted Oracle table data and
inserts data into the Oracle database.
bporaimp command NetBackup for Oracle’s XML import utility can parse the
XML-formatted data for re-insertion into the database or can redirect
the data to an OS directory.
Oracle Terms
Full Backup A full backup copies all blocks into the backup set, skipping only
datafile blocks that have never been used. Note that a full backup is
not the same as a whole database backup; full is an indicator that the
backup is not incremental.
A full backup has no effect on subsequent incremental backups,
which is why it is not considered part of the incremental strategy. In
other words, a full backup does not affect which blocks are included
in subsequent incremental backups.
Incremental Backup An incremental backup is a backup of only those blocks that have
changed since a previous backup. Oracle allows you to create and
restore incremental backups of datafiles, tablespaces, and a database.
You can include a control file in an incremental backup set, but the
control file is always included in its entirety. No blocks are skipped.
6 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle Terminology
Multilevel Incremental RMAN allows you to create multilevel backups. An integer identifies
Backup each level; for example, 0, 1, 2, and so on. A level 0 incremental
backup, which is the base of subsequent incremental backups, copies
all blocks containing data.
When you generate a level n incremental backup in which n is greater
than 0, you back up the following:
◆ All blocks that have been modified since the most recent backup at
a level n or lower. This is the default type of incremental backup. It
is called a differential incremental backup.
◆ All blocks that have been modified since the most recent backup at
level n-1 or lower. This is called a cumulative incremental backup.
The benefit to performing multilevel incremental backups is that you
do not back up all of the blocks all of the time. Incremental backups at
a level greater than 0 only copy blocks that were modified, which
means that the backup size can be significantly smaller and the
backup might require much less time. The size of the backup file
depends solely upon the number of blocks modified and the
incremental backup level.
Differential Incremental In a differential level n incremental backup, you back up all blocks
Backup that have changed since the most recent backup at level n or lower.
For example, in a differential level 2 backup, you back up all blocks
modified since the last level 2, level 1, or level 0 backup. Incremental
backups are differential by default.
Cumulative Incremental In a cumulative level n incremental backup, you back up all blocks
Backup that have changed since the most recent backup at level n-1 or lower.
For example, in a cumulative level 2 backup, you back up all blocks
changed since the most recent level 1 or level 0 backup.
Cumulative incremental backups reduce the work needed for a
restore by ensuring that you only need one incremental backup from
any particular level at restore time. Cumulative backups require more
space and time than Differential Incremental Backups, however,
because they duplicate the work done by previous backups at the
same level.
Chapter 1, Introduction 7
NetBackup for Oracle Terminology
RMAN RMAN backs up, restores, and recovers database files. RMAN starts
Oracle server processes on the target database. These Oracle server
processes perform the backup and restore. RMAN performs backup
and recovery procedures, and it greatly simplifies the tasks
administrators perform during these processes. However, RMAN
cannot directly manage the storage devices and media used in its
backups, so it must be integrated with an application that has these
capabilities. NetBackup for Oracle provides device and media
management capabilities by integrating RMAN with NetBackup and
its media management software. Other advantages are access to
NetBackup’s automatic scheduling facilities and the graphical
interfaces.
RMAN Repository An RMAN recovery catalog or the database control file is a repository
for information that is used and maintained by RMAN. RMAN uses
this information to determine how to run requested backup and
restore actions.
For a description of the recovery catalog, see the Oracle Server Backup
and Recovery Guide.
rman command The rman command starts an RMAN backup or restore. This
command is described in the Oracle Server Backup and Recovery Guide.
RMAN script The RMAN script specifies the commands for RMAN to perform (for
example, backups, and restores). For information on RMAN
commands and script files, see your Oracle documentation.
There are example RMAN shell scripts in the
/usr/openv/netbackup/ext/db_ext/oracle/samples
/rman directory. These example scripts run RMAN commands and
are fully commented to explain the features used. You can review
these examples and use them as a starting point for developing
backup, restore, and recovery scripts.
8 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle Overview
Network (TCP/IP)
NetBackup software:
– NetBackup Master Server
– NetBackup Media Server
RMAN
Chapter 1, Introduction 9
NetBackup for Oracle Overview
specifies the operations to be performed (for example, backup or restore). The RMAN
script also defines other components of the operation, such as the database objects to be
backed up or restored.
During a backup or restore, RMAN controls the data streams going into or out of a
database. RMAN can access storage devices when it is integrated with a media
management system, such as that provided by NetBackup.
2. When the process requires media to store backup data, RMAN starts a user-directed
backup by issuing a backup request.
3. The NetBackup media server connects to NetBackup for Oracle on the client and
transfers the database data to secondary storage.
10 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle Overview
A restore works in essentially the same manner except that RMAN issues a restore
request. This causes NetBackup to retrieve the data from secondary storage and send it to
NetBackup for Oracle on the client.
RMAN supports parallel operations, so a single rman command can start more than one
backup or restore on the NetBackup system.
The status for an RMAN operation is stored in the RMAN catalog or in the database
control file. This is the same status that is indicated by the output of the RMAN command
used to run the backup or restore. This is the only status that a database administrator
must check to verify that a backup or restore has been successful.
NetBackup also logs status, but only for its own part of the operation. The database
administrator cannot use the NetBackup status to determine whether rman was
successful. Errors can occur in rman that do not affect NetBackup and are not recorded in
its logs.
Chapter 1, Introduction 11
NetBackup for Oracle Overview
XML schema(s),
XML instance(s)
OCI
Script or template
Command line
(bporaexp)
(Parameter file) Backup, archive, and
restore interface
Scheduler
NetBackup
NetBackup for Oracle users or automatic schedules start database XML export archives by
performing a manual backup of an Oracle policy, by invoking the script or template at the
command line on the client, or by invoking a template through the Backup, Archive, and
Restore interface.
For an XML export archive:
1. The NetBackup for Oracle script or template calls the bporaexp utility with a
specified parameter file.
2. The Query Processor uses the parameters in the specified file to build an SQL query
for each table.
3. Oracle’s OCI API executes the queries on the Oracle instance to be archived.
12 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle Overview
4. The Query Processor passes the output (including metadata and data for a single table
or multiple tables) to the XML Generator.
5. For each table passed, the XML Generator builds one or more sets of XML Schema
and XML Instance documents.
XML schema(s),
XML instance(s)
Option to
restore XML
files on disk
XML schema(s),
XML Parser XML instance(s) NetBackup
Command line or
Chapter 1, Introduction 13
NetBackup for Oracle Overview
NetBackup for Oracle users start database XML import restores by invoking a NetBackup
for Oracle script or template at the client command line or by invoking an XML import
restore template through the Backup, Archive, and Restore interface.
For an XML import restore:
1. The NetBackup for Oracle script or template calls the bporaimp utility with a
specified parameter file.
2. The input parameters that identify the XML Archive to restore are passed to
NetBackup.
3. NetBackup locates and reads the set of XML schema and instance documents from the
NetBackup storage unit.
4. The XML data stream is passed to an XML parser, which passes the data to the XML
Data Loader.
5. The XML Data Loader uses Oracle’s OCI API to insert the data into the database.
Optionally, bporaimp allows the XML data stream to bypass the XML parser and be sent
to an operating system directory. In addition, users can restore the table metadata only
into an operating system directory. bporaimp also allows import from an operating
system directory into Oracle.
14 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle QuickStart 2
This chapter shows how to install and configure a simple NetBackup for Oracle
deployment and to run an Oracle RMAN database backup. The procedures in this chapter
assume a regular Oracle RMAN backup with NetBackup for Oracle. For Advanced Client
options, see “NetBackup for Oracle with Advanced Client” on page 147.
For more detailed instructions, see the following chapters:
◆ “Installation” on page 27
◆ “Configuration” on page 69
15
2. Make sure a valid license key for NetBackup for Oracle has been registered. To view
or add license keys, perform one of the following:
• Run the command
/usr/openv/netbackup/bin/admincmd/get_license_key.
• Open the NetBackup Administration Console and choose Help > License Keys.
16 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installing NetBackup for Oracle
cd /CD_mount_point
b. Answer y.
You are presented with a menu of all database agents available on the CD-ROM.
e. Answer y.
• The version file, compressed tar file, and install_dbext script are loaded
to directory /usr/openv/netbackup/dbext.
• The install script automatically runs the install_dbext script.
• If the receiving client is configured as an HP-UX11.00, HP-UX11.11, Solaris7,
or Solaris8, IRIX65, AIX4.3.3, or AIX5 machine, both the 32-bit and 64-bit
versions of NetBackup for Oracle are installed.
• If install_dbext completes successfully, there is a version file in directory
/usr/openv/netbackup/ext/ that contains the version of NetBackup for
Oracle that was installed and an installation timestamp.
Using OS Authentication:
sqlplus /nolog
connect / as sysdba
shutdown immediate
exit
shutdown immediate
exit
c. Change the $ORACLE_SID environment variable to any other SID that uses this
Oracle installation, and repeat the preceding commands.
./oracle_link
This script determines the Oracle version level and then links Oracle to
NetBackup. All output from this script is written to /tmp/make_trace.pid. To
change the trace file location, change the MAKE_TRACE variable in the
oracle_link script.
18 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring a NetBackup for Oracle Policy and Schedule
2. Start the NetBackup Administration Console by clicking Start > All Programs >
VERITAS NetBackup > NetBackup Administration Console.
1. If necessary, use File > Change Server to select the master server upon which you
want to create the policy.
a. In the Policy name box, type a unique name for the new policy.
b. Click in the box to the right of Use add policy wizard to use the Backup Policy
Configuration Wizard. Click OK.
c. Click Next.
a. On the Policy Name and Type screen, select Oracle as the policy type. Click Next.
b. On the Client List screen, click Add. Add the name of the NetBackup for Oracle
client. Select the hardware and operating system. Click OK. Click Next.
5. Proceed to “To create schedules” on page 20 for information on creating schedules for
this policy.
▼ To create schedules
Schedules determine when NetBackup for Oracle initiates a backup. An Oracle backup
requires at least two different schedules:
◆ An application backup schedule. When you create an Oracle policy, NetBackup for
Oracle automatically creates a Default-Application-Backup schedule.
◆ An Automatic Full Backup schedule. You create this schedule. It enables scheduled
backup operations on the client.
20 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Backing Up the Oracle Database
4. Click OK.
9. Follow the instructions on the Start screen to specify a time for this schedule.
You must specify a time and a duration for the Automatic Full Backup schedule.
Depending on the size of the database and your site conditions, an Automatic Full
Backup can take a long time to complete. Choose a time when your system is not
likely to be in use. For example, you might specify Sunday evenings from 1800-2300.
By default, the retention period is infinity, and the frequency is once per week.
◆ “To back up the Oracle database using the Backup Wizard” on page 24
1. Use operating system methods to log into the client upon which NetBackup for Oracle
is installed.
2. Make sure that the Oracle database is in the mount or open state.
3. Start the NetBackup Backup, Archive, and Restore interface on the NetBackup client
by running the following command:
/usr/openv/java/jbpSA &
22 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Backing Up the Oracle Database
instance, go to step 8.
step 9.
b. Proceed to step 10
a. Expand the instance by clicking the node icon to the left of the name of the Oracle
instance data file you want to back up.
c. Select the data files or tablespaces in the instance that you want to back up by
clicking in the checkbox to the left of each instance data file’s name.
d. Proceed to step 10
Note This procedure describes how to perform an ONLINE backup. It assumes that the
Oracle database’s archiving mode is set to ARCHIVELOG.
2. Click Next.
The Target Database Logon Credentials dialog box displays. Fill in the fields in this
dialog box, as follows:
• If you use OS authentication for Oracle, select OS Authentication.
• If you use Oracle authentication via a password file, select
• A User name
• A Password with Oracle SYSDBA privileges
• ( Optional) A Net service name (TNS alias)
• (Optional) Select Use Oracle RMAN recovery catalog. This is not required. If this
is your first NetBackup for Oracle backup, you can leave this option unselected.
• If you did not choose to use the recovery catalog, skip to step 4.
3. Click Next.
If you chose to use the recovery catalog, you see the Recovery Catalog Logon
Credentials screen. Supply the appropriate User name and Password for the recovery
catalog.
5. Click Next to accept all defaults. The Configuration Options screen displays.
6. Click Next to accept all defaults. The Backup Options screen displays.
7. Click Next to accept all defaults. The Database State screen displays.
24 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Backing Up the Oracle Database
8. Click Next to accept all defaults. The NetBackup Configuration Variables screen
displays.
In the Backup policy name field, enter the name of the Oracle policy you created on
the NetBackup master server.
10. Click Next to accept all defaults. The Template Summary screen displays.
26 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installation 3
This chapter describes how to perform the following tasks:
◆ Verifying the installation prerequisites for NetBackup for Oracle. Perform this task
before installing this agent.
◆ Installing NetBackup for Oracle.
▼ To verify compatibility
3. From the Select Product list in the right pane, click NetBackup Enterprise Server.
27
Verifying the Installation Prerequisites
5. In the list of documents, click NetBackup Enterprise Server (tm)/ Server x.x Database
Agent Compatibility (updated date).
For x.x, look for the current release. For date, look for the most recent date.
For information on supported cluster environments for NetBackup for Oracle, see
NetBackup (tm) x.x Cluster Compatibility (updated date).
6. Click on the link for the PDF document, which is a downloadable file that enables you
to view the supported database spreadsheet for this release.
7. Read the document and verify that the software in your environment is compatible
with the NetBackup and NetBackup for Oracle software.
NetBackup Software
Verify that the following requirements are met for the NetBackup server and client
software:
❏ The NetBackup server software is installed and operational on the NetBackup server.
The NetBackup server platform can be any of those that NetBackup supports. For
installation information, see the NetBackup Installation Guide.
❏ The NetBackup client software is installed on the client where you will be backing up
the databases.
❏ The version of the NetBackup client and the version of NetBackup for Oracle to be
installed must be the same (for example, 6.0).
❏ There must be adequate disk space on each machine upon which you are installing
NetBackup for Oracle. Less than two megabytes of additional disk space is required in
the /usr/openv/netbackup directory. However, more disk space might be needed
at run time.
❏ Make sure that you have configured backup media in a Media Manager or disk
storage unit. The amount of backup media required depends on the devices used, the
sizes of the databases that you are backing up, the amount of data that you are
archiving, the size of your backups, and the frequency of backups or archives. For
information on using Media Manager, see the NetBackup Media Manager System
Administrator’s Guide.
Database Software
Verify the following regarding the database software on the NetBackup client:
28 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Verifying the Installation Prerequisites
documentation.
Cluster Software
Verify the following requirements if you are installing the NetBackup for Oracle software
on a NetBackup server configured in a NetBackup cluster:
❏ The Oracle vendor software is installed and operational on each node to which
NetBackup can failover.
❏ The NetBackup server software is installed and configured to work in a NetBackup
cluster. Follow the instructions in the NetBackup Installation Guide, including running
the cluster_config script after the NetBackup server software has been installed.
You only need to run the cluster_config script after you install the NetBackup
server software. You do not need to run cluster_config after installing NetBackup
for Oracle on a NetBackup server that is part of a NetBackup cluster.
The following additional information also pertains to cluster environments:
❏ Make sure you install the NetBackup client software and the NetBackup for Oracle
software on each node to which NetBackup can failover.
❏ Run commands such as bpplclients and update_dbclients from the active
NetBackup master or media server. If you plan to perform a remote installation, in
which you push the database agent software to clients located in a cluster, specify the
individual node names, not the virtual names, in the client list.
Chapter 3, Installation 29
Installing NetBackup for Oracle
2. (Conditional) Perform this step only if you are installing on a server that is part of a
NetBackup cluster.
30 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installing NetBackup for Oracle
su - root
4. Verify that a registered and valid license key for NetBackup for Oracle resides on the
master server.
You can obtain master server license information from either the master server or the
media server. To view or add license keys, perform one of the following actions:
◆ From the master or media server, run the following command:
/usr/openv/netbackup/bin/admincmd/get_license_key
When the system prompts you, type the host name of the NetBackup master
server.
◆ Open the NetBackup Administration Console and choose Help > License Keys.
If the NetBackup master server is part of a NetBackup cluster, the license key must be
registered on each node.
b. Answer n.
Chapter 3, Installation 31
Installing NetBackup for Oracle
e. Answer y.
The install script identifies the types of client software loaded during the
installation of the NetBackup server. By default, any matching NetBackup for
Oracle software is automatically loaded. If there are more platforms available, the
script displays a menu that gives you the opportunity to add more client types to
the default list. After the list is complete, the installation script copies database
agent version files, tar(1) files compressed with gzip(1), and the
install_dbext script to directory /usr/openv/netbackup/dbext.
10. Decide how you want to distribute the NetBackup for Oracle software to the clients.
Regardless of whether you are upgrading clients in an existing environment or you
are performing a new installation, use one of the following methods:
◆ Distribute to all clients currently specified in an Oracle policy type. This method
distributes the NetBackup for Oracle software to all clients that are currently
included in an Oracle policy type. You can use this method only if you are
pushing from a master server. For information on this method, see “Pushing the
Software to All Clients Currently Specified in an Oracle Policy Type” on page 33.
32 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installing NetBackup for Oracle
◆ Distribute to selected clients. This method distributes the NetBackup for Oracle
software to selected clients only. If you are performing a new installation, and you
plan to add clients to an Oracle policy type after you install the software, you can
install the software on such clients now and configure the policy later. This
method also allows you to skip clients that you do not want to upgrade to 6.0 at
this time. You can use this method whether you are pushing from a master server
or from a media server. For information on this method, see “Pushing the
Software to New or Selected Clients” on page 36.
Note Make sure that the NetBackup for Oracle version is the same version as the
NetBackup client software.
Note If you are pushing the NetBackup for Oracle software from a server that is part of a
NetBackup cluster, type all commands in this procedure from the active NetBackup
node.
Chapter 3, Installation 33
Installing NetBackup for Oracle
The host names of the clients must be the clients’ individual node names. They
cannot be virtual names. The correct value for the individual node names is
returned by the hostname(1) and the domainname(1) commands. The format
can be either hostname or hostname.domainname.
If the client list contains virtual names, you cannot complete this procedure. Do
one of the following:
◆ To exit this procedure if there are two or more clients, press the Enter key and
then type n to stop the upgrade and exit from this installation dialog. To
install the software in this situation, use “Pushing the Software to New or
Selected Clients” on page 36.
◆ To exit this procedure if there is only one client, type n. To install the software
in this situation, use “Pushing the Software to New or Selected Clients” on
page 36.
If the client list contains only individual node names, proceed to the following
step.
◆ The database agent software for that client type was not loaded onto the
server in “To load the NetBackup for Oracle files on a UNIX server” on
page 30.
◆ The client does not belong to an Oracle policy type.
The skipped client list is in $TMPDIR/skipped_clients.PID, where PID is the
process identifier. If the TMPDIR environment variable is not set, the default is
/tmp. If no file is present, no clients were skipped.
34 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installing NetBackup for Oracle
max The maximum number of simultaneous updates that is allowed. The value
displayed ranges from 1 to 30.
dflt The number the program uses if you press Enter without specifying a
number. The value displayed ranges from 1 to 15.
If you want the installation software to perform dflt simultaneous updates, press
Enter.
If you want to specify a different number of simultaneous updates, type a number in
the range 1 ≤ number ≤ max, and then press Enter.
For example, if three clients are to be updated, the max and dflt values are 3. If 50
clients are to be updated, the max value is 30, and the dflt value is 15.
update_dbclients starts the number of updates that you specify. If this number is
less than the total number of client updates to be performed, new updates start as the
previous updates finish until all of the updates have been completed.
4. Indicate whether or not you want to upgrade the clients at this time.
Based on your answer, the time it will take to update the clients is displayed, followed
by this question:
Do you want to upgrade the clients now? (y/n) [y]
Chapter 3, Installation 35
Installing NetBackup for Oracle
Note If you are pushing the NetBackup for Oracle software from a server that is part of a
NetBackup cluster, type all commands in this procedure from the active NetBackup
node.
1. On the master server, type the following command to ensure that the bpdbm daemon
is running:
/usr/openv/netbackup/bin/bpps
If the output shows that the bpdbm daemon is not running, type the following
command to start the daemon:
/usr/openv/netbackup/bin/initbpdbm
3. Use the bpplclients(1M) command to create a file that contains a list of clients
currently configured in the NetBackup database.
The options to use on this command differ depending on whether you are installing
from a master server or from a media server, as follows:
◆ If you are performing the install from the master server, type the following
command:
./admincmd/bpplclients -allunique -noheader > file
◆ If you are performing the install from a media server, type the following
command:
36 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installing NetBackup for Oracle
file Name of the file to contain the list of unique clients. If no clients have
been configured in the NetBackup database, file is empty. Create
file using the same format as that generated by bpplclients.
hardware The hardware name. For examples, execute the ls(1) command in
directory /usr/openv/netbackup/client.
op_system The operating system name. For examples, execute the ls(1)
command in directory
/usr/openv/netbackup/client/hardware.
For example:
Chapter 3, Installation 37
Installing NetBackup for Oracle
Note You do not need to run the cluster_config script after installing NetBackup for
Oracle on a server that is part of a NetBackup cluster.
2. (Conditional) Perform this step only if you are installing on a server that is part of a
NetBackup cluster.
38 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installing NetBackup for Oracle
5. Verify that a registered and valid license key for NetBackup for Oracle resides on the
master server.
You can obtain master server license information from either the master server or the
media server. To view or add license keys, perform one of the following actions:
◆ From the master or media server, type the following command:
/usr/openv/netbackup/bin/admincmd/get_license_key
When the system prompts you, type the host name of the NetBackup master
server.
◆ Open the NetBackup Administration Console and choose Help > License Keys.
If the NetBackup master server is part of a NetBackup cluster, the license key must be
registered on each node.
6. (Conditional) Log out of the media server or master server and return to the local
client.
Perform this step if you logged into a media server or the master server in step 4 to
verify the license.
Note Make sure that the NetBackup for Oracle version is the same version as the
NetBackup client software.
Chapter 3, Installation 39
Installing NetBackup for Oracle
b. Answer y.
A menu of all database agents available on the CD-ROM displays.
e. Answer y.
The following actions occur:
◆ The script writes the version file, a tar(1) file compressed with gzip(1), and
the install_dbext script to directory /usr/openv/netbackup/dbext.
◆ The install script automatically runs the install_dbext script.
Note You do not need to run the cluster_config script after installing NetBackup for
Oracle on a server that is part of a NetBackup cluster.
10. (Conditional) Select another node upon which to install the software.
Perform this step under the following circumstances:
◆ If you are installing the NetBackup for Oracle software on a server that is part of a
NetBackup cluster.
and
◆ If you have nodes that still need to have the software installed.
If there are inactive nodes that do not yet have the software installed upon them,
select one of these inactive nodes and repeat step 3 through step 10 for that node.
If you have installed the software on all the inactive nodes, select the active node and
repeat step 3 through step 10 for that node.
40 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installing NetBackup for Oracle
Perform this step if you are installing the NetBackup for Oracle software on a server
that is part of a NetBackup cluster. Unfreezing the active node is the last step in the
installation process. Unfreeze the active node only after all the software has been
installed on all nodes.
For information on how to unfreeze the active node in your specific cluster
environment, see the NetBackup High Availability System Administrator’s Guide.
Chapter 3, Installation 41
Linking the Oracle Recovery Manager (RMAN) With NetBackup
42 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
1. Make sure that your Oracle environment variables are defined in the following way:
connect internal
shutdown
exit
c. Change the ORACLE_SID environment variable to any other SID that uses this
Oracle installation and repeat the commands in step b.
4. Determine whether to restart Oracle and resume operations or to link the library.
◆ If you are upgrading an existing NetBackup for Oracle installation, restart the
Oracle instance you stopped before you ran the update_dbclients command
and then resume operations.
◆ If you are performing an initial installation, follow the instructions in “Linking
the Library” on page 44. This section describes describes both an automatic and a
manual method. The automatic method is preferred.
Chapter 3, Installation 43
Linking the Oracle Recovery Manager (RMAN) With NetBackup
Note Perform the linking procedure in this section only if you are installing NetBackup
for Oracle for the first time. You do not need to link the library if you are installing
NetBackup for Oracle as an upgrade.
▼ To link automatically
▼ To link manually
44 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
page 63
Software” on page 65
page 66
on page 67
Note If you are using a later Oracle release, you do not have to use the make(1) command
to make a new Oracle executable to use the NetBackup for Oracle API library
because the Oracle executable always searches for the shared library (for example,
$ORACLE_HOME/lib/libobk.so).
The instructions in the following subsections reflect this change and describe the
conditions under which you need to issue the make(1) command.
Chapter 3, Installation
45
Linking the Oracle Recovery Manager (RMAN) With NetBackup
Oracle8i Software
▼ To link manually
export LIBPATH
3. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.a
4. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 3 shows that libobk.a is present.
For example:
mv libobk.a libobk.a.orig
Perform this step if you are using Oracle8 release 8.0.4, 8.0.5, or 8.0.5.1.
46 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
cd $ORACLE_HOME/rdbms/lib
7. Type the following dump(1) command and examine the output to verify that the
library is linked:
dump $ORACLE_HOME/bin/oracle
0 /db/ora805/lib/:/db/ora805/rdbms/lib:/usr/lib:/lib
1 libc_r.a shr.o
2 libpthreads.a hr_comm.o
3 libpthreads.a hr_xpg5.o
4 libc_r.a aio.o
5 libobk.a shr.o
6 / unix
Chapter 3, Installation 47
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
export LIBPATH
3. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.a
4. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 3 shows that libobk.a is present.
For example:
mv libobk.a libobk.a.orig
48 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
export SHLIB_PATH
3. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.sl
4. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 3 shows that libobk.sl is present.
For example:
mv libobk.sl libobk.sl.orig
Chapter 3, Installation 49
Linking the Oracle Recovery Manager (RMAN) With NetBackup
◆ On Oracle8 releases 8.0.5, 8.0.5.1, and 8.0.6 for HP-UX 10.20 9000/816, type
the following command and make sure to include the LIBMM= at the end:
make -f ins_rdbms.mk ioracle LLIBMM="$ORACLE_HOME/lib/libobk.sl" LIBMM=
◆ On Oracle8 releases 8.0.5, 8.0.5.1, and 8.0.6 for HP-UX 11.00 9000/879, type
the following command:
make -f ins_rdbms.mk ioracle LLIBOBK="$ORACLE_HOME/lib/libobk.sl"
50 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
export SHLIB_PATH
◆ On Oracle8 release 8.0.6 and on Oracle8i releases 8.1.6 and 8.1.7, type the
following command:
cd $ORACLE_HOME/lib64
3. Type the following command to determine whether the Oracle library exists:
ls -l libobk.*
4. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 3 shows that libobk.sl or libobk.a are
present.
For example:
mv libobk.a libobk.a.orig
mv libobk.sl libobk.sl.orig
Chapter 3, Installation 51
Linking the Oracle Recovery Manager (RMAN) With NetBackup
52 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
export LD_LIBRARY_PATH
ls -l libobk.so64
4. (Conditional) Use the mv(1) command to move the Oracle libraries to alternate
locations.
Perform this step if the output from step 3 shows that libobk.so or libobk.so64
are present.
This step differs depending on your Oracle release level.
◆ On Oracle8i 8.1.6, type the following commands:
mv libobk.so libobk.so.orig
mv libobk.so64 libobk.so64.orig
Chapter 3, Installation 53
Linking the Oracle Recovery Manager (RMAN) With NetBackup
export COMPILER_DEFAULTS_PATH
54 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
export LD_LIBRARY_PATH
3. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
4. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 3 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
Chapter 3, Installation 55
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
◆ On Oracle8 releases 8.0.3, 8.0.4, 8.0.5, 8.0.5.1, 8.0.6 or Oracle8i releases 8.1.5, 8.1.7,
type the following command:
ls -l libobk.so
3. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so or
libdsbtsh8.so are present.
This step differs depending on your Oracle release level.
◆ On Oracle8 releases 8.0.3, 8.0.4, 8.0.5, 8.0.5.1, 8.0.6 or Oracle8i releases 8.1.5, 8.1.7,
type the following command:
mv libobk.so libobk.so.orig
◆ On Oracle8 releases 8.0.3, 8.0.4, 8.0.5, 8.0.5.1, 8.0.6 or Oracle8i releases 8.1.5, 8.1.7,
type the following command:
ln -s /usr/openv/netbackup/bin/libobk.so.1 libobk.so
56 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
Perform this step only if you are using Oracle8 releases 8.0.3, 8.0.4, 8.0.5, 8.0.5.1, 8.0.6
or Oracle 8i release 8.1.6.
command:
Chapter 3, Installation 57
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
3. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libdsbtsh.so or libobk.so
are present.
This step differs depending on your Oracle release level.
◆ On Oracle8i release 8.1.6, type the following command:
mv libdsbtsh8.so libdsbtsh8.so.orig
Perform this step only if you are using Oracle8i release 8.1.6.
58 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
Chapter 3, Installation 59
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
export LD_LIBRARY_PATH
3. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.*
4. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 3 shows that libobk.so or libobk.a are
present.
Type one or both of the following commands:
mv libobk.a libobk.a.orig
mv libobk.so libobk.so.orig
ln -s libobk.so.1 libobk.so
60 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
release 8.1.5.
◆ On Oracle8 releases 8.0.4, 8.0.5, and 8.0.6, type the following commands:
cd $ORACLE_HOME/rdbms/lib
◆ On Oracle8i release 8.1.5, type only one of the following two command sets:
◆ The following commands use the provided relinking script to create a new
Oracle executable. This is the preferred method:
cd $ORACLE_HOME/bin
relink oracle
◆ The following commands use the make(1) command to create a new Oracle
executable:
cd $ORACLE_HOME/rdbms/lib
7. Type the following odump(1) command, which shows the timestamp and checksum,
to verify that the library is linked:
odump -Dl oracle
oracle:
Chapter 3, Installation 61
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
2. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.*
3. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.a exists.
For example:
mv libobk.a libobk.a.orig
62 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
Software
▼ To link manually
2. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.*
3. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.sl or libobk.a are
present.
◆ If libobk.sl exists, type the following command:
mv libobk.sl libobk.sl.orig
Chapter 3, Installation 63
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
2. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
3. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
64 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
2. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
3. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
Chapter 3, Installation 65
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
2. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
3. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
66 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Linking the Oracle Recovery Manager (RMAN) With NetBackup
▼ To link manually
2. Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.*
3. (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so or libobk.a are
present.
◆ If libobk.so exists, type the following command:
mv libobk.so libobk.so.orig
ln -s libobk.so.1 libobk.so
Chapter 3, Installation 67
About the Oracle Recovery Catalog
cp oracle0 oracle
cd $ORACLE_HOME/lib
mv libobk.so.orig libobk.so
If you are using 64-bit Oracle software, the third command in this series is as follows:
cd $ORACLE_HOME/lib64
◆ Datafile copies.
◆ Stored scripts. These are named, user-created sequences of RMAN and SQL
commands.
Oracle recommends you use RMAN with a recovery catalog, especially if you have 20 or
more datafiles. However, you are not required to maintain a recovery catalog with
RMAN.
For information on the benefits and disadvantages of using a recovery catalog, see your
Oracle documentation.
68 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuration 4
Before attempting to configure NetBackup for Oracle, complete the installation procedure
as described in the Installation chapter.
The configuration procedure is as follows:
69
Configuring the Maximum Jobs Per Client
1. In the left pane of the NetBackup Administration Console, expand Host Properties.
number_of_policies The number of policies of any type that can back up this
client at the same time. This number can be greater than
one. For example, a client can be in two policies in order
to back up two different databases. These backup
windows can overlap.
For Oracle backups and restores, the number of jobs is hard to determine because Oracle
internally determines when and how many streams to run in parallel to optimize
performance.
Tip Enter a large enough value for the Maximum jobs per client attribute to meet the
number of jobs executed by Oracle. You might need to experiment with different
values at your site.
70 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Backup Policies
◆ Policy attributes
◆ Backup schedules
◆ Clients to be backed up
3. If your site has more than one master server, choose the one on which you want to
add the policy.
4. From the Windows interface: In the left pane, right-click Policies and choose New
Policy.
From the Java interface: In the left pane, click Policies. In the All Policies pane,
right-click the master server, and click New.
The Add a New Policy dialog box displays.
5. In the Policy name field, type a unique name for the new policy.
6. Click OK.
A dialog box displays in which you can specify the general attributes for the policy.
Chapter 4, Configuration 71
Configuring Backup Policies
7. From the Policy Type box, select the Oracle policy type.
Note The Oracle policy type does not appear in the drop-down list unless your master
server has a license key for NetBackup for Oracle.
8. Complete the entries on the Attributes tab. For more information, see “Description of
Attributes”, which follows this procedure.
10. When you have added all the schedules, clients, and Backup Selections you need,
click OK. The new policy is created.
Description of Attributes
With a few exceptions, NetBackup manages a database backup like a file system backup.
The following table shows the policy attributes that are different for Oracle backups. This
information is used when you are adding a new policy.
Other policy attributes vary according to your specific backup strategy and system
configuration. For more information on policy attributes, see the NetBackup System
Administrator’s Guide, Volume I.
Attribute Description
Policy type Determines the types of clients that can be in the policy and, in some cases,
the types of backups that NetBackup can perform on those clients. To use
NetBackup for Oracle, you must define at least one policy of type Oracle.
Keyword phrase For NetBackup for Oracle, the Keyword phrase entry is ignored.
Advanced Client See “Using NetBackup for Oracle with Advanced Client” for information
on configuring policies for advanced backup methods.
72 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Backup Policies
Adding Schedules
Each policy has its own set of schedules. These schedules initiate automatic backups and
specify when a user can initate operations.
An Oracle backup requires an Application Backup schedule, which is created
automatically when you create an Oracle policy. The Application Backup schedule
manages the backup operation. You also need one or more automatic backup schedules if
you plan to have NetBackup perform automatic scheduled backups.
3. Specify the other properties for the schedule as explained in “Schedule Properties” on
page 77.
The backup window for an Application Backup schedule must encompass the time
period during which all NetBackup for Oracle jobs, scheduled and unscheduled, can
occur. This is necessary because the Application Backup schedule starts processes that
are required for all NetBackup for Oracle backups, including those started
automatically.
Tip For an XML Export backup to be used for database archiving purposes, set the
Retention to infinity.
Chapter 4, Configuration 73
Configuring Backup Policies
The Application Backup schedule must have a start time of 0800 and a duration of 14
hours.
Tip Set the time period for the Application Backup schedule for 24 hours per day, seven
days per week. This ensures that your NetBackup for Oracle operations are never
locked out due to the Application Backup schedule.
2. Click New.
A dialog box displays. The title bar shows the name of the policy to which you are
adding the schedules.
Tip For an XML Export backup to be used for database archiving purposes, set the
Retention to infinity.
5. Specify the other properties for the schedule as explained in Schedule Properties,
which follows this procedure.
74 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Backup Policies
The following table shows example settings for an automatic backup schedule:
6. If this is the last schedule, click OK. To add other schedules, repeat step 1 through
step 6.
Chapter 4, Configuration 75
Configuring Backup Policies
Automatic Full An Automatic Full Backup copies all blocks into the backup set, skipping
Backup only datafile blocks that have never been used. The Automatic Full Backup
schedule enables scheduled NetBackup operations performed on the client.
It is used to run a backup or XML export template or script automatically.
Automatic In a differential level n incremental datafile backup, you back up all blocks
Differential that have changed since the most recent full or incremental backup at level n
Incremental Backup or lower. For example, in a differential level 2 backup, you back up all blocks
modified since the last level 2, level 1, or level 0 backup. Incremental
backups are differential by default.
Do not use an Automatic Differential Incremental Backup schedule for
Oracle XML Exports.
Automatic In a cumulative level n incremental backup, you back up all blocks that have
Cumulative changed since the most recent full backup at level n-1 or lower. For example,
Incremental Backup in a cumulative level 2 backup, you back up all blocks changed since the
most recent level 1 or level 0 backup.
Cumulative incremental backups reduce the work needed for a restore by
ensuring that you need only one cumulative incremental backup from any
particular level at restore time. Cumulative backups typically require more
space and time than Differential Incremental Backups, however, because
they duplicate the work done by previous backups at the same level.
Do not use an Automatic Cumulative Incremental Backup schedule for
Oracle XML Exports.
76 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Backup Policies
To help guard against such mistakes, use a template instead of a script whenever possible.
When a template runs, it detects the backup type on the schedule. You are responsible for
specifying a template with the correct operation type (backup or restore) in the policy.
Schedule Properties
Some of the schedule properties have a different meaning for database backups than for a
regular file system backup. The following table explains the schedule properties:
Property Description
Type of backup Specifies the type of backup that this schedule controls. The selection list
shows only the backup types that apply to the policy you are configuring.
For more information, see “Types of Backup Schedules” on page 76.
Frequency This setting is used only for scheduled backups and not for user-directed
backups. Frequency specifies the period of time that can elapse until the
next backup or archive operation begins on this schedule. For example, if
the frequency is seven days and a successful backup occurs on Wednesday,
the next full backup does not occur until the following Wednesday.
Typically, incremental backups have a shorter frequency than full backups.
Calendar This setting is used only for scheduled backups. It is not used for
user-directed backups. The Calendar option allows you to schedule backup
operations based on specific dates, recurring week days, or recurring days of
the month.
Chapter 4, Configuration 77
Configuring Backup Policies
Property Description
Multiple copies If you want to specify multiple copies for your Oracle policy, configure
Multiple copies on the Application Backup schedule.
Other schedule properties vary according to your specific backup strategy and system
configuration. For more information on schedule properties, consult the NetBackup System
Administrator’s Guide, Volume I.
78 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Backup Policies
❖ In the Retention setting of the Application Backup Schedule, specify the length of time
before NetBackup expires a backup image. Note that the retention setting has a
slightly different meaning for an Application Backup schedule versus an automatic
backup schedule. For more information, see “Schedule Properties” on page 77.
▼ To manually remove references to backup images from the Oracle RMAN repository
Chapter 4, Configuration 79
Configuring Backup Policies
Adding Clients
The client list is the list of clients on which your NetBackup for Oracle template or shell
scripts are run during an automatic backup. A NetBackup client must be in at least one
policy but can be in more than one.
NetBackup attempts to run each template in the Backup Selections list for each client in
the Client list. If a template is not valid on a particular client, for example, if the Oracle
home specified in the template does not exist on that client, the template is skipped. A
policy can contain multiple clients and multiple templates. Only a subset of the templates
needs to be valid on each client. If the valid templates are successful, the entire backup is
successful.
The following software must be installed on the client:
◆ Oracle
◆ NetBackup client or server
◆ NetBackup for Oracle
◆ The backup or XML export archive shell script(s)
2. Click New.
client name.
• Type the name into the client list and press Enter.
If NetBackup cannot detect the hardware and operating system, a dialog box
displays so you can specify this information.
OR
• Click the Browse for Computer button to choose the client from the network.
From the Java interface:
80 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Backup Policies
a. The Add Client dialog box displays. In the Client name field, type the name of
the client you are adding.
b. Choose the Hardware and operating system type and click Add.
Chapter 4, Configuration 81
Configuring Backup Policies
Caution Be sure to specify the correct template and script names in the Backup
Selections list to prevent an error or possibly a wrong operation. Make sure that
the template or script resides on the client before you try to add it to the Backup
Selections list.
3. Click New.
A dialog box displays.
a. From the Template Set list, choose the template type by operation. Then, specify a
specific template by choosing the template from the drop-down Script or
Template list or by typing the correct template file name.
Include the .tpl extension. Do not include the full path.
For example:
weekly_full_backup.tpl
5. Specify the names of the scripts that you want NetBackup to use.
a. In the Script: box, type the full path name of a script on the client.
For example:
/backup_scripts/db/cold_backup.sh
6. Click OK.
82 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Backup Policies
2. Click New.
• Click the Template button. The Select Template dialog displays. From the
Template set list, choose the template type by operation. From the Template list,
choose the correct template. Click OK.
For example:
/backup_scripts/db/cold_backup.sh
5. Click OK.
Chapter 4, Configuration 83
Configuring the Runtime Environment
The order of precedence for runtime configuration is slightly different for scheduled
backups using templates than for all other types of backups. The lists below show the
order of precedence for each situation. The following is the order of precedence for the
run-time configuration variable settings.
Scheduled backups with templates:
3. User bp.conf
For more information, see “Creating a bp.conf File” on page 87.
4. Master bp.conf
For more information, see “Creating a bp.conf File” on page 87.
All other Oracle backups:
84 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring the Runtime Environment
3. User bp.conf
4. Master bp.conf
When connected to a database through a LISTENER using SQL*Net, RMAN takes on the
environment of the LISTENER. Therefore, the environment defined at the system level is
not visible when RMAN is running. In this case, the send command is used to modify the
runtime environment.
Templates
With templates, NetBackup for Oracle environment variables are specified on the
NetBackup for Oracle Configuration Variables Wizard page. For more information, see
“Creating RMAN Templates Using the NetBackup for Oracle RMAN Template
Generation Wizard” on page 90.
Shell scripts
Use the send command or the parms operand to specify NetBackup for Oracle
environment variables for use during a backup or restore.
Chapter 4, Configuration 85
Configuring the Runtime Environment
Example 1. This example uses the send command to specify the policy and server to use
for a database backup. As this example shows, specify the variables in the string in the
RMAN script after all channels have been allocated and before the backup command.
run {
backup
Example 2. This example uses the parms operand to specify the policy and server to use
for a database backup. parms is set with each allocate channel command in the shell
script.
run {
parms="ENV=(NB_ORA_POLICY=your_pol, NB_ORA_SERV=your_server)";
parms="ENV=(NB_ORA_POLICY=your_pol, NB_ORA_SERV=your_server)";
backup
NB_ORA_POLICY Specifies the name of the policy to use for the Oracle backup.
NB_ORA_SCHED Specifies the name of the Application Backup schedule to use for
the Oracle backup.
86 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring the Runtime Environment
NB_ORA_CLIENT Name of the NetBackup client that hosts the Oracle database.
Option Purpose
BPBACKUP_POLICY This option specifies the name of the policy to use for the Oracle
backup.
BPBACKUP_SCHED This option specifies the name of the Application Backup type of
schedule to use for the Oracle backup.
CLIENT_NAME This option specifies the name of the Oracle client. It is especially
useful for a redirected restore operation.
Chapter 4, Configuration 87
Configuring the Runtime Environment
Option Purpose
CLIENT_READ_TIMEOUT Use this option to increase the number of seconds that the Oracle
client initially waits for a response from the NetBackup server. The
default is the greater of 900 or CLIENT_READ_TIMEOUT.
SERVER This option specifies the name of the NetBackup master server.
VERBOSE This option causes NetBackup to include more information in its logs.
For more information, see the NetBackup System Administrator’s Guide, Volume I.
The following shows example bp.conf entries for an Oracle user:
SERVER=jupiter
CLIENT_READ_TIMEOUT=900
VERBOSE=1
88 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Creating Templates and Shell Scripts
Templates
The NetBackup for Oracle Backup Wizard creates backup templates. This wizard is
initiated from the NetBackup Backup, Archive, and Restore interface. For more
information, see “Creating RMAN Templates Using the NetBackup for Oracle RMAN
Template Generation Wizard” on page 90.
The NetBackup for Oracle Backup Wizard does not support all of the RMAN commands
and options provided by Oracle. A shell script should be written if a template does not
provide all of the required functionality.
Shell scripts
Shell scripts are written by the user and must conform to RMAN and UNIX shell syntax.
Sample backup and recovery shell scripts are installed on the client with the NetBackup
for Oracle agent. Modify these scripts to meet your individual requirements. For more
information on sample scripts, see “Creating RMAN Scripts Manually” on page 92.
NetBackup for Oracle also provides a utility, bpdbsbora, that can generate a shell script
from a Backup Wizard template. This allows a user to create a template with the Wizard
and generate a shell script from the template. The user can then run the shell script or
modify the shell script further. For more information, see “Creating an RMAN Script
From a Template” on page 91.
Chapter 4, Configuration 89
Creating Templates and Shell Scripts
❖ Use the procedure called “To log into the client and invoke the Backup Wizard” on
page 22 to bring up the NetBackup Backup, Archive, and Restore interface.
1. In the Backup, Archive, and Restore interface, expand an Oracle instance and select
the database object(s) (datafiles, tablespaces, archived redo logs) to back up. Selecting
the Oracle instance backs up the whole database using RMAN.
2. Click Backup.
The NetBackup for Oracle RMAN Template Generation Wizard displays the
following screens for you to enter information about the backup operation you want
to perform:
• Welcome
90 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Creating Templates and Shell Scripts
3. After you complete the wizard, the Template Summary screen displays the summary
of the backup template:
You can choose to run the template immediately after the wizard finishes, save the
template to the master server, or both. For explanations of your choices, click Help.
To save, run, or save and run the template, click Finish.
Chapter 4, Configuration 91
Creating Templates and Shell Scripts
-g script_file Specifies the name of the file to which you want bpdbsbora to write
the script. Enclose script_file in quotation marks if it contains
blanks. This option cannot be used with the -r (run) option.
-t templ_name Specifies the name of the template that you want to use as the basis
for the script. Make sure the template exists.
bpdbsbora retrieves backup templates from a known location on
the master server, so specify only the template file name.
-S server_name Specifies the master server upon which the template resides. When
specified, the bpdbsbora command retrieves backup templates
from the specified master server.
When NetBackup for Oracle was initially installed, example scripts were written to the
following directory:
install_path/netbackup/ext/db_ext/oracle/samples/rman
hot_tablespace_backup.sh
hot_database_backup.sh
database_restore.sh
cold_duplex_database_backup_full.sh
cold_database_backup.sh
92 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Creating Templates and Shell Scripts
1. Copy the example scripts to a different directory on your client. Oracle scripts can be
located anywhere on the client.
Chapter 4, Configuration 93
Creating Templates and Shell Scripts
Oracle8i and later versions of RMAN provide an API that allows you to make up to four
backup sets simultaneously, each an exact duplicate of the others. Using NetBackup for
Oracle, for example, you can back up each copy to a different tape to protect against
disaster, media damage, or human error. Use the set duplex and the send commands
to take advantage of this feature.
The set duplex command specifies the number of copies of each backup piece to create.
The set duplex command affects all channels allocated after issuing the command, and
it remains in effect until explicitly disabled or changed during the session. You cannot
issue the set duplex command after allocating a channel.
The command syntax is:
set duplex = {ON | OFF | 1 | 2 | 3 | 4}
By default, duplex is OFF (a single backup set is produced). If you specify ON, it produces
◆ Each output file must have a unique name. Use the %U format specifier to satisfy this
restriction. %U is equivalent to %u_%p_%c, and it guarantees the uniqueness of the
backup set name in all circumstances.
◆ Put %t at the end of the backup file name format. NetBackup uses the timestamp as
part of its search criteria for catalog images. Without this timestamp, performance
might degrade as the NetBackup catalog grows.
Note that you must enable the BACKUP_TAPE_IO_SLAVES initialization parameter to
perform duplexed backups. RMAN configures as much media as needed for the number
of backup copies you request. For more information on BACKUP_TAPE_IO_SLAVES, see
your Oracle documentation.
Use the send command to specify the policy and/or schedule to use with each backup.
Because NetBackup for Oracle uses the policy or schedule to determine what media to
use, this information is required for each copy, or an error occurs.
The command syntax is as follows:
send 'keyword=value [, keyword=value,...]';
94 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Creating Templates and Shell Scripts
Templates
The NetBackup for Oracle XML Export Wizard creates XML export templates. This
wizard is initiated from the NetBackup Backup, Archive, and Restore interface.
The NetBackup for Oracle XML Export Wizard does not support all of the parameters
provided by the command line utility, bporaexp. You can write a shell script if a template
does not provide all of the required functionality.
Shell Scripts
Shell scripts are written by the user and must conform to the operating system’s shell
syntax. Sample XML Export and Import shell scripts are installed on the client with the
NetBackup for Oracle agent. Modify these scripts to meet your individual requirements.
NetBackup for Oracle also provides a utility, bpdbsbora, that can generate a shell script
from an XML Export or Import Wizard template. This allows a user to create a template
with the wizard and generate a shell script from it. The user can run or modify the shell
script.
❖ Use the procedure called “To log into the client and invoke the Backup Wizard” on
page 22 to bring up the NetBackup Backup, Archive, and Restore interface.
Chapter 4, Configuration 95
Creating Templates and Shell Scripts
1. In the left pane of the Backup, Archive, and Restore interface, select the Oracle
instance. Database objects that can be exported are listed under the Users node. Only
the schema owners and objects accessible by the current user login displays.
2. Expand the Users list to the schema owners of the objects to be exported.
96 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Creating Templates and Shell Scripts
If you need an explanation of any of the fields on the wizard screens, or more details,
click Help on the wizard screen.
5. When you have completed the wizard, the Template Summary screen displays the
summary of the XML export template:
You can choose to run the template immediately after the wizard finishes, save the
template to the master server, or both. For explanations of your choices, click Help.
To save, run, or save and run the template, click Finish.
Chapter 4, Configuration 97
Creating Templates and Shell Scripts
-g script_file Specifies the name of the file to which you want bpdbsbora to write
the script. Enclose script_file in quotation marks if it contains
blanks. This option cannot be used with the -r (run) option.
-t templ_name Specifies the name of the template that you want to use as the basis for
the script. Make sure the template exists.
bpdbsbora retrieves XML export templates from a known location on
the master server, so specify only the template file name.
-S server_name Specifies the master server upon which the template resides. When
specified, the bpdbsbora command retrieves XML export templates
from the specified master server.
For import:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp
data_archiver_export64.sh
bporaexp_help.param
bporaexp_partitions.param
bporaexp_table_to_files.param
bporaexp_tables.param
bporaexp_tables_rows.param
data_archiver_import64.sh
bporaimp_archive.param
bporaimp_archive_schema_to_files.param
bporaimp_archive_to_users.param
bporaimp_bfile_table.param
bporaimp_help.param
bporaimp_ignore_rows_table.param
bporaimp_large_table.param
bporaimp_list.param
98 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Creating Templates and Shell Scripts
bporaimp_old_archive.param
bporaimp_partitions.pram
bporaimp_table_from_files.param
bporaimp_table_to_files.param
bporaimp_table_to_user.param
bporaimp_tables.param
1. Copy the example scripts to a different directory on your client. Oracle scripts can be
located anywhere on the client.
Templates
The NetBackup for Oracle Backup and XML Export Wizards save a template to a
NetBackup specific location on the current NetBackup master server. A backup or XML
export template is retrieved from the master server as part of a backup (server-directed,
scheduled, or user-directed) and is executed on the client. Backup or XML export
templates are associated with a policy by specifying its name in the policy Backup
Selections list. Because backup or XML export templates are stored on the server in a
known location, server directed and scheduled backups or XML exports use the same
copy of the template for each client in the policy client list.
Before executing a template on a NetBackup for Oracle client, NetBackup verifies the
validity of the template for that client by checking the Oracle installation information
stored in that template. Only valid templates are run on each client.
The NetBackup for Oracle Recovery and XML Import wizards save a template to a user
specified location on the client. The location specified should include a fully qualified
path to a directory where the user has write access.
Templates store encrypted passwords that are decrypted at runtime.
Chapter 4, Configuration 99
Creating Templates and Shell Scripts
Shell scripts
Shell scripts must reside on the NetBackup client. Backup or XML export shell scripts are
associated with a policy by specifying the file name (including path) in the policy Backup
Selections list. This means that for server-directed or scheduled backups or XML exports,
each client in the policy's client list must have a copy of the script with the same name in
the same location. For more information, see “Adding Backup Selections” on page 81.
The backup and recovery processes sometimes require passwords for Oracle database
access and/or system user accounts. Shell scripts, because a Shell interprets them, store
passwords in clear text.
100 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Testing Configuration Settings
After configuring the master server for NetBackup for Oracle, test the configuration
settings by performing a manual backup (or backups) using the automatic backup
schedules you have created.
102 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Using NetBackup for Oracle 5
The NetBackup graphical user interfaces and command line interfaces allow you to
perform Oracle backup and recovery operations using Oracle’s RMAN utilities and to
perform Oracle archives and restores using NetBackup’s XML export (bporaexp) and
import (bporaimp) utilities.
You can also use the Oracle Enterprise Manager to perform Oracle backup and recovery
operations. The Oracle RMAN command line interface is also used to maintain and query
the RMAN repository.
This chapter contains the following sections:
◆ Maintaining the RMAN Repository
◆ Querying the RMAN Repository
◆ Performing a Backup
◆ Browsing Backups
◆ Performing a Restore
◆ Performing Other RMAN Actions
◆ Performing an XML Export Archive
◆ Browsing XML Export Archives
◆ Performing a Restore of an XML Export Archive
103
Maintaining the RMAN Repository
crosscheck;
104 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Maintaining the RMAN Repository
Deleting expired The delete expired backup command operates only on expired
backups backup pieces found in the recovery catalog. RMAN removes them from the
recovery catalog.
To delete expired backup sets of a database from the recovery catalog, start
RMAN and connect to the target and recovery catalog databases. At the
RMAN command prompt, type the following commands:
allocate channel for maintenance type 'SBT_TAPE';
delete expired backupset of database;
The crosscheck and delete backupset commands let you restrict the
list of objects operated on to the specified Oracle device type (disk or SBT
tape), object type (archived logs or database files), and date range.
Resynchronizing the RMAN compares the recovery catalog to either the current control file of the
recovery catalog target database or a backup control file. It subsequently updates the catalog
with information that is missing or changed.
If you are running in ARCHIVELOG mode, resynchronize the recovery
catalog regularly since the recovery catalog is not updated automatically
when a log switch occurs or when a redo log is archived.
You must also resynchronize the recovery catalog after making any change
to the physical structure of the target database. As with log archive
operations, the recovery catalog is not automatically updated when a
physical schema change is made.
The RMAN backup, copy, restore, and switch commands update the
recovery catalog automatically when the target database control file is
available, and the recovery catalog database is available when any of these
commands are executed.
If the recovery catalog is unavailable when you issue backup or copy
commands, you should resynchronize it manually.
To resynchronize the recovery catalog, start RMAN and issue the resync
catalog command.
availability of a backup piece, datafile copy, or archived redo log has changed. The RMAN
backup set or file change command enables you to make a variety of useful record changes.
piece, datafile copy, or archive log from the recovery catalog. This command
piece, datafile copy, or archive log from the control file and recovery catalog.
recovery catalog.
piece, datafile copy, or archive log from the control file and recovery catalog
when that file no longer exists. This command works with or without a
recovery catalog.
recovery catalog.
Validating the restore A restore validation executes a restore test run without restoring the files.
of backups Test the restore of the entire database or individual tablespaces, datafiles, or
control files.
Use restore ... validate when you want RMAN to choose the
backups to test.
Use validate backupset when you want to specify the backup sets to
test.
106 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Querying the RMAN Repository
RMAN allows you to generate a number of reports relevant for backup and recovery
using the report and list commands. The list command lists the contents of the
recovery catalog or control file, and the report command performs a more detailed
analysis.
Use the report and list commands to determine what you have backed up and what
you need to back up. The information is available whether or not you use a recovery
catalog.
You can use the report command to answer questions such as the following:
◆ Which files need a backup?
◆ Which files have not had been backed up in awhile?
◆ Which files are not recoverable due to unrecoverable operations?
◆ Which backup files can be deleted?
◆ What was the physical schema of the database at some previous point in time?
The list command queries the recovery catalog and control file and produces a listing of
its contents. The primary purpose of the list command is to determine the backups that
are available. You can list the following information:
◆ Backup sets containing a backup of a specified list of datafiles.
◆ Backup sets containing a backup of any datafile that is a member of a specified list of
tablespaces.
◆ All backup sets or copies of all datafiles in the database.
◆ Backup sets containing a backup of any archive logs with a specified name and/or
within a specified range.
◆ Incarnations of a specified database or of all databases known to the recovery catalog.
For more information on querying the RMAN repository, see your Oracle documentation.
Performing a Backup
This section describes how to perform the following types of backups:
◆ Automatic Backup of an Oracle Policy
◆ Manual Backup of an Oracle Policy
◆ User-directed Backup From the Client
◆ Running NetBackup for Oracle Templates
◆ Using bpdbsbora to Run a Backup Template
◆ Running the NetBackup for Oracle Shell Script
◆ Running RMAN
108 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Backup
1. In the Backup, Archive, and Restore interface, choose Actions > Administer Database
Templates > Oracle.
The Oracle Template Administration window appears:
The Select Template list shows the names and descriptions of the RMAN backup
templates stored on the current master server.
3. Click Run.
You can use the View Status tool to see the status of the backup. Click Actions > View
Status.
The Oracle Template Administration window provides the following functions:
Delete Removes the selected template. You must be the root user or the
template creator to delete a template.
Rename Changes the name of the selected template. You must be the root user
or the template creator to rename a template.
-t templ_name Specifies the name of the template that you want to use.
bpdbsbora retrieves backup templates from a known location on the
master server, so specify only the template file name.
110 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Browsing Backups
-S server_name Optional. Specifies the master server upon which the templates reside.
When specified, the bpdbsbora command retrieves backup templates
from the specified master server.
For example:
bpdbsbora -backup -r -t ORCLMonfull.tpl -S my_mast -L my_prog_log
The shell starts the database backup by running the Oracle shell script. The Oracle shell
script contains commands to run rman.
The NetBackup for Oracle installation script installs sample scripts in the following
location:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
Running RMAN
As an Oracle user, you can run the rman command from the operating system’s command
prompt with the RMAN command file as a parameter. This section describes how to set
the master server to hag and the Oracle policy to obk before starting the backup.
If you are connecting to a database using a TNS alias, use the RMAN send command to
specify the environment variables. At the command prompt, type the following:
rman target ‘internal/oracle@ORCL’ rcvcat ‘rman/rman@RCAT’
send "‘NB_ORA_POLICY=obk,NB_ORA_SERV=hag’"cmdfile
‘/oracle/scripts/db_full_backup.rcv’
Browsing Backups
This section describes the following procedures for browsing backup images:
/exb_n2bm5bco_1_1392342936
/exb_mabm02ko_1_1392170136
/exb_lqbltds6_1_1392083334
The -t 4 on this command specifies the Oracle backups. The -R specifies the default
number (999) of directory levels to search. For more information on this command, see the
bplist(1M) man page.
Performing a Restore
Make sure a backup has been successfully completed before attempting a restore. An
error occurs if a backup history does not exist.
This section describes the following procedures for performing user-directed restores:
◆ Running the NetBackup for Oracle Recovery Wizard on the Client
◆ Using bpdbsbora
◆ Running a NetBackup for Oracle Recovery Shell Script on the Client
◆ Running RMAN on the Client
112 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore
❖ To start the Backup, Archive, and Restore interface from the NetBackup
◆ From the Java interface, click Backup, Archive, and Restore in the left pane of the
console.
◆ From the Windows interface, click File > Backup, Archive, and Restore.
❖ To start the Backup, Archive, and Restore interface from the command line, run the
following command:
/usr/openv/netbackup/bin/jbpSA &
It is possible that your NetBackup for Oracle client does not have the appropriate
policy type specified. Change the policy type with the following steps:
a. On the Actions menu, select Specify NetBackup Machines and Policy Type for
the restore.
b. In the Specify NetBackup Machines and Policy Type dialog box, select Oracle
from the Policy Type drop-down list.
c. Click OK.
2. From the Restore Files tab, expand the Oracle node in the left pane to view an Oracle
instance hierarchy.
3. Select a node in the left pane to view details in the right pane.
1. In the Backup, Archive, and Restore interface, choose the Restore Files tab. Ensure
that the Restore Type drop down is set to Normal Backups (the default choice).
114 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore
If you select the Oracle instance, the wizard recovers the entire database using
RMAN.
4. Click Restore.
Enter information about the recovery operation you want to perform in the screens
that the NetBackup for Oracle Recovery Wizard displays. The screens are as follows:
◆ Welcome
◆ Target Database Logon Credentials
◆ Recovery Catalog Logon Credentials
◆ Recovery Options
◆ Restore Options
◆ Recover Limits
◆ Database State
If you need an explanation of any of the fields on the wizard screens, or more details,
click Help on the wizard screen.
If you need an explanation of any of the fields on the wizard panels, or more details,
click Help on the wizard panel.
6. Click Finish to run, save, or run and save the recovery template.
Using bpdbsbora
The bpdbsbora command lets you run a recovery template created by the NetBackup
Recovery Wizard.
At the command prompt, type this command using the following options:
bpdbsbora -restore -r -t templ_name [-L progress_file]
For example:
bpdbsbora -restore -r -t /oracle/restore_templs/ORCL_MON_Full.tpl
-t templ_name Specifies the full-path name of the template you want to use.
Unlike backup templates, restore templates do not reside in a
predetermined location on the master server. They are considered to be
temporary in nature and should reside on the client. If the full path is
not specified as part of the restore template name, the file might not be
found.
116 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore
The operating system shell starts the database restore by running the Oracle shell script
file. The Oracle shell script file contains commands to run RMAN.
The NetBackup for Oracle installation script writes sample scripts to the following
location:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
cmdfile ‘/oracle/scripts/database_restore.rcv’
1 . Cl
ient A
gets
back Server
e d up
.
2. Clien A
t B requ s client
client A
image
ests res
to r ver restore .
to clien re of 3. The s
e
to clien
t B
t B.
ck up image
ba
Note that the user on client A cannot initiate a redirected restore to client B. Only the user
on client B, which is the client receiving the backup image, can initiate the redirected
restore.
Note The same user name and UNIX account UID that was used for the Oracle database
backup must be used for the redirected restore.
This section describes how to perform a redirected restore using Oracle RMAN.
Server Configuration
Ensure that the NetBackup server is configured to allow a redirected restore. The
administrator can remove restrictions for all clients by creating the following file on the
Netbackup master server:
/usr/openv/netbackup/db/altnames/No.Restrictions
Or, to restrict clients to restore only from certain other clients, create the following file:
/usr/openv/netbackup/db/altnames/client_name
Where client_name is the name of the client allowed to do the redirected restore (the
destination client). Then, add the name of the NetBackup for Oracle source client to that
file.
118 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore
For more information about redirected restores, see the NetBackup System Administrator’s
Guide, Volume I.
Note The same user name and UNIX account UID that was used for the Oracle database
backup must be used for the redirected restore.
Perform the following procedure on the destination client host if you want to restore
RMAN backups that are owned by another client.
1. Enable a network connection to the RMAN catalog database that was used by the
source client.
Note If the RMAN catalog database has been lost, restore the catalog database first before
continuing with the redirected restore.
3. Check the bp.conf files on the source client. Make sure that the CLIENT_NAME
variable either is not set or is set to the hostname of the source client.
4. Make the init.ora file of the source client available to the destination client. You
can do this by copying the file to the destination client or by modifying the file on the
destination client. Change all location-specific parameters.
5. Grant write permission to the directory to which the datafiles will be restored.
11. Run an RMAN restore script or type the RMAN commands for the restore.
Example
For example, assume the following:
◆ Source client is camel
◆ Destination client is giraffe
◆ Master server is lion
◆ ORACLE_SID is test
◆ The user is connected to the Oracle database using a local connection, not SQL*Net
◆ UNIX user is ora on both camel and giraffe
1. Create the following file on server lion and edit it to contain the name camel:
/usr/openv/netbackup/db/altnames/giraffe
6. Make sure the destination database directory exists and has appropriate access
permissions.
The datafiles are restored to the directory path with the same name they had when
they were backed up.
RMAN> run {
RMAN> }
120 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing Other RMAN Actions
RMAN>connect target/
RMAN>run {
RMAN> }
At this point, apply the archived logs. Type cancel when you decide to stop
recovery.
XML export template is used. When the NetBackup scheduler invokes a schedule for an
automatic backup, the NetBackup for Oracle XML export templates or shell scripts run as
follows:
◆ In the same order as they appear in the file list
◆ On all clients in the client list
The NetBackup for Oracle XML export template or shell scripts start the XML export by
running NetBackup’s bporaexp utility.
122 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing an XML Export Archive
1. In the Backup, Archive, and Restore interface, click Actions > Administer Database
Templates > Oracle.
The Oracle Template Administration window appears.
The Select Template list shows the names, descriptions, and types of the Oracle
templates stored on the current master server.
2. Select the name of the XML Export template you want to run.
3. Click Run.
export template is loaded into the NetBackup for Oracle XML Export
Delete Removes the selected template. You must be the root user or the
Rename Changes the name of the selected template. You must be the root user
At the command prompt, type this command using the following options:
bpdbsbora -export -r -t templ_name [-S server_name] [-L prog_log]
-t templ_name Specifies the name of the template that you want to use.
bpdbsbora retrieves XML export templates from a known location on
the master server, so specify only the file name.
For example:
bpdbsbora -export -r -t sales_arch.tpl -S my_server -L my_progress_log
Running the NetBackup for Oracle XML Export Script on the Client
You can initiate a database XML export from the operating system command prompt by
typing the full path to the shell script that performs the export. For example:
/oracle/scripts/data_archiver_export.sh
The operating system shell starts the database XML export archive by running the XML
export script. The XML export script contains commands to run bporaexp.
The NetBackup for Oracle installation script installs sample scripts in the following
location:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/
bporaexp creates a set of XML schema and instance documents that can be used to
archive Oracle table data. For each archive, one master XML schema (.xsd) document is
generated. In addition, for each table, bporaexp generates a table-specific schema (.xsd)
document and a table specific instance (.xml) document. Additional files are created if
the table contains LONG or LOB columns.
124 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing an XML Export Archive
File Content
If the DIRECTORY parameter is not specified, NetBackup writes the backup images to a
Media Manager or disk storage unit. A NetBackup backup set is created and cataloged
under the name /Oracle/XMLArchive. All NetBackup for Oracle bporaexp backups
are cataloged using this convention.
Alternatively, if the parameter file does not contain the DIRECTORY parameter,
NetBackup creates and catalogs the following files:
/Oracle/XMLArchive/test1/test1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xml
In production, do not use the DIRECTORY parameter in the bporaexp parameter file.
When you write to a Media Manager or disk storage unit, NetBackup offers features that
include searching and cataloging with the NetBackup catalog and automatic handling of
output that exceeds file system limits. With the DIRECTORY parameter, file system limits,
such as a 2 GB maximum, can cause an error.
The following table shows the available bporaexp parameters with their default values.
Some parameters are valid only when writing to a NetBackup Media Manager or
disk storage unit. Other parameters are valid only when writing to a directory. In
the following table, the right-most column contains either Storage Unit or Directory
to indicate whether the parameter in that row is applicable for either writing to a
storage unit or to a directory. Parameters that are recognized when writing to a
directory are ignored when writing to a Media Manager or disk storage unit.
Target
Parameter Required? Default Description Location
126 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing an XML Export Archive
Target
Parameter Required? Default Description Location
Target
Parameter Required? Default Description Location
128 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing an XML Export Archive
Target
Parameter Required? Default Description Location
Target
Parameter Required? Default Description Location
Note Only XML export archives created using NetBackup mode are searched. Exports
stored in an operating system directory using the DIRECTORY parameter are not
searched.
130 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Browsing XML Export Archives
ARCHIVE_DATE_FROM no default Optionally specifies a start date for the archive search.
Used with ARCHIVE_DATE_TO to specify a range. The
date format is mm/dd/yyyy [hh:mm:ss].
For example, assume you named the list parameter file bporaimp_list.param. At the
command prompt, type the following:
bporaimp parfile = bporaimp_list.param
/Oracle/XMLArchive/test1/test1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xml
/Oracle/XMLArchive/little_sales/little_sales.xsd
/Oracle/XMLArchive/little_sales/USER1/LITTLE_SALES.xsd
/Oracle/XMLArchive/little_sales/USER1/LITTLE_SALES.xml
/exb_n2bm5bco_1_1392342936
/exb_mabm02ko_1_1392170136
/exb_lqbltds6_1_1392083334
The -t 4 on this command specifies the Oracle backups or archives. The -R specifies the
default number of directory levels to search, 999.
For more information on this command, see the bplist(1M) man page.
132 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore of an XML Export Archive
❖ To start the NetBackup Backup, Archive, and Restore interface from the NetBackup
Administration Console, do one of the following:
◆ From the Java interface, click Backup, Archive, and Restore in the left pane of the
console.
◆ From the Windows interface, click File > Backup, Archive, and Restore.
❖ To start the NetBackup Backup, Archive, and Restore interface from the command
line, run the following command:
/usr/openv/netbackup/bin/jbpSA &
b. On the Specify NetBackup Machines dialog box, click the Source client/Policy
type tab.
d. Click OK.
3. Expand the Oracle node in the left pane to view an Oracle instance hierarchy in the
right pane.
1. In the left pane of the Backup, Archive, and Restore interface, select the Oracle
instance.
Database objects that can be imported are listed under the Users node. The tool
displays only the schema owners and objects accessible by the current user login.
2. Expand the Users list to the schema owners of the objects to be imported.
3. In the right pane, select database objects that exist in the archive to be restored.
134 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore of an XML Export Archive
4. Click Restore.
Enter information about the restore operation you want to perform in the screens that
the NetBackup for Oracle XML Import Wizard displays. The screens are as follows:
◆ Welcome
◆ Target Database Logon Credentials
◆ Archive Import Options
◆ NetBackup Archive Source Options
If you need an explanation of any of the fields on the wizard screens, or more details,
click Help on the wizard screen.
Using bpdbsbora
The bpdbsbora command allows you to run an XML import template created by the
NetBackup XML Import Wizard.
At the command prompt, type this command with the following options:
bpdbsbora -import -r -t template_name [-L progress_file]
-t template_name Specifies the full path name of the template you want to use.
Unlike backup templates, XML import templates do not reside in a
predetermined location on the master server. They are considered to be
temporary in nature and should reside on the client. If the full path is
not specified as part of the XML import template name, it must reside in
the current directory.
For example:
bpdbsbora -import -r -t /oracle/imp_tpls/sales_imp.tpl -L prog_file
The operating system shell starts the database restore by running the XML import script
file. The XML import script file contains commands to run bporaimp.
The NetBackup for Oracle installation script writes sample scripts to the following
location:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/
136 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore of an XML Export Archive
❖ At the command prompt, type the bporaimp command in the following format:
bporaimp [username/password] parfile = filename | help=y
The following table shows the available bporaimp parameters with their default values.
Note Use the NetBackup parameters NB_ORA_SERV and NB_ORA_CLIENT to specify the
NetBackup runtime configuration. Otherwise, the order of precedence for the
runtime configuration variable settings is used.
Some parameters are valid only when writing to a NetBackup Media Manager or
disk storage unit. Other parameters are valid only when writing to a directory. In
the following table, the right-most column contains either Storage Unit or Directory
to indicate whether the parameter in that row is applicable for either writing to a
storage unit or to a directory. Parameters that are recognized when writing to a
directory are ignored when writing to a Media Manager or disk storage unit.
Target
Parameter Required? Default Description Location
Target
Parameter Required? Default Description Location
138 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore of an XML Export Archive
Target
Parameter Required? Default Description Location
Target
Parameter Required? Default Description Location
140 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore of an XML Export Archive
Target
Parameter Required? Default Description Location
Target
Parameter Required? Default Description Location
142 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore of an XML Export Archive
Target
Parameter Required? Default Description Location
1 . Cl
ient A
gets
back Server
e d up
.
2. Clien
t
client A B requests res client A
image to r ve r restores B.
to clien re of 3. The s
e client
t B. up i m age to
b ack
Note that the user on client A was not able to initiate a redirected restore to client B. Only
the user on client B, the client receiving the backup image, could initiate the redirected
restore.
Note The same user name (UNIX account) that was used for the Oracle database XML
export must be used for the alternate client restore.
Server Configuration
Ensure that the NetBackup server is configured to allow a redirected restore. The
administrator can remove restrictions for all clients by creating the following file on the
Netbackup master server:
/usr/openv/NetBackup/dbaltnames/No.Restrictions
Or, to restrict clients to restore only from certain other clients, create the following file:
/usr/openv/NetBackup/dbaltnames/client_name
For client_name, specify the name of the client allowed to do the redirected restore (the
destination client). Then, add the name of the NetBackup for Oracle source client to that
file.
144 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing a Restore of an XML Export Archive
Client Configuration
The same user name (UNIX account) that was used for the XML export archive must be
used on the client to which you are redirecting the restore.
1. Set environment variables for bporaimp on the new client, including ORACLE_HOME
and ORACLE_SID.
For more information, see “Running bporaimp on the Client” on page 136.
4. Run bporaimp.
Example
For example, assume the following:
◆ Original client is jupiter
◆ New client is saturn
◆ Server is jupiter
◆ ORACLE_SID is test on both saturn and jupiter
◆ UNIX user is ora on both jupiter and saturn
◆ Archive name is sales
/usr/openv/netbackup/db/altnames/saturn
NB_ORA_SERV = jupiter
NB_ORA_CLIENT = jupiter
USERID = orauser/orapasswd
146 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle with Advanced Client 6
This chapter explains how to use NetBackup for Oracle with NetBackup Advanced Client
to perform snapshot backups and block-level incremental backups of your Oracle
database.
To use NetBackup for Oracle with Advanced Client, you must have both NetBackup
Advanced Client and NetBackup for Oracle licensed and installed.
The chapter provides information on the following topics:
◆ Installation and Licensing Requirements
◆ NetBackup for Oracle with Advanced Client Overview
◆ How Does NetBackup for Oracle with Advanced Client Work?
◆ Configuring Snapshot Backups
◆ Restoring Data from a Snapshot Backup
◆ Configuring Block-level Incremental Backups
◆ Advanced Client Effects
147
Installation and Licensing Requirements
148 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle with Advanced Client Overview
Snapshot Backup
A snapshot is a disk image of the client's data made almost instantaneously. When used in
conjunction with NetBackup Advanced Client, NetBackup for Oracle can back up Oracle
objects by taking snapshot images of the component files. Later, it backs up the snapshot
version, either to a Media Manager or disk storage unit.
Snapshot backup captures the data at a particular instant without causing significant
client downtime. Client operations and user access continue without interruption during
the backup. The resulting capture or snapshot can be backed up without affecting the
performance or availability of the database.
Instant Recovery
This feature makes backups available for instant recovery from disk. Instant recovery
combines snapshot technology with the ability to do rapid disk-based restores.
NetBackup creates the image without interrupting user access to data. Optionally, the
image is retained on disk as well as backed up to storage. Instant recovery makes it
possible to perform block-level restores.
Offhost Backup
An offhost backup shifts the burden of backup processing onto a separate backup agent,
such as an alternate client, a NetBackup media server, or third-party copy device. This
reduces the effect on the client's computing resources ordinarily caused by a local backup.
The backup agent reads the data from the client disk and writes it to storage.
Proxy Copy
Proxy copy is an extension to Oracle’s Media Management API. A proxy copy is a special
type of backup in which RMAN turns over control of the data transfer to the NetBackup
for Oracle agent. During RMAN backup and restore operations, proxy copy enables
NetBackup for Oracle to manage the entire data movement between the disks containing
Oracle data files and the storage devices managed by NetBackup.
With proxy copy, RMAN provides a list of files that require backup or restore to the
NetBackup for Oracle agent. The NetBackup for Oracle agent determines how the data is
moved and when to move the data.
Backups and restores remain tightly integrated with RMAN and its catalog, greatly
simplifying administration tasks.
File-based Operations
Standard NetBackup for Oracle backups and restores are stream-based. NetBackup for
Oracle with Advanced Client operations are file-based. The following sections illustrate
the differences between these operation types.
150 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup for Oracle with Advanced Client Overview
Stream-based Operations
Stream-based operations are the standard NetBackup implementation of conventional
RMAN backup and restores. In a stream-based backup, NetBackup moves the data
provided by the Oracle server process. NetBackup captures the data stream content
provided by RMAN. If the user has specified multiple streams, then RMAN opens
multiple streams and NetBackup catalogs them as separate images.
Oracle Server
Oracle Oracle
database disk database disk
Control commands
Data
NetBackup
File-based Operations
File-based operations are the NetBackup for Oracle with Advanced Client
implementation of Oracle proxy copy backups and restores. In a file-based operation,
RMAN provides the list of files that require backup or restore to NetBackup for Oracle
with Advanced Client. NetBackup for Oracle with Advanced Client performs the data
movement.
Oracle Server
Oracle Oracle
database disk Control commands database disk
List of files
Data Data
NetBackup
152 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
How Does NetBackup for Oracle with Advanced Client Work?
2. Queries the policy to check whether the Advanced Client policy attributes are
specified.
3. Initiates a configured number of advanced client backups and waits until the jobs are
completed. For more information, see “Multistreaming” on page 154.
2. Sends a restore request to the NetBackup server for all files in the list.
Note Oracle 10g and later releases support proxy copy backups for archived redo logs.
Control files, however, must still be included in a stream-based backup schedule. If
you are using an Oracle 10g or later release, you can include archived redo logs in
your database proxy file backups, and you can ignore the instructions in this
chapter that direct you to back up the archived redo logs in a stream-based backup
schedule.
Multistreaming
On the initial call, NetBackup for Oracle with Advanced Client returns a special entry to
RMAN indicating that it supports proxy copy. It also indicates to RMAN that it supports
an unlimited number of files to be proxy copied in a single proxy copy session. This
means that the number of channels allocated for the RMAN backup proxy command
does not control the degree of parallelism for proxy backups. RMAN uses only one
channel for proxy copy backups except when a specific configuration is used.
154 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
How Does NetBackup for Oracle with Advanced Client Work?
The NB_ORA_PC_STREAMS variable controls the number of proxy copy backup streams to
be started. By default, the agent initiates one backup job for all files. If the RMAN send
command passes NB_ORA_PC_STREAMS, NetBackup for Oracle splits the files into the
number of groups specified by the variable based on the file size. The agent attempts to
create streams of equal size.
'/oradata_new/test.f';
The RMAN procedure for datafiles backed up by proxy is the same as for conventionally
backed up datafiles. RMAN knows that the datafiles were backed up by proxy, and it
issues a proxy restore request to NetBackup for Oracle, which restores the datafiles to the
new location. For more information on the required procedure, see your Oracle
documentation.
156 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
How Does NetBackup for Oracle with Advanced Client Work?
run {
backup
incremental level 0
proxy
format ’bk_%U_%t’
tablespace tbs1;
run {
backup
incremental level 1
format ’bk_%U_%t’
tablespace tbs1;
Example 1
This RMAN sample script initiates a whole database backup, which includes the control
file. RMAN starts one proxy copy backup session by sending a list of all datafiles to the
NetBackup for Oracle agent on channel t1. The agent splits the files into 3 streams and
initiates a file-based backup for each stream. After the proxy backup is done, RMAN starts
a non-proxy conventional backup of the control file on channel t1.
run {
send 'NB_ORA_PC_STREAMS=3';
backup proxy
format 'bk_%U_%t'
(database);
Example 2
This RMAN sample script initiates a whole database backup, which includes the control
file. RMAN starts one proxy copy backup session by sending a list of all datafiles to the
NetBackup for Oracle agent on channel t1. The agent splits the files into 3 streams and
initiates a file-based backup for each stream. At the same time, RMAN starts a non-proxy
conventional backup of the control file on channel t2.
run {
send 'NB_ORA_PC_STREAMS=3';
backup proxy
format 'bk_%U_%t'
(database);
Note that if the RMAN recovery catalog is not used, then the version of the control file
being backed up does not contain the information about the current backup. To include
the information about the current backup, back up the control file as the last step in the
backup operation. This step is not necessary if the recovery catalog is used.
Run {
backup
format 'cntrl_%s_%p_%t'
current controlfile;
Example 3
In this sample script, RMAN initiates two proxy copy backups sequentially on channel
t1. It starts a proxy backup of tablespace tbs1 datafiles. After the backup is done, it starts
another proxy backup of tablespace tbs2 datafiles.
run {
backup proxy
format 'bk_%U_%t'
(tablespace tbs1);
backup proxy
format 'bk_%U_%t'
(tablespace tbs2);
158 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
How Does NetBackup for Oracle with Advanced Client Work?
This configuration can cause problems if the sequential backups create snapshots on the
same volumes. In such a situation, issue a single backup command such as the following,
which specifies both tablespaces, rather than two separate backup commands:
run {
backup proxy
format 'bk_%U_%t'
Example 4
In this example, RMAN distributes proxy copy backups over two channels. It creates two
proxy copy backup sessions sending tbs1 datafiles on channel t1 and tbs2 datafiles on
channel t2. Such a method is useful if you want to specify different NetBackup
configurations for each channel. In this example, each send command specifies a different
policy to be sent and used by each proxy backup.
run {
send ’NB_ORA_POLICY=policy1’;
send ’NB_ORA_POLICY=policy2’;
backup proxy
format 'bk_%U_%t'
Configuration Requirements
The NetBackup Advanced Client System Administrator’s Guide and the VERITAS Technical
Support Web site contain information on hardware requirements, software requirements,
compatibility, snapshot methods supported for your agent, and special requirements for
specific types of backups. Familiarize yourself with this information before you configure
any shapshot backups.
The following list highlights some of the requirements that pertain to database agents:
◆ The user and group identification numbers (UIDs and GIDs) associated with the files
to be backed up must be available to both the primary client and the alternate backup
client.
◆ It is recommended that you allocate at least two different volumes or file systems for
database activities, as follows:
◆ Allocate one or more volumes or file systems to the database data files.
◆ Allocate a different set of volumes or file systems to the Oracle executables,
configuration files, and the archive redo logs.
There are several reasons for doing this. One reason for separating the data files from
the other files is that because if the logs are configured on the same volumes (or file
systems) as the datafiles, the logs are temporarily frozen while NetBackup takes the
snapshot. As a result, the Oracle process cannot access the logs when the database is
active, so the database activity might freeze until the logs become accessible again.
Another reason for writing the data files to their own repository is because an Instant
Recovery point-in-time rollback requires that there be only data files on the volume or
file system being restored.
◆ The hardware and software required for the appropriate snapshot method must be
installed and configured correctly.
160 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Snapshot Backups
◆ NetBackup Advanced Client must be installed and configured correctly, and the
license key for this option must be registered.
◆ To perform offhost backups, perform any special configuration that is required.
4. Select a policy storage unit from the Policy storage unit list.
Select a policy storage unit in this step even if you plan to select Instant Recovery
Snapshots Only later in this procedure. NetBackup uses this storage unit for the
stream-based backups of control files and archived redo logs that are included in this
policy. NetBackup also uses this storage unit if you select Third Party Copy Device
when you configure the schedule.
Any_available is not supported for the following data movers: NetBackup Media
Server or Third-party Copy Device.
162 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Snapshot Backups
If you want to create only disk images, in the Destination: panel, under Instant
Recovery:, select Snapshots only. This supresses NetBackup’s default behavior,
which is to copy the snapshot to a Media Manager or disk storage unit. When you
select Snapshots only, NetBackup creates the on-disk snapshot copy of the
database, but it does not copy the snapshot to a storage unit. The on-disk
snapshot becomes the only backup copy. Note that the on-disk snapshot is not
considered to be a replacement for a traditional backup.
◆ The Application Backup schedule is for the control files and archived redo logs.
NetBackup copies the database’s control files and archived redo logs to the Media
Manager or disk storage unit you selected.
For UNIX clients, if you selected Third-Party Copy Device as an offhost backup
method, click Override policy storage unit and select a non-SAN Media Manager
or disk storage unit type that is appropriate to back up the control files and
archived redo logs.
13. Configure other attributes and add any additional schedules and backup selections.
164 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Snapshot Backups
a. If you are not going to use a SnapVault storage unit, from the Policy storage unit
list, select an appropriate non-SnapVault storage unit.
Although the policy cannot execute without a specified storage unit, NetBackup
does not use the storage unit for proxy NAS snapshot backups. NetBackup
creates the snapshot on disk regardless of which storage unit you select.
The policy storage unit is used for stream-based backups of control files and
archived redo logs unless you override it in the Application Backup schedule.
b. If you want to use SnapVault, make sure you have a disk storage unit defined.
Select the disk storage unit you have configured for SnapVault in the Policy
storage unit list.
5. Select Perform snapshot backups and Retain snapshots for instant recovery.
7. From the pull-down menu under Use data mover, select Network Attached Storage.
When the policy runs, NetBackup automatically selects the NAS_Snapshot method
for creating the snapshot.
As an alternative, you can manually select the NAS_Snapshot method using the
Advanced Snapshot Options dialog from the policy display. For information about
the Maximum Snapshots (Instant Recovery only) parameter, see the policy
configuration chapter of the NetBackup Advanced Client System Administrator’s Guide.
9. Click New.
Configure both an Automatic Backup schedule and an Application Backup schedule,
as follows:
◆ The Automatic Backup schedule is for the database files.
In the Destination: panel, under Instant recovery:, select Snapshots only. This
supresses NetBackup’s default behavior, which is to copy the snapshot to a
storage unit.
If you use SnapVault, the level you specify in the Retention: field determines the
retention period for the SnapVault copies on the SnapVault secondary.
◆ The Application Backup schedule is for the archived redo logs and the control
files.
If you use SnapVault, override the policy storage unit and specify a storage unit
that is appropriate for the control files and archive logs.
12. Configure other attributes and add any additional schedules and backup selections.
166 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Restoring Data from a Snapshot Backup
snapshot rollbacks.
In addition, the following considerations are relevant for NetBackup for Oracle restores:
◆ The requested files (number and names) are identical to those in the snapshot
◆ The primary volume does not contain files created after the snapshot was made
If verification fails, the rollback aborts with 249.
◆ Snapshot rollback should be used with database files only. Database files and archive
redo logs should exist on different file systems or volumes.
To use the restored and new subvolume, you can perform one of the following:
◆ Unmount the original subvolume, which is the subvolume that the restore process did
not overwrite. Rename the original subvolume. Rename the new subvolume with the
name of the original. Mount the new subvolume on the client.
◆ Mount the new subvolume on the client. Use the ALTER DATABASE RENAME
DATAFILE command to point to the restored datafile on the newly created
subvolume.
The procedure for specifying a snapshot rollback restore depends on the method you
choose to perform the restore. Use one of the following methods:
4. Use the NetBackup for Oracle Recovery Wizard for the restore.
168 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Restoring Data from a Snapshot Backup
NB_PC_ORA_RESTORE=rollback.
For example:
RUN {
send 'NB_ORA_PC_RESTORE=rollback';
Troubleshooting
If the rollback restore fails, it might be because Oracle still has a file open. Shutting down
and restarting the database can correct this problem.
Note VERITAS recommends that Oracle Advanced Client users who want to perform BLI
backups use the BLI agent with RMAN. NetBackup for Oracle also provides a
method for BLI backup without RMAN that uses scripts to put tablespaces into, and
take them out of, backup mode. This method is not recommended, and it requires a
significantly different configuration. For instructions on using the script-based BLI
method without RMAN, see “Script-based Block-level Incremental (BLI) Backups
Without RMAN” on page 207.
170 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Block-level Incremental Backups
Restoring any of the incremental backup images requires NetBackup to restore the last full
backup image and all the subsequent incremental backups until the specified incremental
backup image is restored. NetBackup performs this restore process automatically, and it is
completely transparent. The media that stored the last full backup and the subsequent
incremental backups must be available, or the restore cannot proceed.
Note that restoring a file rewrites all blocks in that file. The first subsequent differential
incremental backup and all subsequent cumulative incremental backups back up all the
blocks in the restored file. After restoring an entire database, the first subsequent backup
results in a full backup.
The restore destination can be a VxFS, UFS (Solaris), JFS (AIX), or HFS (HP-UX) file
system. The destination VxFS file system does not need to support the Storage Checkpoint
feature to restore files, but a VxFS file system with the Storage Checkpoint feature is
needed to perform BLI backups of the restored data. This section uses the following terms
to describe BLI backups:
◆ Full Backup. A backup in which NetBackup backs up the entire database file, not just
data blocks changed since the last full or incremental backup.
◆ Cumulative BLI Backup. This is a backup of all the data blocks of database files that
changed since the last full backup. A cumulative BLI backup image contains only the
data blocks of database files that changed since the last full backup, but a cumulative
BLI backup can reduce the number of incremental backup images that must be
applied to a restore operation. This speeds up the restore process.
◆ Differential BLI backup. This is a backup in which NetBackup performs a backup of
only those data blocks of database files that changed since the last backup of any type
(full, cumulative incremental, or differential incremental backup) was performed.
When NetBackup initiates full database backups, followed by block level incremental
backups, it creates, manages, and uses the appropriate Storage Checkpoints of the Oracle
datafile file systems. These Storage Checkpoints identify and maintain a list of modified
blocks.
Storage Checkpoint
The BLI backup methodology uses the Storage Checkpoint facility in the VERITAS File
System (VxFS) available through the Storage Foundation for Oracle.
The VxFS Storage Checkpoint facility keeps track of data blocks modified by the database
since the last backup. NetBackup with BLI backup leverages this facility to back up only
changed blocks, not the entire database, for an incremental backup.
VxFS Storage Checkpoint is a disk- and I/O-efficient snapshot of file systems. A Storage
Checkpoint provides a consistent, stable view of a file system at the point in time when
the file system was snapped or checkpointed. Instead of making a physically separate
copy of the file system, a Storage Checkpoint identifies and maintains only changed file
system blocks, saving disk space and significantly reducing I/O overhead.
By keeping track of changed blocks, the VxFS Storage Checkpoint enables BLI backups.
VxFS Storage Checkpoint facility provides a consistent view of file systems, allowing BLI
backup to freeze the database image during database backups.
The Storage Checkpoint operation is similar to the snapshot file system mechanism.
However, unlike a snapshot, the Storage Checkpoint persists after a system reboot. Also,
the Storage Checkpoint operation is totally transparent to administrators. The Checkpoint
image is managed and available only through NetBackup or through the VxDBA utility
for database backup available with the VERITAS Storage Foundation for Oracle.
For more information on Storage Checkpoints, see the VERITAS Storage Foundation for
Oracle Database Administrator’s Guide.
Storage Checkpoints can be taken while the database is online or offline. To take a Storage
Checkpoint while the database is online, you must enable archive log mode. During the
creation of the Storage Checkpoint, all tablespaces are placed in backup mode.
The following sections describe the kinds of Storage Checkpoints:
◆ Nodata Storage Checkpoint
◆ Fulldata Storage Checkpoint
172 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Block-level Incremental Backups
If the agent finds this file during run time, it uses Nodata Storage Checkpoint, and it keeps
the datafiles in backup mode for the duration of the backup.
Configuration Requirements
Before configuring BLI backups, make sure your configuration meets the following
requirements:
◆ NetBackup for Oracle is installed, licensed, and configured.
◆ NetBackup Advanced Client is installed and configured, and the license key for this
option has been registered.
◆ VERITAS Storage Foundation for Oracle must be installed and configured.
◆ VERITAS File System must have Storage Checkpoint licensed.
For more information on requirements, see the NetBackup Advanced Client System
Administrator’s Guide.
174 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Block-level Incremental Backups
7. Use the Clients tab to specify clients to be backed up with this policy.
176 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Advanced Client Effects
Types of Backups
The backup types available on the Schedules tab of the policy play a different role for
NetBackup for Oracle with Advanced Client backups. The following table explains these
roles:
Automatic Full Backup, For file-based proxy copy backups, the Automatic backup schedule types
serve two purposes:
Automatic Differential ◆ Automatic backup schedules automatically start the backups by
Incremental Backup, running the NetBackup for Oracle RMAN scripts or templates.
◆ Automatic backup schedules control file-based snapshot backups of
Automatic Cumulative
the database objects.
Incremental Backup
Note Snapshot backups do not support BLI functionality. Oracle always
updates the datafile headers when performing a checkpoint of the
database. This means that an incremental backup that copies each
changed file in its entirety is likely to include all of a database’s
files, effectively performing a full backup.
Schedule Properties
Some schedule properties have a different meaning for Advanced Client database
backups than for a regular database backup. The following table explains these properties:
Schedule Properties
Property Description
Multiple copies If you are using Multiple Copies and want to specify multiple copies of
non-proxy stream-based backups for your Oracle policy, configure Multiple
copies on the Application Backup schedule.
For proxy file-based backups, configure Multiple copies on the automatic
backup schedule.
“Schedule Properties” on page 77 describes other schedule properties that are specific to
Oracle backups.
178 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Advanced Client Effects
In the RMAN template generation wizard, the Specify Maximum Limits selection
options on the Backup Limits screen are not applicable for proxy backups. RMAN uses
these options only for conventional stream-based backups. If the template includes
archived redo logs, NetBackup uses this option to back up the logs.
Whether you use a template or script, you must enable the advanced backup method for
your clients by configuring the Advanced Client methods on the Attributes tab of the
policy. At run time, the template checks the policy attributes to determine if an Advanced
Client backup method is configured, and it initiates the proxy file-based backup.
If you use a script, the script must reside on each client included in the policy. Include the
Oracle backup proxy command in the script to perform the advanced backup method.
NetBackup for Oracle provides sample scripts with the installation.
Environment Variables
You can use environment variables to change the number of streams used for a proxy
copy session or to specify an alternate backup schedule. For information on specifying
these variables, see “Configuring the Runtime Environment” on page 84.
The following list shows variables that you can to set that are specific to the NetBackup
for Oracle Advanced Client:
NB_ORA_PC_SCHED NetBackup for Oracle schedule used for a proxy copy file-based backup
(Automatic Full, Automatic Differential Incremental, or Automatic
Cumulative Incremental backup type).
For scheduled backups, this variable is passed from the scheduler. When
creating an RMAN template using the NetBackup for Oracle RMAN
Template Generation Wizard, this variable is automatically created in the
template.
NB_ORA_PC_STREAMS Specifies the number of backup streams that the NetBackup for Oracle
Advanced Client starts simultaneously in each proxy copy session.
When a backup starts, NetBackup for Oracle Advanced Client groups all
datafiles into a specified number of backup streams based on the file
size. NetBackup for Oracle Advanced Client attempts to create streams
of equal size.
The default value for NB_ORA_PC_STREAMS is 1.
Only a user can set this variable. When creating an RMAN template
For NetBackup for Oracle with Advanced Client, the order of precedence for environment
variables is the same as for standard NetBackup for Oracle. “Configuring the Runtime
Environment” on page 84 contains instructions for configuring variables set by
NetBackup and variables set by a user.
NetBackup for Oracle installs sample scripts in the following location:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
The following are the NetBackup for Oracle with Advanced Client sample scripts that
show how to configure the required variables:
◆ hot_database_backup_proxy.sh. This script sets the environment and calls
RMAN with the appropriate command to perform a whole database proxy backup.
When NetBackup runs a schedule, it sets the environment variables that NetBackup
for Oracle with Advanced Client uses. The script shows how to use the RMAN send
command to pass the NetBackup for Oracle with Advanced Client variables with a
vendor-specific quoted string.
◆ hot_tablespace_backup_proxy.sh. This script sets the environment and calls
RMAN with the appropriate command to perform a tablespace proxy backup.
If you use scripts, use the send command to pass the environment variables to the agent.
The following example uses the send command to specify the values for
NB_ORA_PC_SCHED and NB_ORA_PC_STREAMS:
run {
backup proxy
For more information, see the sample scripts provided with the agent.
180 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting 7
NetBackup, NetBackup for Oracle, and the Oracle Recovery Manager all provide reports
on database backup, archive, and restore operations. These reports are useful for finding
errors associated with those applications.
This chapter contains the following sections.
◆ General Troubleshooting Procedure
◆ NetBackup and NetBackup for Oracle Logs and Reports
◆ Troubleshooting Backup or Restore Errors
◆ Troubleshooting XML Export or XML Import Errors
◆ Troubleshooting the Browser Interface and Wizards
◆ Troubleshooting NetBackup for Oracle with Advanced Client
◆ Minimizing Timeout Failures on Large Database Restores
181
General Troubleshooting Procedure
Note For brevity, this chapter refers to the libobk module as API. Many media manager
vendors also call the libobk module DMO (Database Module).
To perform this procedure, the following products must be properly installed and
configured:
• NetBackup 6.0.
• Oracle RDBMS 8.0.4 or later. XML export and XML import require Oracle RDBMS
8.1.5 or later.
• NetBackup for Oracle 6.0.
1. When verifying your installation, ensure that the following NetBackup for Oracle
binaries exist in /usr/openv/netbackup/bin:
• bphdb, which resides on the client and is used by both the NetBackup scheduler
and the graphical interface to start backups. The main purpose of bphdb is to run
an Oracle template or shell script that in turn calls rman, bporaexp, or
bporaimp.
• libobk, which is a shared library module that contains functions callable by
RMAN. This library is loaded when RMAN is started. The name of this binary
depends on the operating system.
• libobk.so on NCR, SGI, Sequent, Linux, and Data General
• libobk.so.1 on Solaris, Tru64 and Digital UNIX (32-bit Oracle)
• libobk.so64.1 on Solaris (64-bit Oracle)
• libobk.sl on HP-UX (32-bit Oracle)
• libobk.sl64 on HP-UX (64-bit Oracle)
• libobk.a on AIX
• libobk.a64 on AIX (64-bit Oracle)
• libobk.so64 on SGI (64-bit Oracle)
2. For XML export and XML import, verify that the following binaries exist:
• For 32-bit Oracle
• /usr/openv/netbackup/bin/bporaexp
• /usr/openv/netbackup/bin/bporaimp
182 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
General Troubleshooting Procedure
• /usr/openv/netbackup/bin/bporaimp64
• /usr/openv/lib/libbpora64.so.8.0 (libbpora64.sl.8.0 on
HP-UX)
• /usr/openv/lib/libbpora64.so.9.0 (libbpora64.sl.9.0 on
HP-UX)
3. For the Backup, Archive, and Restore interface, verify that the following binaries exist:
• /usr/openv/netbackup/bin/bpdbsbora
• /usr/openv/netbackup/bin/bpubsora
4. Check that both the NetBackup server and client software are working properly. That
is, check that normal operating system files can be backed up and restored from the
client. The NetBackup client must be running the same version of software as the
NetBackup server.
5. Check that the following NetBackup log directories exist with 777 permissions and
that VERBOSE=5:
• On the client: bpdbsbora, bporaexp (or boraexp64), bporaimp (or
Note These logs can become very large, especially bpdbm. Ensure that enough free disk
space exists in the log directory disk partition.
Enabling Logging
▼ To enable the NetBackup for Oracle logs
/usr/openv/netbackup/logs/bpbkar
/usr/openv/netbackup/logs/bphdb
/usr/openv/netbackup/logs/bprestore
/usr/openv/netbackup/logs/tar
/usr/openv/netbackup/logs/dbclient
/usr/openv/netbackup/logs/bpdbsbora
/usr/openv/netbackup/logs/bporaexp
/usr/openv/netbackup/logs/bporaimp
/usr/openv/netbackup/logs/bporaimp64
For example:
184 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup and NetBackup for Oracle Logs and Reports
cd /usr/openv/netbackup/logs
mkdir bphdb
For example:
3. Enable logging for the nbpem, nbjm, and nbrb scheduling processes, which use
unified logging.
NetBackup writes unified logs to /usr/openv/logs on UNIX and to
install_path\NetBackup\logs on Windows. You do not need to create log
directories for processes that use unified logging. For information on using logs and
reports, see the NetBackup Troubleshooting Guide.
log.mmddyy
This log contains debugging information and execution status for the Oracle
NetBackup client processes linked to the library program, libobk, provided
with NetBackup for Oracle.
This log contains debugging information and execution status for the
NetBackup for Oracle Backup and Recovery Wizards and for the bpdbsbora
command line utility. This log also contains the debugging information and
execution status information that is generated when an Oracle template is run
from an automatic schedule (when bphdb invokes bpdbsbora to run the
template).
This log contains debugging information and execution status for the
bporaexp (bporaexp64) program that performs XML exports.
This log contains debugging information and execution status for the
bporaimp (bporaimp64) program that performs XML imports.
186 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
NetBackup and NetBackup for Oracle Logs and Reports
sufficient. However, Technical Support might ask you to set the value higher when a
problem is being analyzed. You can set the debugging levels to 0, 1, 2, 3, 4, or 5. A level of
5 provides the most detail.
❖ Enable detailed logging by entering the following line in the bp.conf file:
VERBOSE = 5
Note Ensure that server and user-directed regular file system backups work for the client
prior to debugging the Oracle RMAN backups. Try backing up the Oracle binaries.
◆ The first place to start is to run rman from the command line rather than having the
NetBackup scheduler run a script. These troubleshooting steps assume you are
running rman from the command line.
◆ If NetBackup and RMAN are communicating, look for a log in
/usr/openv/netbackup/logs/dbclient. If a log file exists and you are having
problems, this usually indicates a configuration problem within the NetBackup policy
or media availability. For example:
cd /usr/openv/netbackup/logs/dbclient
ls
log.123098
188 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting Backup or Restore Errors
The preceding example shows how to check for a log file’s presence. The presence of a
log file indicates that NetBackup and Oracle RMAN are linked correctly.
◆ If NetBackup and Oracle rman are not communicating, you do not see a log in
/usr/openv/netbackup/logs/dbclient. Logs are not created in this directory if
the permissions are not set correctly for the Oracle user to write to the directory. A full
permission setting is best. Type chmod 777 to open up all permissions.
◆ If you receive an error such as one of the following, it often means that the link step
(oracle_link) failed:
RMAN-00571:============================================================
RMAN-00571:============================================================
Additional information: 25
If you suspect a link failure, refer to “Linking the Library” on page 44.
◆ Use the following procedure to verify that the RMAN script works correctly:
1. rman starts.
A backup or restore can be started in any of the following ways:
• From an RMAN backup or restore initiated from the operating system prompt
such as:
rcvcat user/pwd[@TNS_alias]\
cmdfile RMAN_script_file_name
2. RMAN verifies its environment and then issues requests to the API.
Some information, such as the NetBackup version, API versions, trace file name, and
NetBackup signal handlers, is registered with RMAN.
An error at this point is usually due to a problem with client and server
communication. Check the messages in the bprd and bpcd logs for clues. Also verify
the bp.conf entries on the client.
/usr/openv/netbackup/logs/dbclient/log.mmddyy file.
If the bprd process failed, check the logs for bprd and bpbrm.
A failure at this point is frequently due to bad NetBackup server or Oracle policy
configuration parameters.
NetBackup can usually select the correct Oracle policy and schedules, but NetBackup
can select a policy or schedule in error if there are several Oracle policies in its
database. Try setting the SERVER and POLICY values in the bp.conf file on the client
or by setting environment variables. For example, the following C Shell setenv
commands specify the Oracle policy, schedule, and server for NetBackup to use:
setenv NB_ORA_POLICY policyname
4. RMAN issues read or write requests to the API, which then transfers data to or from
the NetBackup server.
190 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting XML Export or XML Import Errors
• RMAN aborts if it encounters an error while reading a data file during the backup
(for example, if Oracle blocks are out of sequence). It also aborts if NetBackup
sends a bad backup image during the restore.
• NetBackup might return an error code to the API if for some reason it could not
complete the backup successfully.
192 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting XML Export or XML Import Errors
Logs are not created in this directory if the permissions are not set for the Oracle user
to write to the directory. The full permissions setting, chmod 777, is best.
▼ To troubleshoot by stage
For example:
2. bporaexp or bporaimp verifies its environment and then connects to Oracle and
NetBackup.
Oracle connect errors can be caused by an Oracle environment problem, a database
problem, an incorrect userid, or an incorrect password.
A NetBackup error at this point is usually due to a problem with client and server
communication. Check the messages in the bprd and bpcd logs for clues. Also verify
the bp.conf entries on the client.
The NetBackup client interfaces gather information from the following places:
• The environment, including bporaexp and bporaimp parameter files.
If you are using templates, the parameter files are generated from the template.
If you are using scripts, you have to generate the parameter file manually.
• T
he user’s bp.conf and /usr/openv/netbackup/bp.conf files on the client.
This information is sent to the master server’s bprd process.
To troubleshoot a backup problem in this part of the sequence, examine the
/usr/openv/netbackup/logs/bporaexp/log.mmddyy file.
If the bprd process failed, check the bprd and bpbrm logs.
Frequently, incorrect NetBackup server or Oracle policy configuration parameters
cause failures at this point.
NetBackup can usually select the correct Oracle policy and schedules, but NetBackup
can select a policy or schedule in error if there are several Oracle policies in its
database. Try setting the SERVER and POLICY values in the bp.conf file on the client
or by setting the following bporaexp parameters:
NB_ORA_POLICY=policyname
NB_ORA_SCHED=schedule
NB_ORA_SERV=NetBackup_server
NB_ORA_CLIENT=NetBackup_client
NB_ORA_CLIENT=NetBackup_client
Set these parameters to the same values that were used for the XML export operation.
4. bporaexp or bporaimp issues read or write requests to the NetBackup client, which
then transfers data to or from the NetBackup server.
bporaexp builds an SQL query for each table being archived, and it uses the Oracle
Call Interface (OCI) to run the query. The query results are translated into XML. The
XML output is passed to the NetBackup client interfaces.
The reverse process is used by bporaimp. That is, XML data is restored, parsed, and
inserted into the database.
A failure here is probably due to an Oracle error, or to a NetBackup media, network,
or timeout error.
194 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting XML Export or XML Import Errors
5. bporaexp or bporaimp tells the NetBackup client to close the session and
disconnects from the Oracle database.
The NetBackup client waits for the server to complete its necessary actions (backup
image verification and so on) and then exits.
◆ For browsing in the Restore window, the policy type must be set to Oracle.
Perform the following actions to change the client policy type:
a. On the Actions menu, select Specify NetBackup Machines and Policy type.
c. Click OK.
◆ The oratab file is in the correct location (/etc/oratab or
/var/opt/oracle/oratab) and contains all of the available Oracle SIDs.
If you have trouble connecting to the Oracle database, verify the following:
◆ Make sure the database is in a mount or open state.
◆ Make sure that your login ID and password have Oracle SYSDBA privileges. Initially,
NetBackup for Oracle attempts OS Authentication to log on. If that fails, you are
prompted for a user name, password, and an optional Transparent Network Substrate
(TNS) alias. The user name and password you enter must have SYSDBA privileges.
◆ In a clustered environment, failure to connect to the database can mean a problem
with the network configuration. The browser must connect locally. However, in some
environments, all connections are considered to be remote connections, even a
connection to a local database. This is true, for example, in an Oracle Real Application
Clusters (RAC) environment. In such cases, you must make the connection using a
TNS alias.
In a Linux environment, Oracle backups and restores fail if the Linux login is not the
Oracle user. In such cases, Oracle generates the following message:
INF - ORA-19554: error allocating device, device type: SBT_TAPE, device name:
If you want to start an Oracle job as someone other than an Oracle user, augment the
default shared library search path. Use the Linux ldconfig(8) command to add
$ORACLE_HOME/lib to the search path.
196 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting NetBackup for Oracle with Advanced Client
198 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Oracle 9i and 10g Real Application
Clusters A
Overview
In an Oracle9i or Oracle 10g Real Application Clusters (RAC) environment, many Oracle
instances exist on separate servers, each with direct connectivity to a single Oracle
database. All the servers can concurrently run transactions against the same database.
Should any single server or instance fail, processing continues on the surviving servers.
Virtual Names
A virtual name is a network host name resource (mapped to a IP address) that is associated
with an application. If it is possible, virtual names should be used for the client and server
nodes. Using a virtual node name for the client allows you to specify a single client entity
for all of the Oracle backups. This allows NetBackup to perform a restore to any physical
node.
If a virtual client name is not used, a regular restore can only be performed from the node
associated to the client name specified on the backup. Another possible solution in this
environment is to use an alternate client restore.
199
How Does NetBackup Fit into a RAC Environment?
Archiving Schemes
The preferred configuration for Real Application Clusters is to use a cluster file system
archiving scheme. In this scheme, each node writes to a single Cluster File System (CFS)
archived log destination and can read the archived log files of the other nodes. The
following figure depicts a CFS archiving scheme.
200 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
How Does NetBackup Fit into a RAC Environment?
If the CFS solution is not available, Oracle recommends a scheme in which each node
archives to a local directory and writes a copy to each of the other nodes’ archive
directories (see the following figure). The locations are shared between the nodes (with
read and write permissions) by NFS mounting the directory (UNIX) or sharing the
locations (Windows). The following figure depicts a non-CFS local archiving scheme with
archive sharing.
A scheme similar to the previous one exists if each node archives to a local directory, as in
the following figure, and the locations are shared (read-only) with the other nodes in the
cluster. These locations are shared between the nodes by NFS-mounting the directory
(UNIX) or sharing the locations (Windows). Therefore, each node can read each archive
destination. This figure depicts a non-CFS local archiving scheme with read-only archive
sharing.
202 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
How Does NetBackup Fit into a RAC Environment?
The simplest archiving scheme is local archiving with no sharing, as shown in the
following figure. Each node writes only to the local destination, and no access is given to
the other nodes in the cluster. The following figure depicts a non-CFS local archiving
scheme with no archive sharing.
Backing Up a Database
If you are in a RAC environment and you chose one of the archive log schemes described
in the previous section, you can perform a backup and a restore using typical RMAN
scripts.
In the following example, RMAN backs up the database, including all of the archive logs.
This example assumes that the archive logs are accessible by each node in the cluster. If
they are not, then the archive logs need to be backed up separately on each node.
RUN
BACKUP
DATABASE;
BACKUP
ARCHIVELOG ALL ;
Restoring a Database
Restoring the database using a virtual name or restoring from the node where the backup
was performed is straightforward and identical to a typical RMAN restore.
Example
In this example, the client is saturn and the server is jupiter. The names saturn and
jupiter can be either the physical names or the virtual names of the nodes in the cluster.
The following example restores the entire database from any node:
RUN {
RESTORE
DATABASE;
RECOVER
DATABASE;
Troubleshooting
An RMAN restore to one node of a cluster can fail with a status code 39. This happens
when the following situation is present:
◆ The NB_ORA_CLIENT environment variable is set to the virtual host name of the
cluster.
and
◆ The CLIENT_NAME variable in the user or master bp.conf file on the client is set to
the virtual host name of the cluster.
To remedy this, set the CLIENT_NAME variable to the node name.
For more information on restores and redirected restores, see “Performing a Restore” on
page 112.
204 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
How Does NetBackup Fit into a RAC Environment?
RESTORE
ARCHIVELOG ALL;
If the remote archive logs destinations do not allow write access (see the figures “Non-CFS
Local Archiving Scheme with Archive Read-only Sharing” and “Non-CFS Local
Archiving Scheme with no Archive Sharing”), the following example can be used:
RUN {
RESTORE
ARCHIVELOG ALL;
where directory is the directory into which you copied the archive logs.
206 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Script-based Block-level Incremental (BLI)
NetBackup for Oracle with Advanced Client extends the capabilities of NetBackup to
back up only changed data blocks of Oracle database files. NetBackup recommends using
RMAN-based BLI backups, which allow the use of templates and remain tightly
integrated with Oracle administration. For more information on BLI backups, see
“NetBackup for Oracle with Advanced Client” on page 147.
If you choose to use script-based BLI backups without RMAN, this chapter describes the
necessary configuration.
This chapter contains the following topics:
◆ Script-based BLI Backup Overview
◆ Installation Requirements
◆ Configuring Script-based BLI Backups
◆ Performing Backups and Restores
◆ Troubleshooting
207
Script-based BLI Backup Overview
Terms
The following list contains terms that might be new to you:
Term Definition
cold database backup A cold database backup is taken while the database is offline or closed.
BLI backup shuts down the database and performs either full or
block-level incremental backups. This backup method is also referred
to in Oracle documentation as a consistent whole database backup or a
closed backup. The data from a cold backup is consistent, resulting in
easier recovery procedures.
hot database backup A hot database backup allows the database to be online and open while
the backup is performed. With the Storage Checkpoint facility, this
backup method runs database backups in parallel so a database does
not need to be in backup mode for a long time.
To use hot backups, the database must be in ARCHIVELOG mode. BLI
backup uses the alter tablespace begin backup command
and the alter tablespace end backup command to put the
database into and take it out of backup mode. This method is also
referred to in Oracle documentation as an inconsistent whole
database backup or open backup. Unlike the cold database backup
method, the data in hot backups is fuzzy or inconsistent until the
appropriate redo log files (online and archived) are applied after the
restore operation to make the data consistent.
208 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Script-based BLI Backup Overview
Term Definition
quick freeze database backup A quick freeze database backup is a combination of the traditional cold
and hot database backup. A quick freeze database backup initially
shuts down the database to create a Fulldata Storage Checkpoint for a
consistent database backup. Because the VxFS Fulldata Storage
Checkpoint is a snapshot of the database image, an Oracle instance
can be brought back online as soon as the Fulldata Storage
Checkpoint is created. The Oracle instance can remain online while
NetBackup is backing up the database using the Fulldata Storage
Checkpoint.
A quick freeze database backup is different from the traditional
Oracle online backup. Quick freeze database backup is also an online
database backup, but it requires the database to be brought down
briefly to take a snapshot or Fulldata Storage Checkpoint of the
database image. The Fulldata Storage Checkpoint is created in a few
seconds and the database can be restarted immediately after the
Fulldata Storage Checkpoint is taken. A backup image from a quick
freeze database backup is equivalent to a backup image from a cold
database backup. You can choose to use this backup method when
configuring BLI notify scripts. See “Creating Notify Scripts” on
page 220.
Installation Requirements
▼ To verify the installation requirements
1. Make sure that the following products are properly installed and configured:
◆ NetBackup 6.0
◆ A supported level of Oracle
◆ NetBackup for Oracle 6.0
◆ VERITAS Storage Foundation for Oracle
2. Verify licensing.
The VERITAS products must have valid licenses. To check for licenses, enter the
# vxlicense -p
The command displays all the valid VERITAS licenses installed on the system. If you
have valid licenses, the Storage Checkpoint feature and the VERITAS Storage
Foundation for Oracle appear in the list.
3. Verify that both the NetBackup server (master and media) and client software are
working properly.
Particularly, verify that you can back up and restore typical operating system files
from the client.
210 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Installation Requirements
short (such as for incremental backups), an additional 10% of the file system size is
usually sufficient. If the database has a heavy workload while a full backup is running, the
file systems may require more space.
Most database NetBackup BLI backup policy requirements are the same as for file system
backups. The differences or special requirements, where they exist, are defined in the
following sections.
212 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Script-based BLI Backups
If you have more than one policy defined for an Oracle instance, the instance is grouped
by the NetBackup keyword phrase. Identify one of the policies as the
POLICY_IN_CONTROL in the NetBackup notify scripts. This is the policy that performs
database shutdowns and restarts. All policies with the same keyword phrase need to be
configured to start simultaneously.
Caution Care must be taken when specifying the keyword phrase. A multistream
backup is attempted if the backup process finds more than one policy with the
following characteristics: each policy has the BLI attribute set, each policy is
active, each policy contains the same client, and each policy has an identical
keyword phrase.
You can check the file systems on the backup client to see if they are included in one of the
NetBackup policies on the server. To see if you need to add any new file systems to the
NetBackup policies, run the following commands from the server on a regular basis,
perhaps as a cron(1) job:
# cd /usr/openv/netbackup/bin/goodies/
The preceding command generates the following output and mails it to the specified
mailid:
File System Backup Coverage Report (UNIX only)
-----------------------------------------------
Key: * - Policy is not active
CLIENT: mars
If there is an UNCOVERED file system that is used by Oracle, add it to one of the NetBackup
policies so that all the necessary file systems are backed up at the same time.
Note After a file system is added to a policy, it is a good idea to keep the file system in
that policy. If you change the policy, NetBackup performs a full backup the next
time backups are run even if an incremental backup is requested.
Policy Attributes
NetBackup applies policy attribute values when it backs up files. Certain attributes must
be set for BLI backup:
◆ Policy Type. Set to Standard.
◆ Perform block level incremental backups. Select to enable BLI backups. If the BLI
attribute is not enabled, NetBackup uses the standard method to back up the files in
the file list.
◆ Job Priority. Set so that the BLI backup policies run before other policies.
◆ Keyword phrase. Define as the Oracle instance name ($ORACLE_SID) in each of the
policies for the same instance. Multistream backups start when all the policies with a
particular keyword phrase complete their respective startup scripts. If you have
multiple Oracle instances (SIDs) use a seperate set of policies for each SID. If the SIDs
are backed up simultaneously and any share a common file system for data files, use
Nodata Storage Checkpoints. Set the METHOD to NODATA_CKPT_HOT.
Note Do not change a keyword phrase after it is set in a policy. The keyword phrase is
used in naming Storage Checkpoints. Changing the keyword phrase necessitates a
full backup even if an incremental backup is requested.
The NetBackup System Administrator’s Guide, Volume I describes other policy attributes and
how to configure them.
Client List
The client list specifies the clients upon which you configured a BLI backup. For a
database backup, specify the name of the machine upon which the database resides.
Specify the virtual hostname if clustered.
214 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Script-based BLI Backups
Schedules
The NetBackup server starts these schedule types:
◆ Full Backup
◆ Differential Incremental Backup
◆ Cumulative Incremental Backup
Each BLI backup policy must include one full backup schedule and at least one
incremental backup schedule. In addition, you must designate one of the BLI backup
policies as the POLICY_IN_CONTROL. The policies for each stream must have the same
types of schedules.
The NetBackup System Administrator’s Guide, Volume I describes other schedule attributes
and how to configure them.
Schedule Types
Schedule Times
For server-initiated full and incremental backup schedules, set the start times and
durations to define the appropriate windows for the backups. Follow the same procedure
used to define backup schedules for other policies. For more information on these
procedures, see the NetBackup System Administrator’s Guide, Volume I.
The backups are started by the scheduler only within the backup window specified. For
the POLICY_IN_CONTROL, include in the user-directed backup schedule the time periods
when the BLI backup policies complete.
Retention
Set the retention level and periods to meet user requirements.
Policy Type:Standard
Active:yes
Job Priority:0
Max Jobs/Policy:1
Residence:oracle_tapes
Volume Pool:NetBackup
Keyword:ORA1
Schedule: full
Frequency: 1 week
Daily Windows:
216 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Script-based BLI Backups
Wednesday
18:00:00 --> Thursday 06:00:00
Schedule: incr
Frequency: 1 day
Daily Windows:
Schedule: userbkup
Daily Windows:
218 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Script-based BLI Backups
The following sections describe the information you need to supply when running
setup_bli_scripts.
For more information about using the notify scripts to back up your Oracle database, see
“Manual Backups” on page 224.
220 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Script-based BLI Backups
ORACLE_CNTRL Location to which a copy of the Oracle control file is written so that it
can be backed up.
ORACLE_INIT Path name for the Oracle startup parameter file (INIT.ORA). If you are
using an Oracle SPFILE as your parameter file, do not set the
ORACLE_INIT environment variable.
ORACLE_CONFIG Path name for the Oracle configuration file (CONFIG.ORA). Some
database configurations use the CONFIG.ORA file to specify values for
the database parameters that usually do not change. The CONFIG.ORA
file can be called by the INIT.ORA file using an include statement.
/MOUNTPOINT/app/oracle
/dbhome/oracle/orac901/product/RELEASE
The default "connect" statement that will be used to connect to the database is:
"connect / as sysdba"
Would you like to modify the connect and use a specific login? (y/n) n
Please enter the Oracle instance (ORACLE_SID) you want to back up? orac901
/dbhome/oracle/orac901/admin/orac901/pfile/configorac901.ora
222 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Configuring Script-based BLI Backups
To back up a copy of the Oracle control file, you need to specify a file
Please enter the file path where Oracle is to write a copy of your
To back up the Oracle archive logs, you need to specify their location.
/dbhome/oracle/orac901/admin/orac901/arch
If one of the methods requiring DB shutdown are selected, you may experience
manner. You may want to change the shutdown command in the notify scripts to
shutdown immediate, or you may have to increase the BPSTART_TIMEOUT value in the
bp.conf file on the master server, or you may want to change the backup
You now need to decide on how many NetBackup policies you will have
Please enter the name of the policy that will be the POLICY_IN_CONTROL? BLI_1
Performing Backups
Note You must be the root user to perform all operations using the BLI backup software.
Automatic Backups
The best way to back up databases is to set up schedules for automatic backups. To add a
new schedule or change an existing schedule, follow the guidelines in “Creating
NetBackup Policies for Script-Based BLI Backup” on page 212.
Manual Backups
You can also run an Automatic Backup schedule manually using the NetBackup
Administration Console. For information about performing manual backups of schedules,
see the NetBackup System Administrator’s Guide, Volume I.
To perform a cold (offline) backup, set the environment variable METHOD in the
bpstart_notify script on the client to SHUTDOWN_BKUP_RESTART. The
bpstart_notify script shuts down the database before the backup begins and the
bpend_notify script restarts the database after the backup completes.
To perform a hot (online) backup using Fulldata Storage Checkpoints, make sure the
database is running in ARCHIVELOG mode and set the variable METHOD to
ALTER_TABLESPACE. The bpstart_notify script changes the tablespaces to online
backup mode before the backup begins, and the post_checkpoint_notify script
changes the tablespaces back to normal mode after the Fulldata Storage Checkpoints are
created.
To perform a Nodata Storage Checkpoint Hot (online) backup, make sure the database is
running in ARCHIVELOG mode and set the environment variable METHOD in the
bpstart_notify script to NODATA_CKPT_HOT. The bpstart_notify script changes
the tablespaces to online backup mode before the backup begins. The bpend_notify
script changes the tablespaces back to normal mode after the backup completes.
To perform a quick freeze backup, set the environment variable METHOD in the
bpstart_notify script to SHUTDOWN_CKPT_RESTART. The bpstart_notify script
shuts down the database and the post_checkpoint_notify script restarts it
immediately after the Fulldata Storage Checkpoints are created. Taking VxFS Fulldata
224 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Performing Backups and Restores
Storage Checkpoints is very fast (within a minute), and with the NetBackup queueing
delay for scheduling the backup jobs, the database down time is typically only a few
minutes.
total 2192
.cust.dbf::cdev:vxfs:
The preceding example shows that you must include both the symbolic link cust.dbf
and the hidden file .cust.dbf in the backup file list.
If you want to backup all Quick I/O files in a directory, you can simplify the process by
just specifying the directory to be backed up. In this case, both components of each Quick
I/O file is properly backed up. In general, you should specify directories to be backed up
unless you only want to back up some, but not all, files in those directories.
Restoring Backups
Restoring the backup images created by a BLI backup is no different than restoring the
backup images created using the default NetBackup configuration. Restoring to any of the
incremental backup images requires NetBackup to restore the last full backup image and
all the subsequent incremental backups until the specified incremental backup image is
restored. NetBackup does this automatically. The media that stored the last full and the
subsequent incrementals must be available, or the restore cannot proceed.
You can start the restores from the NetBackup client by using the Backup, Archive, and
Restore interface. To restore the latest copy of each file, select either the files or parent
directories with the latest backup date, and click Restore. For more information on
restoring, see the Backup, Archive, and Restore Getting Started Guide.
If the operation is to restore files from an incremental backup image, NetBackup issues
multiple restore operations beginning from the last full backup image and the subsequent
incremental backup images until the selected date. The activity of multiple restores is
logged in the Progress Log.
If you plan to restore files backed up by another client or to direct a restore to another
client, start the restore from the NetBackup server using the Backup, Archive, and Restore
interface. Before initiating a restore, a backup must have successfully completed or an
error occurs during the execution.
For Solaris, the restore destination can be a VxFS or UFS file system. The destination file
system does not need to support the Storage Checkpoint feature, but to be able to perform
BLI backups of the restored data, a VxFS file system with the Storage Checkpoint feature
is required.
For HP-UX, the restore destination can be a VxFS or HFS file system. The destination file
system does not need to support the Storage Checkpoint feature to restore files, however,
a VxFS file system with the Storage Checkpoint feature is required to perform BLI
backups of the restored data.
For AIX, the restore destination can be a VxFS or JFS file system. The destination file
system does not need to support the Storage Checkpoint feature to restore files, however,
a VxFS file system with the Storage Checkpoint feature is required to perform BLI
backups of the restored data.
Note that restoring a file causes all blocks in that file to be rewritten. Thus, all the blocks in
the file are considered to have been modified. This means that the first subsequent
differential incremental backup and all subsequent cumulative incremental backups will
back up all of the blocks in the restored file. If you are restoring an entire database and/or
file system, note that the first subsequent backup backs up all blocks that are restored.
To restore a Quick I/O file, if both the symbolic link and the hidden file already exist,
NetBackup restores both components from the backup image. If either one of the two
components is missing, or both components are missing, NetBackup creates or overwrites
as needed.
Oracle database recovery might be necessary after restoring the files. See the Oracle
documentation for more information on doing database recovery.
226 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting
Troubleshooting
This section provides tips on troubleshooting common issues with script-based BLI
backups. The section includes the following topics:
◆ Checking Logs
◆ Troubleshooting Backup or Restore Errors
◆ Improving NetBackup Backup Performance
◆ Database Recovery
Checking Logs
NetBackup provides logs on the database backup and restore operations. These logs are
useful for finding problems associated with those operations.
For more information on debug logs, see the NetBackup Troubleshooting Guide for UNIX and
Windows or see the /usr/openv/netbackup/logs/README.debug file.
NetBackup Reports
In addition to logs, NetBackup provides a set of reports that help isolate problems. One
report is All Log Entries on the server. For a description of this and other reports, see
the NetBackup System Administrator’s Guide, Volume I.
◆ If the backup or restore started successfully, but eventually failed, one of the following
could be the cause:
◆ Server/Client communication problem
◆ Schedule error
◆ Media-related error
◆ VxFS errors
For more information, see the NetBackup Troubleshooting Guide for UNIX and Windows.
◆ There can be insufficient disk space for the VxFS Fulldata Storage Checkpoints to keep
track of changed block information. Check the All Log Entries report for errors.
If there is a file system out-of-space condition, increase the size of the file system so it
is large enough for Fulldata Storage Checkpoints or use the Nodata Storage
Checkpoint Hot backup method. This error does not affect the integrity of the backup
images because a full backup of the affected file system will occur after the condition
is fixed.
228 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting
◆ If an incremental backup is intended, but the whole file system is backed up instead,
one of the following conditions might be present:
◆ Storage Checkpoints that keep track of changes have been removed
◆ The Block level incremental attribute is not selected
◆ Other errors with a nonzero status code
The most common cause of this problem is the Storage Checkpoint that keeps track of
the block changes was removed by the file system. This might happen if the file
system runs out of space, and there are no volumes available to allocate to the file
system. This does not affect the integrity of the backup images because a full backup
of the file system will occur at the next backup opportunity after NetBackup detects
that a Storage Checkpoint is missing.
Status Codes
◆ Status Code 9. An extension package is needed but was not installed.
The client does not have the NetBackup binaries required to do BLI backups. Use
update_clients on the server to push out new binaries. Also, use vxlicense -p
to verify that the Storage Checkpoint feature [83] and the VERITAS Storage
Foundation for Oracle [100] are installed.
◆ Status Code 69. Invalid file list specification.
Look for a message such as the following in the error log on the server:
FTL - /oradata is not in a VxFS file system. A block incremental
backup of it is not possible.
This indicates that there was an attempt to back up a file system that is not a VxFS file
system with the Block level incremental attribute. This error can also occur if the file
system is not mounted.
◆ Status Code 74. Client timed out waiting for bpstart_notify to complete.
Check the BPSTART_TIMEOUT setting on the NetBackup server. The
BPSTART_TIMEOUT specified did not allow enough time for the script to complete.
The shutdown database operation might be taking too long, or the script might be
◆ Status Code 75. Client timed out waiting for bpend_notify to complete.
Check the BPEND_TIMEOUT setting on the NetBackup server. The BPEND_TIMEOUT
specified did not allow enough time for the script to complete. The restart database
operation might be taking too long, or the script might be waiting for other streams to
call the bpend_notify script. Check the bpend_notify_output.ORACLE_SID
file and the post_checkpoint_notify_output.ORACLE_SID file in the
/usr/openv/netbackup/bin/BLOCK_INCR directory. Make sure that the policies
and schedules are configured with appropriate multiplexing factors and that the
required storage units that can allow all streams to be started at the same time are
configured. Verify that all needed tape drives are working and available during
backup.
◆ Status Code 77. Execution of the specified system command returned a non-zero
status code.
Check the post_checkpoint_notify_output.KEYWORD file in the
/usr/openv/netbackup/bin/BLOCK_INCR directory for the possible cause. The
post_checkpoint_notify script exited with a nonzero status code.
230 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Troubleshooting
If the database is not running with a high transaction volume, troubleshoot NetBackup. If
the incremental backup takes a long time to finish, it could mean that there are more
changed blocks since the last incremental backup. Verify whether the size of the
incremental backup image has increased, and consider increasing the frequency of
incremental backups.
Finally, you can improve the speed at which backup is performed by using multiplexed
backups. Assigning multiple policies to the same backup device is helpful when devices
are not writing at their maximum capacity.
Database Recovery
A BLI backup does not perform automatic database recovery. This process includes
restoring the database files from NetBackup images and applying the Oracle redo log files
to the database files. Follow the Oracle documentation to perform database recovery after
a restore.
232 NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
Index
.xml 124
Application Backup schedule
.xsc 124
backup window 74
/Oracle/XMLArchive 132
configuring 73
A
overview 73, 76
accessibility features xv
retention 74
Advanced Client
archive 5, 12
attributes
instant recovery
automatic backup
overview 149
schedule
offhost backup
configuration 160
configuring 74
overview 149
overview 149
schedule
snapshot backup
configuration 160
schedule
overview 149
overview 76
overview 75, 76
API
automatic
233
errors 228
bphdb 182, 183
performing 224
bphdb log
adding selections 81
browsing for backups 112
overview 81
browsing for XML export archives 132
manual 101
bplist log
BFILE_DIRECTORY 138
verbose mode 183
BLI Backup
bporaexp64 126, 183
restores 225
bporaimp 6, 14, 131, 183
BLI no RMAN
performing a restore 136
mailid 213
bpstart_notify 220, 224
requirements 210
bpstart_notify.oracle_bli 219
schedules 209
bptm log
workload 230
bpubsoraarc 183
Advanced Client
check_coverage 215
boraexp64 183
client list 33
boraimp64 183
bp.conf 87
CLIENT_NAME 87
administrator 198
CLIENT_READ_TIMEOUT 88
BPBACKUP 87
BPBACKUP_POLICY 87
command
BPBACKUP_SCHED 87
bplist 112
bpbrm log
bporaexp 124
commands
bpcd 183
allocate channel 10
bpdbm daemon 36
bpdbm log
bpdbsbora
bporexp64 126
change 106
BPEND_TIMEOUT 230
234
NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
copy 105
RMAN script 92
crosscheck 104
examples
get_license_key 31, 39
execution log 186
initbpdbm 36
F
install_dbext 35, 40
failed operation
list 107
file system
report 107
growing 229
UNCOVERED 214
restore 105
rman
set duplex 94
get_license_key command 31, 39
switch 105
H
update_dbclients 29, 33, 37
HELP 127, 139
COMMIT 138
hot backup 219
compatibility information 27
configuration
I
Media Manager 28
INIT.ORA 221
CONSISTENT 126
initbpdbm command 36
install_dbext 17
installation 28
local 38
description 184
prerequisites 27
in /usr/openv/netbackup/logs 184
prerequisites in a cluster 29
directory
instant recovery, see Advanced Client
debug log 184
E jbpSA 134
environmental variable
K
user-directed backup 111
KEYWORD 127, 131, 140
example
libbpora.so.9.0 183
bplist 112
libbpora64.so.8.0 183
Index 235
libbpora64.so.9.0 183
Intelligent Agent 219
license keys 16
Oracle Recovery Manager
LIST 141
example RMAN script 92
P
LOG 127, 141
log files
parms operand 86
accessing 185
PARTITIONS 128
enabling 184
platform compatibility 27
logs
policy configuration
adding clients 80
M adding new 71
Media Manager
overview 71
multiplexing
POLICY_IN_CONTROL 220, 222
overview 2
post_checkpoint_notify 220, 230
bpdbm 36
N
log files for NetBackup processes 185
NAS_Snapshot 167
R
NB_ORA_SCHED 86, 126, 127
Recovery Wizard
NB_ORA_SERV 86, 126, 127, 131, 137, 141
NetBackup
reports
Oracle
to a different client 118, 144
236
NetBackup for Oracle System Administrator’s Guide for UNIX and Linux
restore errors 228
SnapVault 168
RESTORE_SCHEMA_ONLY 141
Storage Checkpoint 171
RESTORE_TO_DIRECTORY 141
backup 219
restores
removing 229
T
retention period
templates
administration 122
RMAN script
example 92
overview 3
XML export 95
schedule
timeout failures, minimizing 197
schedules
transaction logs
adding 73
see archive logs
frequency 77
troubleshooting logs 184
properties 77
U
properties for Advanced Client 178
retention 78
Unicode 4
types of schedules 73
update_clients 229
scripts
bpend_notify 230
bpstart_notify.oracle_bli 219
check_coverage 215
UTF-8 4
install 31, 39
V
notify 224
VERBOSE 88
RMAN 8, 10
Verifying installation 182
XML export 95
VIEWS 130
SERVER 88
VxFS_Checkpoint snapshot 167
setup_bli_scripts
vxvm snapshot 167
contents of 220
W
sample of 222
Windows interface 69
224
use with Advanced Client 178
224
X
skipped clients 34
XML 3, 4
Index 237
238
NetBackup for Oracle System Administrator’s Guide for UNIX and Linux