NetBackup AdminGuide Oracle Win
NetBackup AdminGuide Oracle Win
0
for Oracle
N152628
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.
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Restores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Oracle Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
iii
Chapter 2. NetBackup for Oracle QuickStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
NetBackup Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Cluster Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Chapter 4. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Description of Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Adding Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Schedule Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Adding Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Creating RMAN Templates Using the NetBackup for Oracle RMAN Template
Generation Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Creating XML Export Templates Using the NetBackup for Oracle Wizard . . . 53
Performing a Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Running RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Browsing Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Contents
v
Using the RMAN Repository to Browse Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Performing a Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Using bpdbsbora . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Running the NetBackup for Oracle Recovery Shell Script on the Client . . . . . . . . 74
Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Running the NetBackup for Oracle XML Export Script on the Client . . . . . . . . 80
Using bpdbsbora . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
How Does NetBackup for Oracle with Advanced Client Work? . . . . . . . . . . . . . . . . . 111
Multistreaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Examples: Using Multiple Channels in RMAN Scripts with Proxy Backups . . . . 115
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Contents vii
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
Contents
ix
x NetBackup for Oracle System Administrator’s Guide for Windows
Preface
This guide describes how to install, configure, and use NetBackup for Oracle on a
Windows platform. 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.
xi
Getting Help
◆ Contact the VERITAS Technical Support staff and post questions to them
◆ Get the latest patches, upgrades, and utilities
◆ View the NetBackup for Oracle Frequently Asked Questions (FAQ) page
◆ Search the knowledge base for answers to technical support questions
◆ Receive automatic notice of product updates
◆ Find out about NetBackup for Oracle training
◆ Read current white papers related to NetBackup for Oracle
From http://support.veritas.com, you can complete various tasks to obtain specific types
of support for NetBackup for Oracle:
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.
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
◆ Select a product and a platform
◆ Provide additional contact and product information, and your message
◆ Associate your message with an existing technical support case
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 xiii
Comment on the Documentation
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.
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 Features
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.
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
Chapter 1, Introduction 5
NetBackup for Oracle Terminology
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.
Restores
OS
Directory
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.
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.
Chapter 1, Introduction 7
NetBackup for Oracle Terminology
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.
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 Backup and
Recovery Guide.
rman command The rman command starts an RMAN backup or restore. This
command is described in the Oracle 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
install_path\NetBackup\dbext\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.
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.
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.
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.
◆ “Configuration” on page 29
15
2. In the NetBackup Administration Console on the master server, click Help > License
Keys.
This procedure shows how to invoke the Windows interface on a Windows master server.
For information on invoking the Java interface on a Windows master server, see the
NetBackup System Administration Guide for Windows, Volume I.
2. Start the NetBackup Administration Console by clicking Start > All Programs >
VERITAS NetBackup > NetBackup Administration Console.
NetBackup for Oracle policy. In most cases, you can accept the default entries.
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 18 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.
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.
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.
If this is not the case, this procedure fails.
3. Start the NetBackup Backup, Archive, and Restore interface on the NetBackup client
by clicking Start > All Programs > VERITAS NetBackup > Backup, Archive, and
Restore.
For the Host name, type the name of the client upon which the Oracle database and
NetBackup for Oracle reside. Type your user name and password in the other fields.
You can log in as a regular user. You do not have to log in as the administrator or as
the Oracle administrator.
After NetBackup accepts your login information, the NetBackup Administration
Console appears.
instance, go to step 8.
step 9.
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.
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.
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.
▼ To verify compatibility
3. From the Select Product list in the right pane, click NetBackup Enterprise Server.
23
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. This step also installs NetBackup for Oracle.
In addition, the install_path\NetBackup directory must exist on the client. On
Windows platforms, the NetBackup for Oracle software is installed along with the
server and client software. For installation information, see the NetBackup Installation
Guide.
❏ 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:
❏ Oracle vendor software must be installed and operational.
❏ One or more Oracle instances must exist.
❏ For all Oracle 8 releases, make sure you have stopped Oracle services. For more
information about when you need to perform this step, see your Oracle
documentation.
For information on installing Oracle and creating instances, see your Oracle
documentation.
Cluster Software
Verify the following requirements if you are enabling 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.
The NetBackup server installation procedure installs the NetBackup for Oracle
software along with the server and client software. After all other prerequisites are
met, you only need to register the license key for the agent on each NetBackup server
in order to enable the agent.
29
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.
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 31
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.
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 or XML export 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 or if you
are using Advanced Client features.
3. Specify the other properties for the schedule as explained in “Schedule Properties” on
page 37.
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 33
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.
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 35
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.
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 36.
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 37
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.
❖ 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 37.
▼ To manually remove references to backup images from the Oracle RMAN repository
Chapter 4, Configuration 39
Configuring Backup Policies
Adding Clients
The client list is the list of clients on which your NetBackup for Oracle templates 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
◆ The backup or XML export archive shell script(s) (unless you are using templates)
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:
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 41
Configuring Backup Policies
Caution Be sure to specify the correct template and shell script names in the Backup
Selections list to prevent an error or possibly a wrong operation. Make sure that
the template or shell 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 shell scripts that you want NetBackup to use.
a. In the Script: box, type the full path name of a shell script on the client.
For example:
C:\backup_scripts\db\cold_backup.cmd
c. Repeat step a and step b until all shell scripts are added.
6. Click OK.
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.
4. Specify the names of the shell scripts you want NetBackup to use.
Use one of the following methods:
◆ Type the full path name of the shell script on the client.
For example:
C:\backup_scripts\db\cold_backup.cmd
5. Click OK.
Chapter 4, Configuration 43
Configuring the Runtime Environment
The order of precedence for run-time 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.
Templates
With templates, NetBackup for Oracle on Windows 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 48.
Shell Scripts
Use the send command to specify NetBackup for Oracle environment variables for use
during a backup or restore.
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
Chapter 4, Configuration 45
Configuring the Runtime Environment
NB_ORA_CLIENT Specifies the name of the Oracle client. It is especially useful for
specifying a virtual client name in a cluster.
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.
NB_ORA_CLIENT Name of the NetBackup client that hosts the Oracle database.
Templates
The NetBackup for Oracle Backup Wizard creates backup templates. You can invoke this
wizard from the NetBackup Client graphical user interface. For more information, see
“Creating RMAN Templates Using the NetBackup for Oracle RMAN Template
Generation Wizard” on page 48.
The NetBackup for Oracle Backup Wizard does not support all of the RMAN commands
and options provided by Oracle. 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 RMAN and Windows 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, see “Creating RMAN Scripts Manually” on page 50.
NetBackup for Oracle also provides the bpdbsbora utility, which 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 it. The user can run the shell script or modify the
shell script further. For more information, see “Creating an RMAN Script From a
Template” on page 49.
Chapter 4, Configuration 47
Creating Templates and Shell Scripts
2. Select the Oracle objects (datafiles, tablespaces, archived redo logs) to back up.
Selecting the Oracle instance backs up the whole database using RMAN.
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:
◆ Target Database Logon Credentials
◆ Recovery Catalog Logon Credentials
4. After you complete the wizard, the Template Summary screen displays the summary
of the backup template.
You can 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.
-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 t
empl_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.
Chapter 4, Configuration 49
Creating Templates and Shell Scripts
When NetBackup for Oracle was initially installed, example scripts were written to the
following directory:
install_path\NetBackup\dbext\Oracle\samples\rman
hot_tablespace_backup.cmd
hot_database_backup.cmd
database_restore.cmd
cold_duplex_database_backup_full.cmd
cold_database_backup.cmd
1. Copy the example scripts to a different directory on your client. Oracle scripts can be
located anywhere on the client.
The following table explains some of the sample scripts provided with NetBackup for
Oracle.
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
two identical backup sets.
Chapter 4, Configuration 51
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.
❖ To start the NetBackup Backup, Archive, and Restore interface on the NetBackup
client, do the following:
From the Start menu, click VERITAS NetBackup > Backup, Archive, and Restore.
Click the Backup Files tab. If Oracle is installed, the Backup, Archive, and Restore
interface on the client displays an Oracle node in the left pane.
Expand the Oracle node in the left pane to view an Oracle instance hierarchy. Select a
node in the left pane to view details in the right pane.
If your current login does not have Oracle SYSDBA privileges, enter your Oracle database
login User name and Password with SYSDBA privileges to continue. Optionally, also
enter your Net service name (TNS alias).
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 display.
2. Expand the User list to the schema owners of the objects to be exported.
Chapter 4, Configuration 53
Creating Templates and Shell Scripts
4. From the Actions menu, choose Start Backup of Marked Files to start the wizard.
The NetBackup for Oracle XML Export Template Generation Wizard displays the
following screens for you to enter information about the export operation you want to
perform:
◆ Welcome
◆ Target Database Logon Credentials
◆ Configuration Options
◆ Archive Export Options
◆ NetBackup Archive Destination Options
If you need an explanation of any of the fields on the wizard screens, or more details,
click Help on the wizard screen.
5. After you complete the wizard, the Selection Summary screen displays the summary
of the XML export template.
You can 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.
-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:
install_path\NetBackup\dbext\Oracle\samples\bporaimp
bporaexp_help.param
bporaexp_partitions.param
bporaexp_table_to_files.param
bporaexp_tables.param
bporaexp_tables_rows.param
Chapter 4, Configuration 55
Creating Templates and Shell Scripts
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
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 run 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 running 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.
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 41.
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.
4. Click Startup.
8. Click OK.
Chapter 4, Configuration 57
Database User Authentication and Server-directed Backups
58
NetBackup for Oracle System Administrator’s Guide for Windows
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.
Chapter 4, Configuration 59
Testing Configuration Settings
61
Maintaining the RMAN Repository
crosscheck;
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.
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
The Select Template list shows the names and descriptions of the Oracle 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.
Rename Changes the name of the selected template. You must be a system
administrator 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.
-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:
install_path\NetBackup\dbext\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.
RMAN functionality executes as a service, so use the send operand to set up the runtime
environment. To start a backup using the rman command from the command prompt,
type the following:
rman target ‘internal/oracle@ORCL’ rcvcat ‘rman/rman@RCAT’
"N:\oracle\scripts\db_full_backup.rcv"
Browsing Backups
This section describes the following procedures for browsing backup images:
◆ Using the RMAN Repository to Browse Backups
◆ Using bplist to Browse Backups
\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
online help.
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 the NetBackup for Oracle Recovery Shell Script on the Client
◆ Running RMAN on the Client
◆ Redirecting a Restore to a Different Client
The NetBackup for Oracle Recovery Wizard saves a recovery template locally in a
user-specified location on the NetBackup client. Recovery templates are not stored on the
master server because recovery is always user directed, not scheduled. Typically, you run
the recovery template immediately and then delete it.
The recovery process sometimes requires passwords for Oracle database access and
system user accounts. Templates store encrypted passwords that are decrypted at
runtime.
Because recovery can be a complex process, it might be necessary to perform manual steps
as part of the operation. For more information, see your Oracle documentation.
❖ 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 Start menu, click Start >
All Programs > VERITAS NetBackup > Backup, Archive, and Restore.
a. On the File 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 Select for Restore 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 left pane of the Backup, Archive, and Restore interface, select the Oracle
instance.
2. In the right pane, select the database object(s) (datafiles, tablespaces) you want to
recover.
If you select the Oracle instance, the wizard recovers the entire database using
RMAN.
If you need an explanation of any of the fields on the wizard screens, or more details,
click Help on the wizard screen.
5. 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 H:\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.
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:
install_path\Netbackup\dbext\oracle\samples\rman\
cmdfile ‘H:\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.
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:
install_path\NetBackup\db\altnames\No.Restrictions
Or, to restrict clients to restore only from certain other clients, create the following file:
install_path\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.
For more information about redirected restores, see the NetBackup System Administrator’s
Guide, Volume I.
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.
2. Use the rman parms option to set the NB_ORA_CLIENT environment variable to the
source client.
3. 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.
4. Create and start an Oracle service for the previously set ORACLE_SID.
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
3. Create inittest.ora.
6. Make sure the destination database folder exists and has appropriate access
permissions.
The datafiles are restored to the folder path with the same name they had when they
were backed up.
8. Run rman.
rman rcvcat rman/rman@rcat
RMAN> @restore_database.rcv
parms="ENV=(NB_ORA_CLIENT=camel,NB_ORA_SERV=lion)";
restore
(database);
restore
controlfile to 'D:\orant805\database\ctl1TEST.ora';
◆ Running the NetBackup for Oracle XML Export Script on the Client
◆ Running bporaexp on the Client as an Oracle User
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 administrator or the
Rename Changes the name of the selected template. You must be the
-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:
N:\oracle\scripts\data_archiver_export.cmd
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:
install_path\NetBackup\dbext\oracle\samples\bporaexp\
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
Target
Parameter Required? Default Description Location
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.
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\test\test.xsd
Oracle:\XMLArchive\test\SCOTT\BONUS.xsd
Oracle:\XMLArchive\test\SCOTT\BONUS.xml
Oracle:\XMLArchive\test\SCOTT\DEPT.xsd
Oracle:\XMLArchive\test\SCOTT\DEPT.xml
Oracle:\XMLArchive\test\SCOTT\EMP.xsd
Oracle:\XMLArchive\test\SCOTT\EMP.xml
Oracle:\XMLArchive\test\SCOTT\SALGRADE.xsd
Oracle:\XMLArchive\test\SCOTT\SALGRADE.xml
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 online help.
❖ 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 Start menu,
click Start > All Programs > VERITAS NetBackup > Backup, Archive, and Restore.
a. On the File menu, select Specify NetBackup Machines and Policy Type.
b. On the Specify NetBackup Machines and Policy Type dialog box, click the
Clients/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.
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
◆ NetBackup Import Destination Options
If you need an explanation of any of the fields on the wizard screens, or more details,
click Help on the wizard screen.
When you have completed the wizard, the Selection Summary screen displays the
summary of the XML Import template.
You can choose to run the template immediately after the wizard finishes, save the
template locally, or both. For explanations of your choices, click Help.
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 H:\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:
install_path\NetBackup\dbext\oracle\samples\bporaimp\
❖ 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
Target
Parameter Required? Default Description Location
Target
Parameter Required? Default Description Location
Target
Parameter Required? Default Description Location
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.
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:
install_path\NetBackup\dbaltnames\No.Restrictions
Or, to restrict clients to restore only from certain other clients, create the following file:
install_path\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.
Client Configuration
The same user name (Windows 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 93.
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
◆ Windows user is ora on both jupiter and saturn
◆ Archive name is sales
install_path\NetBackup\db\altnames\saturn
NB_ORA_SERV = jupiter
NB_ORA_CLIENT = jupiter
USERID = orauser/orapasswd
◆ Failsafe Password
◆ Failsafe Database Resource Name
◆ Virtual Oracle Database Name
For more information on how to back up or restore Microsoft cluster server using
NetBackup, see the NetBackup System Administrator Guide for Windows, Volume I.
normal Shuts down the database and doesn’t allow new connections
after the command was issued. This command waits for the
connected users to disconnect before actually shutting down the
database.
transactional Shuts down the database only after all of the current transactions
have completed.
Because the offline resource operation shuts down the Oracle database service,
enter the following command to start the Oracle database service:
net start OracleService
2. Shut down and start up the database in mount state. This is necessary to perform
administrative tasks like backup and recovery. Use the svrmgrl or sqlplus utility
from Oracle. At the command line, type the following:
Shutdown option [normal, abort, immediate]
startup mount
Note When performing user directed backups, make sure you are on the node that owns
the shared drive where the Oracle database is installed.
3. Perform the backup or recovery according to the directions for “Running the
NetBackup for Oracle Recovery Shell Script on the Client” on page 74.
Note When performing user-directed client restores with different configuration options
of NetBackup failover media servers and a UNIX or Windows master server, refer to
the section “Managing Client Restores” in the NetBackup System Administrator’s
Guide for UNIX or for Windows.
4. Bring the Oracle database online with failsafe after the desired backup/restore is
complete to enable it to fail over between the configured cluster of nodes.
◆ If you are using the Failsafe Graphical User Interface, take the following actions:
◆ Select the resource in the Failsafe Graphical User Interface
◆ Choose to bring it offline
◆ If you are using the Failsafe command line (FSCMD), type the following
command:
105
Installation and Licensing Requirements
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. 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.
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
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 112.
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.
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.
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);
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.
◆ 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.
The snapshot method you can use depends on your hardware and software
environment. For information about the snapshot methods supported in your
environment, see the NetBackup Advanced Client System Administrator’s Guide or the
supported platforms matrix on the VERITAS technical support website.
You can configure only one snapshot method per policy. For example, if you want one
snapshot method for clients a, b, and c, and a different method for clients d, e, and f,
then create two policies for each group of clients, and select one method for each
policy.
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.
snapshot rollbacks.
In addition, the following considerations are relevant for NetBackup for Oracle restores:
4. Use the NetBackup for Oracle Recovery Wizard for the restore.
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.
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 scripts or templates.
◆ Automatic backup schedules control file-based snapshot backups of
Automatic Cumulative
the database objects.
Incremental Backup
Note For snapshot backups, specifying any of the Automatic backup
types results in 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 37 describes other schedule properties that are specific to
Oracle backups.
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 44.
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 44 contains instructions for configuring variables set by
NetBackup and variables set by a user.
NetBackup for Oracle installs sample scripts in the following location:
install_path\NetBackup\dbext\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.cmd. 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.cmd. 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.
129
General Troubleshooting Procedure
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:
◆ install_path\NetBackup\bin\bphdb.exe, 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.
◆ \Program Files\Common Files\VERITAS Shared\orasbt.dll, which
provides functions callable by RMAN.
2. For XML export and XML import, verify that the following binaries exist in
install_path\NetBackup\bin:
◆ bporaexp.exe
◆ bporaimp.exe
◆ bpora8.dll
◆ bpora9.dll
3. For the Backup, Archive, and Restore interface, verify that the following binaries exist
in install_path\NetBackup\bin:
◆ bpdbsbora.exe
◆ bpubsora.exe
◆ dbsbrman.dll
◆ nbbedsrman.dll
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 folders exist and that VERBOSE=5:
◆ On the client: bpdbsbora, bporaexp, bporaimp, dbclient, bphdb, bplist,
and bpcd.
◆ On the master server: bprd and bpdbm.
◆ On the host with the storage unit: bpbrm and bptm.
Note These logs can become very large, especially bpdbm. Ensure that enough free disk
space exists in the log folder disk partition.
Enabling Logging
▼ To enable the NetBackup for Oracle logs
install_path\NetBackup\logs\bpbkar32
install_path\NetBackup\logs\bphdb
install_path\NetBackup\logs\bprestore
install_path\NetBackup\logs\tar32
install_path\NetBackup\logs\dbclient
install_path\NetBackup\logs\bpdbsbora
install_path\NetBackup\logs\bporaexp
install_path\NetBackup\logs\bporaimp
For example:
cd install_path\NetBackup\logs
mkdir bphdb
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.
This log contains debugging information and execution status for the Oracle
NetBackup client processes linked to the library program 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 program that performs XML exports.
This log contains debugging information and execution status for the
bporaimp program that performs XML imports.
1. From the Windows Start menu, choose Programs > VERITAS NetBackup > Backup,
Archive, and Restore.
The Backup, Archive, and Restore interface displays.
Note Information from both settings is logged to the same file, mmddyy.log
5. Stop and start the Oracle database services. This is necessary for orasbt.dll to pick
up the new debug level.
When bporaexp and bporaimp are being used and the backup images are written to a
storage unit, these errors are also logged in the NetBackup debug logs in
install_path\NetBackup\logs\bporaexp and
install_path\NetBackup\logs\bporaimp.
When bporaexp and bporaimp are being used and the backup images are written to an
operating system directory, the file specified by the LOG= parameter is the only source of
error logging and tracing.
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:
rman target user/pwd[@TNS_alias] \
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, and trace file name,
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.
install_path\NetBackup\logs\dbclient\mmddyy.log 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 client environment.
4. RMAN issues read or write requests to the API, which then transfers data to or from
the NetBackup server.
A failure here is probably due to NetBackup media, network, or timeout errors.
The API waits for the server to complete its necessary actions (for example, it verifies
the backup image) and then exits.
An error can originate from either NetBackup or RMAN.
◆ 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.
When bporaexp and bporaimp are being used and the backup images are being
written to an operating system directory, these logs are the only source of error
logging and tracking.
▼ 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.
install_path\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 client environment 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.
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.
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.
143
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.
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.
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
For more information on restores and redirected restores, see “Performing a Restore” on
page 70.
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.
.xml 81
retention 34
.xsc 81
with Advanced Client 119
/Oracle/XMLArchive 88
archive 6, 12
ARCHIVE_DATE_FROM 87, 94
A
ARCHIVE_DATE_TO 87, 94
automatic archive 78
Advanced Client
automatic backup
schedule
instant recovery
overview 107
configuring 34
schedule
offhost backup
configuration 118
configuring 121
schedule
overview 107
overview 107
overview 36
snapshot backup
configuration 118
overview 35, 36
overview 107
B
policy configuration 119
backup
API
overview 41
backup window 34
BFILE_DIRECTORY 95
configuring 33
bp.conf
151
bpbrm log
report 65
bpcd 131
restore 63
bpdbm log
rman
bpdbsbora
execute scripts 77
description 130
send 51
bphdb log
switch 63
bplist 70
compatibility information 23
example 70
database user authentication 57
D
bporaimp 6, 14, 87, 131
performing a restore 93
bprd log
installation 24
bpsched
changing 57
debug logs
bptm log
description 132
in install_path\NetBackup\logs 132
browsing archives 86
C DIRECTORY 83, 95
command
DIRECTORY parameter 82
bplist 70
E
bporaexp 80
commands
environmental variable
allocate channel 10
user-directed backup 69
backup 10, 63
error checking 66
bplist 70, 88
example
bporaexp 5, 12, 82
bplist 70
bporaimp 14, 87
RMAN script 50
change 64
examples
copy 63
parameter files 56
crosscheck 62
scripts 56
crosscheck backupset 63
list 65
152
NetBackup for Oracle System Administrator’s Guide for Windows
F NB_ORA_POLICY 46, 82, 84
FROMUSER 87, 95
nbpem scheduling process 133
H
NetBackup Client service 57
HELP 83, 95
NetBackup mode 82
O
IGNORE_ROWS 96
errors 136
platform compatibility 23
prerequisites 23
OWNER 84
prerequisites in a cluster 25
platform compatibility 23
J
point in time rollback 123
Java interface 29
policy configuration
K adding clients 40
L attributes 32
LIST 97
for Advanced Client 119
LIST parameters 87
overview 31
LOG 84, 97
schedules 33
log files
testing 59
accessing 133
processes
mklogdir.bat 132
proxy copy 107
enabling 132
Q
troubleshooting with log files 132
QUERY 85
M R
manual archive 78
Recovery Wizard
manual backups 66, 78
use with Advanced Client 126
Media Manager
remote folder button 43
multiplexing
also see log files 132
overview 2
database operations 129
NAME 84, 97
restore 6, 13
Index 153
user-directed 92
templates
RESTORE_SCHEMA_ONLY 97
administration 79
RESTORE_TO_DIRECTORY 97
advantages over scripts 36
restores
button on Backup Selections tab 43
retention period
XML export 52
RMAN script
troubleshooting logs 132
example 50
U
robust logging 133
Unicode 5
ROW_BUFFER 85, 98
S user-directed archive 78
schedule
user-directed restore 92
schedules
UTF-8 5
adding 33
frequency 37
properties 37
VIEWS 86
retention 38
scripts
wizard
RMAN 8, 10
use with Advanced Client 126
XML export 53
XML 3, 5
send operand 69
XML export 6
starting 53
XML Import Wizard 90
154
NetBackup for Oracle System Administrator’s Guide for Windows