NetBackup7.7 AdminGuide Oracle
NetBackup7.7 AdminGuide Oracle
Release 7.7
Symantec NetBackup™ for Oracle Administrator's Guide
The software described in this book is furnished under a license agreement and may be used
only in accordance with the terms of the agreement.
PN:
Legal Notice
Copyright © 2015 Symantec Corporation. All rights reserved.
Symantec, the Symantec Logo, the Checkmark Logo, NetBackup, Veritas, and the Veritas
Logo are trademarks or registered trademarks of Symantec Corporation or its affiliates in
the U.S. and other countries. Other names may be trademarks of their respective owners.
The product described in this document is distributed under licenses restricting its use,
copying, distribution, and decompilation/reverse engineering. No part of this document
may be reproduced in any form by any means without prior written authorization of
Symantec Corporation and its licensors, if any.
THE DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT,
ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO
BE LEGALLY INVALID. SYMANTEC CORPORATION SHALL NOT BE LIABLE FOR INCIDENTAL
OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING,
PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED
IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE.
The Licensed Software and Documentation are deemed to be commercial computer software
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, "Rights in
Commercial Computer Software or Commercial Computer Software Documentation", as
applicable, and any successor regulations. Any use, modification, reproduction release,
performance, display or disclosure of the Licensed Software and Documentation by the U.S.
Government shall be solely in accordance with the terms of this Agreement.
Symantec Corporation
350 Ellis Street
Mountain View, CA 94043
http://www.symantec.com
Technical Support
Symantec Technical Support maintains support centers globally. Technical
Support’s primary role is to respond to specific queries about product features
and functionality. The Technical Support group also creates content for our online
Knowledge Base. The Technical Support group works collaboratively with the
other functional areas within Symantec to answer your questions in a timely
fashion. For example, the Technical Support group works with Product Engineering
and Symantec Security Response to provide alerting services and virus definition
updates.
Symantec’s support offerings include the following:
■ A range of support options that give you the flexibility to select the right
amount of service for any size organization
■ Telephone and/or Web-based support that provides rapid response and
up-to-the-minute information
■ Upgrade assurance that delivers software upgrades
■ Global support purchased on a regional business hours or 24 hours a day, 7
days a week basis
■ Premium service offerings that include Account Management Services
For information about Symantec’s support offerings, you can visit our website at
the following URL:
www.symantec.com/business/support/
All support services will be delivered in accordance with your support agreement
and the then-current enterprise technical support policy.
Customer service
Customer service information is available at the following URL:
www.symantec.com/business/support/
Customer Service is available to assist with non-technical questions, such as the
following types of issues:
■ Questions regarding product licensing or serialization
■ Product registration updates, such as address or name changes
■ General product information (features, language availability, local dealers)
■ Latest information about product updates and upgrades
■ Information about upgrade assurance and support contracts
■ Information about the Symantec Buying Programs
■ Advice about Symantec's technical support options
■ Nontechnical presales questions
■ Issues that are related to CD-ROMs, DVDs, or manuals
Support agreement resources
If you want to contact Symantec regarding an existing support agreement, please
contact the support agreement administration team for your region as follows:
NetBackup for Oracle XML export and XML import ........................... 279
NetBackup for Oracle XML export and import archiving
features ........................................................................ 280
XML export archive process ................................................... 280
Sequence of operation: XML export archive ............................... 282
XML import restore process ................................................... 284
Sequence of operation: XML import restore ............................... 285
About the environment variables set by a user in the XML export
parameter file ...................................................................... 286
About XML export templates and shell scripts ................................. 287
Creating XML export templates using the NetBackup for Oracle
wizard (UNIX) ................................................................ 287
Creating XML export templates using the NetBackup for Oracle
wizard (Windows) ........................................................... 289
Creating an XML export script from a template .......................... 290
Creating XML export scripts manually ...................................... 291
14 Contents
Network (TCP/IP)
NetBackup software:
– NetBackup master server
– NetBackup media server
Feature Description
Media and device All devices that the Media Manager supports are available to
management NetBackup for Oracle.
Introduction 17
NetBackup for Oracle features
Feature Description
This feature also lets you choose the times when these
operations can occur. For example, to prevent interference
with normal daytime operations, you can schedule your
database backups to occur only at night.
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 Oracle and All backups and restores run simultaneously and transparently
regular file system backup without any action from the NetBackup administrator. The
and restore operations database administrator can run database backup and restore
operations through NetBackup. An administrator or any other
authorized user can use NetBackup to run database backups
and restores.
Feature Description
You can create the instance groups that each contain a set of
instances that are registered with a common set of credentials.
A default instance group can be created for the newly
discovered instances that are then automatically registered
into this group.
Sharing the same storage You can share the same devices and media that are used for
units that are used for other backups or give Oracle exclusive use of certain devices
other file backups and media. NetBackup for Oracle can use the Media Manager,
disk, PureDisk storage units, etc.
Centralized and networked From the NetBackup master server, you can schedule database
backup operations backups or start them manually for any client or instance.
The Oracle databases can also reside on the hosts that are
different from the devices on which NetBackup stores the
backups.
Introduction 19
NetBackup for Oracle features
Feature Description
Graphical user interfaces NetBackup provides the following graphical user interfaces
for client users and administrators:
Templates The NetBackup for Oracle database wizards can create backup
and recovery templates for script- or template-based Oracle
policies. You can launch the backup wizard and the recovery
wizard from the Backup, Archive, and Restore (BAR) interface.
The wizards generate platform-independent templates
containing the configuration information that the software
uses when it performs backups and restores.
Oracle Guided Recovery Guided Recovery clones an Oracle database from a backup,
cloning and simplifies the process of creating a new database from
backups of an existing database. Guided Recovery uses an
Oracle cloning wizard that executes on the OpsCenter
graphical user interface.
Parallel backup and restore NetBackup for Oracle supports the parallel backup and restore
operations RMAN capabilities. For example, you can run more than one
tape device at a time for a single Oracle backup or restore.
This capability reduces the time necessary to complete the
operation.
Feature Description
Support for Replication Replication director can be used to create snapshots of the
Director Oracle database. The snapshots can then be replicated to other
NetApp disk arrays or backup the snapshot to a storage unit.
To use Replication Director, the Oracle database must exist
on a NetApp NAS disk array. Replication Director is not
supported on SAN storage at this time.
Term Definition
Full backup A full backup backs up all the blocks into the backup set, skipping only
data file 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.
Term Definition
Multilevel RMAN lets you create multilevel backups. RMAN can create multilevel
incremental incremental backup. A value of 0 or 1 denotes each incremental level.
backup
A level 0 incremental backup, which is the base for subsequent
incremental backups, copies all blocks containing data. You can create
a level 0 database backup as backup sets or image copies.
Differential In a differential level 1 backup, RMAN backs up all blocks that have
incremental changed since the most recent incremental backup at level 1
backup (cumulative or differential) or level 0. For example, in a differential
level 1 backup, RMAN determines which level 1 backup is the most
recent backup. RMAN backs up all blocks that have been modified
after that backup. If no level 1 is available, then RMAN copies all blocks
that have changed since the base level 0 backup.
■ When the process requires media to store backup data, RMAN issues a backup
request to start a user-directed backup.
■ The NetBackup media server connects to NetBackup for Oracle on the client.
NetBackup for Oracle on the client sends the database data to the NetBackup
media server which saves the data to secondary storage. A restore operation
works in essentially the same manner except that RMAN issues a restore
request. Then NetBackup retrieves the data from secondary storage and sends
it to NetBackup for Oracle on the client.
■ RMAN supports parallel operations, so that 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 same status appears in the output of the RMAN
command that is used to run the backup or restore. This status is the only
status that a database administrator must check to verify that a backup or
restore has been successful.
■ You can see the RMAN script and RMAN output in the details of the controlling
job (bphdb) in the Activity Monitor.
■ 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.
See “About linking Oracle RMAN with NetBackup for UNIX” on page 39.
When you use the RMAN backup command, each resulting backup set contains
at least one backup piece (data file, data file copy, control file, or archive log) from
the target database. You must give each backup piece a unique name using the
format operand. Several substitution variables are available to aid in generating
unique names. You can specify the format operand in the backup command.
NetBackup considers the backup piece name as the file being backed up, so this
name must be unique in the catalog.
For a backup, the following items apply:
■ The rman command starts the requested operation on the databases.
■ When the process requires media to store backup data, RMAN starts a
user-directed backup by issuing a backup request.
■ The NetBackup media server connects to NetBackup for Oracle on the client.
NetBackup for Oracle on the client sends the database data to the NetBackup
media server which saves the data to secondary storage. A restore operation
works in essentially the same manner except that RMAN issues a restore
request. Then NetBackup retrieves the data from secondary storage and sends
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 same status appears in the output of the RMAN
command that runs the backup or restore. This status 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.
rman command and 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 the system that NetBackup provides.
RMAN provides true incremental backups. An incremental backup backs up data
files and includes only the blocks that have been changed since the last incremental
backup. For more information on the backup and recovery process, see your Oracle
documentation.
Table 1-3 explains Oracle RMAN terms as they pertain to NetBackup.
Term Definition
backup set A backup set is a backup of one or more data files, control files, SPFILEs,
and archived redo log files. Each backup set consists of one or more binary
files called backup pieces. Backup pieces are written in a proprietary format
that only RMAN can create or restore.
instance An Oracle database instance consists of a System Global Area (SGA) and
the Oracle background processes. When Oracle starts a database, it
allocates an SGA and starts Oracle background processes. The SGA is
de-allocated when the instance shuts down.
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 that administrators perform
during these processes.
However, RMAN cannot directly manage the storage devices and media
that are 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. Also, RMAN can access NetBackup’s
automatic scheduling facilities and its graphical interfaces.
RMAN An RMAN recovery catalog or the database control file is a repository for
repository the information that RMAN uses and maintains. RMAN uses this
information to determine how to run requested backup and restore actions.
26 Introduction
About the Oracle recovery catalog
Term Definition
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.
Windows:
install_path\NetBackup\dbext\Oracle\samples\rman
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
These example scripts run RMAN commands and are fully commented to
explain the features that are used. You can review these examples and use
them as a starting point for developing backup, restore, and recovery
scripts.
Note: The Oracle database agent is installed as part of the NetBackup client
installation.
■ Click Instances to display the list of instances. The list includes the names
of instances that you have added and the instances that the Oracle
Discovery Service has discovered. The following is an example of the
screen that appears:
■ Click Instance Groups to create an instance group to which you can then
add instances with the same credentials.
Procedures are available about how to create an instance group.
See “Creating an Oracle instance group” on page 32.
3 Select one or more instances on the instance list. Use the Ctrl and Shift keys
as needed to select multiple instances.
4 Select Actions > Register. The following Register Instance panel appears.
6 The credentials are validated and a Validation Report dialog shows the results.
You can save the credentials even if the validation fails. Click OK to display
the Instances list again.
7 Verify that the Instances list shows the date-time when you registered the
instance. The instance is now available to select for an Oracle Intelligent
Policy.
8 Repeat for all other instances that you want registered individually or as part
of an instance group.
3 Enter the Instance Group Name in the text window, then fill in the
appropriate credentials, and click OK.
The newly created instance group name appears in the right pane.
Click Help for help entering the appropriate credentials. If necessary, contact
the Oracle database administrator for the correct set of credentials.
4 To assign individual instances to this instance group, click Instances in the
left pane to display the list of instances.
34 NetBackup for Oracle QuickStart
Creating an Oracle policy
5 Right-click the desired instance and select Register to display the following
Register Instance panel. You can use the Ctrl and Shift keys to select multiple
instances for registering.
6 Make sure Add to group and register using group crendentials is selected.
Use the Instance Group pulldown menu to select the instance group that you
want the instance to be added to, then click OK.
7 Repeat for each instance that you want included in the instance group.
8 You may want to make this instance group the default for all newly discovered
instances. If so, all newly discovered instances are automatically added to
this instance group. More information is available about auto-registering an
instance group.
See “Automatic Registration of an instance group” on page 67.
is created, modify the policy in the Policies utility to configure the options that
are not part of the wizard.
Use the following procedure to create a policy using the Policy Configuration
Wizard.
To create a policy with the Policy Configuration Wizard
1 In the NetBackup Administration Console, in the left pane, click NetBackup
Management.
2 In the right pane, click Create a Policy to begin the Policy Configuration
Wizard. The first panel of the Policy Configuration Wizard appears.
3 Select Oracle - Backup Oracle data on the panel, then click Next.
4 Follow the prompts. Click Help on any wizard panel for assistance while
running the wizard.
Use the following procedure to create a policy without using the Policy
Configuration Wizard.
To create a policy without the Policy Configuration Wizard
1 In the NetBackup Administration Console, in the left pane, expand
NetBackup Management > Policies.
2 On the Actions menu, click New > New Policy.
3 Type a unique name for the new policy in the Add a New Policy dialog box.
If necessary, clear the Use Policy Configuration Wizard check box, then click
OK.
The Attributes tab of the Add New Policy dialog box appears along with the
following set of tabs across the top of the panel:
36 NetBackup for Oracle QuickStart
Creating an Oracle policy
4 In the Policy Type pulldown menu, select Oracle. This action causes the tabs
across the top of the panel to change to the following:
5 The Add New Policy panels contain some default conditions and some
parameters that you must specify. The default values are the best values for
most configurations. However, you may need to customize the parameter
settings on one or more of the tabs.
The dialog contains the following set of tabbed pages:
■ Attributes tab. Default values are automatically selected on the Attributes
tab. More information is available about these attributes.
See the NetBackup Administrator’s Guide, Volume I.
■ Schedules tab. More information is available about this tab.
See the NetBackup Administrator’s Guide, Volume I.
■ Instances tab. On this page, select the instances and instance groups that
you want backed up for the policy. More information is available about
this tab.
See “Instances tab” on page 78.
■ Backup Selections tab. More information is available about the attributes
on this tab.
See “Backup Selections tab” on page 80.
■ Oracle tab. More information is available about the attributes on this tab.
See “Oracle tab” on page 81.
6 To protect the newly discovered instances, you may have to create the instance
group first, then set up a policy for the default instance group.
See “Automatic Registration of an instance group” on page 67.
Chapter 3
Installing NetBackup for
Oracle
This chapter includes the following topics:
cd $ORACLE_HOME/lib
2 Type the following ls(1) command to determine whether the Oracle library
exists:
ls -l libobk.*
3 (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.a exists.
For example:
mv libobk.a libobk.a.orig
ln -s /usr/openv/netbackup/bin/libobk.a64 libobk.a
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can roll back what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls(1) command to determine whether the Oracle library
exists:
ls -l libobk.so
3 (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so.
For example:
mv libobk.so libobk.so.orig
ln -s /usr/openv/netbackup/bin/libobk.so libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can roll back what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls(1) command to determine whether the Oracle library
exists:
ls -l libobk.so
44 Installing NetBackup for Oracle
About linking Oracle RMAN with NetBackup for UNIX
3 (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
ln -s /usr/openv/netbackup/bin/libobk.so64 libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can roll back what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls(1) command to determine whether the Oracle library
exists:
ls -l libobk.so
3 (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
Installing NetBackup for Oracle 45
About linking Oracle RMAN with NetBackup for UNIX
ln -s /usr/openv/netbackup/bin/libobk.so libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can roll back what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls(1) command to determine whether the Oracle library
exists:
ls -l libobk.so
3 Use the mv(1) command to move the Oracle library to an alternate location.
Perform this step if the output from step 2 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
ln -s /usr/openv/netbackup/bin/libobk.so.1 libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can roll back what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls(1) command to determine whether the Oracle library
exists:
ls -l libobk.so
3 (Conditional) Use the mv(1) command to move the Oracle library to an alternate
location.
Perform this step if the output from step 2 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
ln -s /usr/openv/netbackup/bin/libobk.so64.1 libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can roll back what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
Chapter 4
Oracle policy configuration
This chapter includes the following topics:
■ Configuring the logon account for the NetBackup Client Service for NetBackup
for Oracle
http://www.symantec.com/docs/TECH52446
Full Backup – Script-based Stream-based backup: The specified script in the Backup
policy Selections tab is executed. If the script is set up properly,
RMAN initiates a full stream based backup (full or
incremental level 0).
Note: The Application Backup schedule properties (For
example: storage and retention) are used.
Full Backup – Template Stream-based backup: The specified template in the Backup
based policy Selections tab is executed. Dynamically generates an RMAN
script that initiates an incremental level 0 backup.
Note: The Application Backup schedule properties (I.E.
storage, retention, etc.) are used.
Archived redo log backup – The policy dynamically generates an RMAN script on each
OIP Policy Only client for the instance(s) and or instance group(s) defined
in the Instances tab. The policy initiates a stream-based
archive redo log backup.
Note: The frequency is granular down to intervals of
minutes.
Configuring the Maximum jobs per client for NetBackup for Oracle
The following procedure shows how to set the Maximum jobs per client attribute.
To configure the maximum jobs per client
1 In the left pane of the NetBackup Administration Console, expand NetBackup
Management > Host Properties.
2 Select Master Server.
3 In the right pane, double-click the server icon.
4 Click Global Attributes.
5 Change the Maximum jobs per client value to 99.
The Maximum jobs per client specifies the maximum number of concurrent
backups that are allowed per client. The default is 1.
You can use the following formula to calculate a smaller value for the maximum
jobs per client setting:
Maximum jobs per client = number_of_streams X number_of_policies
Refer to the following definitions:
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 to back up two different
databases. These backup windows can overlap.
For Oracle backups and restores, the number of jobs is difficult to determine. This
difficulty exists because Oracle internally determines when and how many streams
to run in parallel to optimize performance.
Oracle policy configuration 57
Instance management for an Oracle Intelligent Policy
Note: Enter a large enough value for the Maximum jobs per client attribute to
meet the number of jobs that Oracle runs. You may need to experiment with
different values at your site.
You can click on one of the instances to select it for an operation. You can also
select multiple instances for an operation with the following exceptions:
■ You can select only one instance at a time to view properties.
■ You can register multiple instances simultaneously only if the OS type is the
same (UNIX or Windows).
The instances are listed with the following column information:
OS Type Specifies the operating system of the host. Valid values are
Windows and UNIX.
ORACLE_HOME The file path of the Oracle home directory where the instance
resides.
Instance Group Specifies the Oracle instance group name that this instance is part
of. This field is blank if the instance does not belong to an instance
group.
Registered Specifies the date and time when a user registered a set of
credentials for this instance. This field is blank if the instance has
not been given credentials.
Policies The names of the policies that the instance has been assigned to.
Note: If necessary, contact the Oracle database administrator for the correct set
of credentials. The DBA can also manually add the instance if the DBA is not
willing or allowed to share the credentials with the backup administrator. The
DBA can manually add the instance using the nboraadm command on the client.
4 Fill in the Instance Name, Host, and ORACLE_HOME parameters. Click Help
to display descriptions of these parameters. For example:
■ If the host name is correct but you cannot connect to the host because the
host is down, the following message appears:
The validation operation timed out waiting for a respond from
the client (46)
The error message includes the generated status code which appears in
parentheses at the end of the message. The following is an example of an
error pop-up window:
Click OK to save the credentials, or you can click Cancel and re-enter the
credentials. If you save the credentials that caused the error, the instance is
saved in the repository. You can edit the instance at a later time to correct
the validation issue.
Click OK in the Change Instance dialog box.
You have added the instance to the repository and registered the instance
with credentials.
3 Double-click the instance that you want to register. The Edit Instance dialog
box appears. For example, you can select ORAC13 to display the following:
5 In the Credential area, click Edit to display the Register Instance dialog box.
For example:
9 In the right pane of the Applications dialog, check the Registered column
to see that the instance is now registered.
10 Repeat for all other instances that you want registered.
5 On the Instance Group pulldown menu, select the desired instance group
(InstanceGroup1 in the example).
6 Click OK. A Validation Report dialog box appears that describes the validation
successes and failures.
4 (Conditional) Use the Override default Unix TNS_ADMIN path and or the
Override default Windows TNS_ADMIN path if you need to override the
default network administration directory on the client system. Enter the fully
qualified path for the correct operating system. You can automatically register
instances in Windows, UNIX, or a combination of both operating systems.
The following dialog box shows an example of this parameter:
Action Description
New instance To create a new instance, select Actions > New > Instance. A New Instance dialog
box appears. Enter the instance properties (instance name, host, ORACLE_HOME,
and credentials).
New instance Group To create a new instance group, select Actions > New > Instance Group. A New
Instance Group dialog box appears.
Properties To display instance or instance group properties, highlight the desired item. Then
select Actions > Properties. The Edit Instance appears where you change the instance
properties (instance name, host, ORACLE_HOME, override default TNS_admin path,
and credentials).
Register To register an instance, highlight the instance, then select Actions > Register. The
Register Instance dialog box appears. Change credentials for the selected item.
Delete To delete an instance or an instance group from the instances repository list, highlight
the item to be deleted, then select Actions > Delete.
You cannot delete an instance or an instance group that is part of a policy. First, use
the Instances tab to delete the instance from the policy. Then, in the instances
repository list, highlight the instance to be deleted, then select Actions > Delete.
Auto Registration To automatically register newly discovered instances as part of an instance group,
highlight Instances in the left pane, then select Actions > Auto Registration.
You can select Oracle instances and instance groups to be part of an Oracle backup
policy. An Oracle backup policy can be created for the default instance group to
ensure that all newly created instances are automatically protected. You can create
an OIP in the following ways:
■ The Policy Configuration Wizard of the NetBackup Administration Console:
The wizard guides you through the setup process by automatically choosing
the best values for most configurations.
■ The Oracle Policy utility on the NetBackup Administration Console: The Oracle
Policy utility is a set of five tabbed panels. The panels contain all the settings
and parameters that are needed to create or change an Oracle Intelligent Policy.
See “About using Templates and Oracle Intelligent Policy (OIP) with RAC”
on page 220.
3 Enter a unique name for the new policy on the Add a New Policy dialog box.
If necessary, clear the Use Policy Configuration Wizard check box because
you do not use the wizard in this procedure.
4 Click OK. The Attributes tab is displayed in the Add New Policy dialog box.
Oracle policy configuration 73
About Oracle Intelligent Policies (OIP)
5 In the Policy Type pulldown menu, select Oracle. This action causes the tabs
along the top of the display to change to a unique Oracle tab set. The tab set
consists of Attributes, Schedules, Instances, Backup Selections, and Oracle.
The Clients tab is removed. For example:
When the discovery service (nbdisco) polls the clients again, it discovers the
database as a new instance. Consequently, there is no way to associate the new
instance to the old instance.
This issue is not version-specific and can affect any valid Oracle upgrade patch,
such as:
■ Oracle 10 to version 11
■ Oracle 10 to version 12
■ Oracle 11 to version 12
For more information on valid Oracle upgrade paths, review the following
documentation on the Oracle Support website:
http://www.oracle.com/technetwork/database/upgrade/
upgrading-oracle-database-wp-12c-1896123.pdf
Therefore, when an existing Oracle database is upgraded and the ORACLE_HOME,
ORACLE_SID, or Oracle User are modified, remove the existing instance in the
instance repository. After the existing instance is removed, update the instance
repository with the new instance information. Make sure to update any policies
with the newly-discovered instances.
See “About Oracle Intelligent Policies (OIP)” on page 69.
See “Instance management for an Oracle Intelligent Policy” on page 57.
Property Description
Type of backup Specifies the type of backup that this schedule can control. The selection list shows only
the backup types that apply to the policy you want to configure.
Schedule type You can schedule a backup in one of the following ways:
■ Frequency
This setting is used only for scheduled backups. It is not used 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, assume that the frequency is 7 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 lets you schedule the backup operations that are based on specific
dates, recurring week days, or recurring days of the month.
76 Oracle policy configuration
About Oracle Intelligent Policies (OIP)
Property Description
Retention Specifies a retention period to keep backup copies of files before they are deleted. The
retention period for an automatic schedule controls how long NetBackup keeps records
of when scheduled backups occurred. Set the time period to retain at least two full backups
of your database. In this way, if one full backup is lost, you have another full backup to
restore.
The type of schedule you select affects the retention period as follows:
■ Frequency-based scheduling
Set a retention period that is longer than the frequency setting for the schedule. For
example, if the frequency setting is set to one week, set the retention period to be at
least 2 weeks. The NetBackup scheduler compares the latest record of the automatic
backup schedule to the frequency of that automatic backup schedule. This comparison
is done to determine whether a backup is due. So if you set the retention period to
expire the record too early, the scheduled backup frequency is unpredictable. However,
if you set the retention period to be longer than necessary, the NetBackup catalog
accumulates unnecessary records.
Oracle is not notified when NetBackup expires a backup image. Use Oracle RMAN
repository maintenance commands to periodically delete expired backup sets from the
Oracle RMAN repository.
■ Calendar-based scheduling
The retention period setting is not significant for calendar-based scheduling.
Multiple copies If you want to specify multiple copies of a backup for the policy, configure Multiple copies
on the application backup schedule.
Property Description
Policy is a snapshot type If the policy is a snapshot type, the following are the possible scenarios of the retention
behavior:
■ If the schedule does not override the policy storage unit, and the policy storage
unit is a non-snapshot SLP, the SLP determines the retention period and the policy
uses the policy storage unit.
■ If the schedule does not override the policy storage unit and the policy storage
unit is not an SLP, the schedule determines the retention period, and the policy
uses the policy storage unit.
■ If the schedule does override the policy storage unit with an SLP, and it is not a
snapshot SLP, the override storage unit takes precedence over the policy storage
unit, and the SLP determines the retention period.
■ If the schedule overrides the policy storage unit with a snapshot SLP, the policy
storage unit must be a non-snapshot SLP. The SLP on the policy storage unit
determines the retention period for the streamed data. Also, the SLP on the
schedule determines the retention for the snapshot data.
Policy is not a snapshot type If the policy is not a snapshot type, the following are the possible scenarios of the
retention behavior:
■ If the schedule does not override the policy storage unit and the policy storage
unit is not an SLP, the schedule determines the retention period.
■ If the schedule does not override the policy storage unit and the policy storage
unit is an SLP, the SLP determines the retention period.
■ If the schedule overrides the policy storage unit, and the schedule storage unit is
not an SLP, the schedule determines the retention period.
■ If the schedule overrides the policy storage unit and the schedule storage unit is
an SLP, the SLP determines the retention period.
The following are examples of the Oracle Intelligent Policy storage and retention
behavior for snapshot-based policy types.
The following are examples of the Oracle Intelligent Policy storage and retention
behavior for stream-based policy types.
AdvancedDisk - Schedule
SLP - SLP
Instances tab
The Instances tab displays all the instances and instance groups that the Oracle
Intelligent Policy is scheduled to back up. Until you select items, the panel is blank.
To add an instance or an instance group to the list, click New. If you add a new
Oracle policy or change an existing Oracle policy, this tab appears along the top
of the dialog.
Oracle policy configuration 79
About Oracle Intelligent Policies (OIP)
Click the Instances tab to display the following categories of items. Note that any
existing backup selections and instance selections are erased when you select one
of these options.
■ Protect instances. All instances are displayed that you want to back up for
this policy. To delete all items in this list, click Delete. To add new instances
to this list, click New. A new panel appears that displays all registered instances
for selection.
If an instance does not appear in this panel because it is unregistered, you can
register that instance and add it to the policy later. You can select multiple
instances to add to the policy. Click the check boxes next to each instance that
you want backed up by the policy. This operation takes effect when you click
OK.
■ Protect instance groups. This panel displays all instance groups that you have
created. All instances that are a part of an instance group at backup time are
backed up. To add an instance group to the list of groups that are displayed
on this panel, click New. A new panel appears that displays all instance groups
for selection.
You can select multiple instance groups to add to the policy. Click the check
boxes next to each instance group that you want backed up by the policy. This
operation takes effect when you click OK.
To see what instances are backed up if the policy is run for a specified instance
group, highlight the group, then click Preview Instances. A panel appears
that shows a list of all the instances in the instance group.
■ Clients. If you want to select the clients that use scripts or templates as the
method of configuring an Oracle policy, select Clients for use with scripts or
templates. The tabs along the top of the dialog changes to be appropriate for
script- and template-based Oracle policies.
80 Oracle policy configuration
About Oracle Intelligent Policies (OIP)
Field Description
Instance Name The listing in the panel window depends on what selection is made
at the top of the window.
State The status of the instance. The following are possible values:
OS Type Specifies the operating system of the client host. Valid values are
Windows and UNIX.
ORACLE_HOME The file path of the Oracle home directory where the instance
resides.
Instance Group Specifies the Oracle instance group name that this instance is part
of. This field is blank if the instance does not belong to an instance
group.
Registered Specifies the date and time when a user gave the instance a set of
credentials.
Oracle tab
This tab contains options for tablespaces and data files, archived redo logs, and
file name formats.
Field Description
Field Description
Specify maximum Select Specify maximum limits to access several I/O and backup
limits set limits. The following parameters should only have to be
modified on rare occasions. If these values are not changed, the
backup uses the default values defined in RMAN. RMAN default
values usually provide the best performance.
Backup Identifier Backup set identifier: (TAG) specifies a user-specified tag name
Options for a backup set, proxy copy, data file copy, or control file copy.
The tag is applied to the output files that the backup generates.
Oracle policy configuration 83
About script- or template-based Oracle policies
Field Description
Archived Redo Log Select Include archived redo logs in full and incremental
Options schedules to include the archived redo logs in the full and the
incremental schedule backups.
Select Delete after making copies to delete the archived redo logs
after the selected number of backups are successful. Uncheck the
box or set to 0 to skip the delete operation and retain the logs after
backup.
User Specified Backup Select Specify backup file name formats to set up formats for
File Name Formats various backup file names for data files, archived redo logs, the
control file, and Fast Recovery Area (FRA).
Ensure that the format that is specified for all RMAN backup piece
names (except for auto-backups of the control file) ends with _%t.
NetBackup uses this timestamp as part of its search criteria for
catalog images. Without this timestamp, performance might
degrade as the NetBackup catalog grows.
12 When you have added all the schedules, clients, and backup selections you
need, click OK.
86 Oracle policy configuration
About script- or template-based Oracle policies
Table 4-7 Policy attribute descriptions for NetBackup for Oracle policies
Attribute Description
Policy type Determines the types of clients that can be backed up with the policy. For Oracle databases,
select the policy type Oracle.
Limit jobs per policy Sets the maximum number of instances that NetBackup can back up concurrently with this
policy.
Follow NFS This option is available for Oracle policies on UNIX. Select this attribute to back up the files
from NFS-mounted file systems. If this option is not selected, NetBackup cannot perform
a backup of NFS-mounted files.
Keyword phrase For NetBackup for Oracle, the Keyword phrase entry is ignored.
Snapshot Client and This group contains the options that enable backups with Snapshot Client and Replication
Replication Director Director.
Property Description
Type of backup Specifies the type of backup that this schedule can control. The selection list shows only
the backup types that apply to the policy you want to configure.
Schedule type You can schedule an automatic backup in one of the following ways:
■ Frequency
Frequency specifies the period of time that can elapse until the next backup operation
begins on this schedule. For example, assume that the frequency is 7 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
The Calendar option lets you schedule the backup operations that are based on specific
dates, recurring week days, or recurring days of the month.
Retention The retention period for an application backup schedule refers to the length of time that
NetBackup keeps backup images (stream-based backups). The retention period for an
automatic schedule controls how long NetBackup keeps records of when scheduled backups
occurred (proxy backups). For example, if your database is backed up once every Sunday
morning, you should select a retention period of at least 2 weeks.
The type of schedule you select affects the retention period as follows:
■ Frequency-based scheduling
Set a retention period that is longer than the frequency setting for the schedule. For
example, if the frequency setting is set to one week, set the retention period to be more
than one week. The NetBackup scheduler compares the latest record of the automatic
backup schedule to the frequency of that automatic backup schedule. This comparison
is done to determine whether a backup is due. So if you set the retention period to
expire the record too early, the scheduled backup frequency is unpredictable. However,
if you set the retention period to be longer than necessary, the NetBackup catalog
accumulates unnecessary records.
Oracle is not notified when NetBackup expires a backup image. Use Oracle RMAN
repository maintenance commands to periodically delete expired backup sets from the
Oracle RMAN repository.
Oracle XML export operations create archives for long-term storage and recovery. Set
the retention level to a period of years or to infinity.
■ Calendar-based scheduling
The retention period setting is not significant for calendar-based scheduling.
88 Oracle policy configuration
About script- or template-based Oracle policies
Property Description
Multiple copies If you want to specify multiple copies of a backup for the policy, configure Multiple copies
on the application backup schedule. If using Snapshot Client, also specify Multiple copies
on the automatic schedule.
Property Description
Policy is a snapshot type If the policy is a snapshot type, the following are the possible scenarios of the retention
behavior:
■ If a schedule has overridden the policy storage, the override storage on the
schedule takes precedence over the policy storage.
■ If the policy storage is a snapshot SLP, the application schedule must override
the policy storage. The storage that is specified on the application schedule may
not be a snapshot SLP.
■ If the storage being used is not an SLP, the schedule determines the retention for
the snapshot data.
■ If you use the policy storage unit as an SLP, the SLP determines the retention for
the snapshot data.
Policy is not a snapshot type If the policy is not a snapshot type, the following are the possible scenarios of the
retention behavior:
■ If the application schedule has overridden the policy storage, the override storage
on the schedule takes precedence over the policy storage.
■ If the storage being used is not an SLP, the retention is derived from the schedule.
■ If the storage being used is an SLP, the retention is derived from the SLP.
Since all data is streamed, the data is processed using the application schedule.
The following are examples of the script- or template-based policy storage and
retention behavior for snapshot-based policy types:
Oracle policy configuration 89
About script- or template-based Oracle policies
The following are examples of the script- or template-based policy storage and
retention behavior for stream-based policy types:
■ If this client is the last client you want to add, click OK.
Note: Be sure to specify the correct template name in the backup selections list
to prevent an error or a wrong operation.
92 Oracle policy configuration
About script- or template-based Oracle policies
Note: Be sure to specify the correct script name in the backup selections list to
prevent an error or a wrong operation.
To add a script to the backup selections list in the NetBackup Administration Console
1 Open the Policy dialog box.
To access the Policy dialog box, double-click the policy name in the Policies
list in the NetBackup Administration Console.
2 Click the Backup Selections tab.
3 Click New.
4 In the Script or Template box, type the full path name of a script on the client.
For example:
/backup_scripts/db/cold_backup.sh
C:\backup_scripts\db\cold_backup.cmd
Oracle policy configuration 93
About script- or template-based Oracle policies
Note: The Server name and Backup policy name that is configured within a backup
template are only used when initiated from the client.
If the backup is initiated from an automatic schedule on the master server the
operation is different. The backup uses the name of the master server and policy
that was used to initiate the template. This operation allows a template to be used
with multiple policies, with different automatic schedules, and even different
master servers.
environment from RMAN. Instead, the agent inherits the environment from which
the listener service was started
To avoid unexpected results, it is recommended to configure RMAN to always use
the send command to pass the desired variables and values to NetBackup explicitly.
Alternatively the RMAN ENV parameter can be used to make the variables and
values available to NetBackup.
Example 1. Use 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 {
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
send 'NB_ORA_POLICY=your_policy,NB_ORA_SERV=your_server';
backup (database format 'bk_%U_%t');
release channel t1;
release channel t2;
}
Example 2. Use the parms operand to specify the policy and server to use for a
database backup. The parms operand is set with each allocate channel command
in the shell script.
run {
allocate channel t1 DEVICE TYPE 'SBT_TAPE'
PARMS "SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so,
ENV=(NB_ORA_POLICY=your_policy,NB_ORA_SERV=your_server)";
allocate channel t2 DEVICE TYPE 'SBT_TAPE'
PARMS "SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so,
ENV=(NB_ORA_POLICY=your_policy,NB_ORA_SERV=your_server)";
backup (database format 'bk_%s_%p_%t');
release channel t1;
release channel t2;
}
Option Purpose
SEND 'BKUP_IMAGE_PERM=ANY';
Note: The BKUP_IMAGE_PERM option does not affect the
permissions for the physical files that are included in an
RMAN Proxy copy backup. Ensure the physical file owner,
group, and permissions are set correctly before the
backup.
http://www.symantec.com/docs/TECH213927
NB_ORA_COPY_NUMBER Specifies which copy of the backup image to use for the
restore.
Option Purpose
NB_ORA_POLICY Specifies the name of the policy to use for the Oracle
backup.
http://www.symantec.com/docs/TECH227741
Oracle policy configuration 99
About script- or template-based Oracle policies
Option Purpose
NB_ORA_DISK_MEDIA_SERVER Specifies which media server to use when more than one
has access to the image to be restored.
For more information, see the NetBackup System Administrator’s Guide, Volume
I.
Option Purpose
BPBACKUP_POLICY This option specifies the name of the policy to use for
the backup.
Option Purpose
For more information, see the NetBackup System Administrator’s Guide, Volume
I.
The following shows example bp.conf entries for an Oracle user:
SERVER=jupiter
CLIENT_READ_TIMEOUT=900
VERBOSE=1
3 Start the NetBackup Backup, Archive, and Restore interface on the NetBackup
client.
■ From the Windows Start menu, choose All Programs > Symantec
NetBackup > Backup, Archive, and Restore.
■ On UNIX, run the following command:
/usr/openv/java/jbpSA &
NetBackup for Oracle also provides a utility, bpdbsbora, that can generate a shell
script from a backup wizard template. A user can create a template with the wizard
and then generate a shell script from the template. The script should be reviewed
to make sure the TARGET_CONNECT_STR has the correct credentials before execution.
See “Creating an RMAN script from a template” on page 103.
Where:
-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.
104 Oracle policy configuration
About script- or template-based Oracle policies
-t templ_name.tpl Specifies the name of the template that you want to use as
the basis for the script. Make sure that 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 you specify the bpdbsbora command, it retrieves
backup templates from the specified master server.
Backup type RMAN supports the following different types of backups (In the
examples, n must be 1 or higher):
■ BACKUP FULL
■ BACKUPINCREMNTALLEVEL0 (Full backup base for incremental
backups)
■ BACKUP INCREMENTAL LEVEL n (Differential incremental
backup)
■ BACKUP INCREMENTAL LEVEL n CUMULATIVE (Cumulative
incremental backup)
When generating a data file backup set, you can make either an
incremental backup or a full backup. Both a full backup and an
incremental level 0 perform a complete backup of the data file.
However, an incremental level 0 backup can be used as the base for
incremental level n and or incremental level n cumulative backups.
■ Each output file must have a unique name. Use the %U format
specifier to satisfy this restriction. %U is equivalent to %u_%p_%c,
and it guarantees the uniqueness of the backup set name in all
circumstances.
■ Put %t at the end of the backup file name format. NetBackup uses
the timestamp as part of its search criteria for catalog images.
Without this timestamp, performance might degrade as the
NetBackup catalog grows.
■ Ensure that the format that is specified for all RMAN backup piece
names does not contain any space characters.
Oracle policy configuration 105
About script- or template-based Oracle policies
install_path\NetBackup\dbext\Oracle\samples\rman
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
pit_database_restore.cmd
hot_tablespace_backup.cmd
hot_database_backup.cmd
database_restore.cmd
cold_duplex_database_backup_full.cmd
cold_database_backup.cmd
UNIX:
pit_database_restore.sh
hot_tablespace_backup.sh
hot_database_backup.sh
database_restore.sh
cold_duplex_database_backup_full.sh
cold_database_backup.sh
Table 4-13 explains some of the sample scripts that are provided with NetBackup
for Oracle.
Script Purpose
Script Purpose
you issue the command. 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:
By default, duplex is OFF (a single backup set is produced). If you specify ON, it
produces two identical backup sets.
Note that you must enable the BACKUP_TAPE_IO_SLAVES initialization parameter
to perform duplexed backups. RMAN configures all media as needed for the number
of backup copies you request. For more information on BACKUP_TAPE_IO_SLAVES,
see your Oracle documentation.
Use the send command to specify the policy and schedule to use with each backup.
Because NetBackup uses the policy or schedule to determine what media to use,
this information is required for each copy, or an error occurs.
The command syntax is as follows:
The keywords that are used to specify a policy are CPF1_POLICY, CPF2_POLICY,
CPF3_POLICY, and CPF4_POLICY, which specify the backup policy for duplexed file
1 through duplexed file 4.
The keywords that are used to specify a schedule are CPF1_SCHED, CPF2_SCHED,
CPF3_SCHED, and CPF4_SCHED, which specify the Application Backup schedule for
duplexed file 1 through duplexed file 4.
the Oracle installation information that is stored in that template. Only valid
templates are run on each client.
The NetBackup for Oracle Recovery saves a template to a user-specified location
on the client. The location that is specified should include a fully qualified path
to a directory where the user has write access.
Templates store the encrypted passwords that are decrypted at run-time.
Note: In a cluster environment, perform the steps on each database node in the
cluster. For an off-host backup, perform the steps on the alternate client.
Oracle policy configuration 109
Testing configuration settings for NetBackup for Oracle
To configure the logon account for the NetBackup Client Service for NetBackup for
Oracle
1 Open the Windows Services application.
2 Double-click the NetBackup Client Service entry.
3 Click the Log On tab.
4 Type the account name with SYSDBA privileges.
5 Type the password.
6 Click OK.
7 Stop and start the NetBackup Client Service.
8 Close the Services control panel application.
6 Follow the directions in the Manual Backup dialog box. Then click OK.
7 To check the status of the backup, click Activity Monitor in the NetBackup
Administration Console.
The Activity Monitor and the script output indicate the status of the backup
operation.
Chapter 5
Performing backups and
restores of Oracle
This chapter includes the following topics:
You can either create a recovery catalog in which to store this information or let
RMAN store it exclusively in the target database control file. Although RMAN can
conduct all major backup and recovery operations using only the control file,
some RMAN commands function only when you use a recovery catalog.
Table 5-1 shows the tasks that are required to maintain the RMAN repository and
a subset of the repository maintenance commands that perform the tasks. Some
of these commands might not be available with all versions of RMAN.
Register a database with Before using RMAN with a recovery catalog, register the target database in the recovery
the recovery catalog catalog. To register, start and mount the target database but do not open it. At the RMAN
prompt, issue a register database command.
Reset the incarnation in The reset database command directs RMAN to create a new database incarnation
the recovery catalog record in the recovery catalog.
Performing backups and restores of Oracle 113
Maintaining the RMAN repository
Crosscheck the Because NetBackup can expire images independently from Oracle, the RMAN repository
information in the can contain outdated information. Run an RMAN crosscheck to ensure that data in the
RMAN repository recovery catalog or control file is in sync with data in the backup image catalog. The
crosscheck queries NetBackup for the existence of each backup piece and then marks it
as available or expired in the RMAN repository.
Use one of the following commands to check the specified files. You need to run separate
commands to delete images or repository records.
To crosscheck a database, start RMAN and connect to the target database and to the
recovery catalog (if used). At the rman command prompt, enter the following:
Delete obsolete backups The DELETE OBSOLETE command deletes the backups that are no longer needed to
satisfy specified recoverability requirements. You can delete obsolete pieces according
to the configured default retention policy, or another retention policy that a DELETE
OBSOLETE option specifies. As with other forms of the DELETE command, the deleted
files are removed from the backup media (i.e. expired from NetBackup). Then they are
deleted from the recovery catalog, and marked as DELETED in the control file.
If you specify the DELETE OBSOLETE command with no arguments, then RMAN deletes
all the obsolete backups that the currently configured retention policy defines. For
example:
You can also use the REDUNDANCY or RECOVERY WINDOW clauses with DELETE to delete
the backups that are obsolete under a specific retention policy instead of the configured
default:
Delete expired backups The delete expired backupset command operates only on the expired backup pieces
that are found in the recovery catalog. RMAN removes them from the recovery catalog
and also from the backup media (i.e. expires them from NetBackup).
To delete expired backup sets of a database from the recovery catalog, start RMAN and
connect to the target and the recovery catalog databases. At the RMAN command prompt,
type the following commands:
The crosscheck and delete backupset commands restrict the list of objects to only
those that are operated on. The restrictions are placed on the specified Oracle device type
(disk or SBT tape), object type (archived logs or database files), and date range.
Performing backups and restores of Oracle 115
Maintaining the RMAN repository
Resynchronize the RMAN compares the recovery catalog to either the current control file of the target
recovery catalog database or a backup control file. It subsequently updates the catalog with the missing
information or changed information.
If you are running in ARCHIVELOG mode, do the following: Resynchronize the recovery
catalog regularly because 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. The recovery catalog
database is available when one of these commands is 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.
Change the availability Periodically, you might need to notify RMAN that the status of a backup set, backup piece,
of a backup set or file data file copy, or archived redo log has changed. The RMAN change command enables
copy you to make a variety of useful record changes.
The change ... uncatalog command removes references to a backup piece, data file
copy, or archive log from the recovery catalog. This command works only with a recovery
catalog.
The change ... delete command removes references to a backup piece, data file
copy, or archive log from the control file and recovery catalog. It physically deletes the
file. This command works with or without a recovery catalog.
The change ... crosscheck command removes references to a backup piece, data
file copy, or archive log from the control file and recovery catalog. The references are
removed when that file no longer exists. This command works with or without a recovery
catalog.
The change ... unavailable command marks a backup piece, data file copy, or
archive log as unavailable. This command works only with a recovery catalog.
Validate the restore of A restore validation retrieves the backup pieces from storage (NetBackup) and checks
backups that the retrieved pieces are intact. But the restore validation discards the backup pieces
without saving the contents into the database.
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.
116 Performing backups and restores of Oracle
Querying the RMAN repository
Manual backups You can use the NetBackup server software to manually run an
automatic backup schedule for the Oracle policy. For more
information, see the NetBackup Administrator’s Guide, Volume
I.
Where:
Performing backups and restores of Oracle 119
About NetBackup for Oracle backups
-t templ_name.tpl Specifies the file 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 it is specified, the bpdbsbora command retrieves
backup templates from the specified master server.
For example:
install_path\oracle\scripts\db_full_backup.cmd
UNIX:
/oracle/scripts/db_full_backup.sh
The shell starts the database backup by running the Oracle shell script. The Oracle
shell script contains commands to run rman.
The NetBackup installation script installs sample scripts in the following location:
Windows:
install_path\NetBackup\dbext\oracle\samples\rman
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
120 Performing backups and restores of Oracle
Browsing backups using the bplist command
Running RMAN
As an Oracle user, you can run the rman command from the command prompt
with the RMAN command file as a parameter. This topic describes how to set the
master server to hag and the Oracle policy to obk before you start the backup.
On Windows, RMAN functionality runs as a service, so use the send operand to
set up the run-time environment. To start a backup using the rman command from
the command prompt, type the following:
If you intend to connect to a database using a TNS alias, the RMAN send command
specifies the environment variables. The example sets the master server to hag
and the Oracle policy to obk before you start the backup.
See “About the bp.conf file on UNIX systems” on page 99.
Note: To run script files for database operations other than backups or restores,
Symantec recommends that you run the rman command directly rather than using
NetBackup.
For rman command script syntax and examples, see your Oracle documentation.
# bplist -C jupiter -t 4 -R /
/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 the bplist command, see the NetBackup Commands
Reference Guide.
You can also use the RMAN report and list commands to browse Oracle backups.
See “Querying the RMAN repository” on page 116.
/usr/openv/netbackup/bin/jbpSA &
4 Expand the Oracle node in the left pane to view an Oracle instance hierarchy.
5 Select a node in the left pane to view details in the right pane.
Enter information about the recovery operation you want to perform in the
screens that the NetBackup for Oracle recovery wizard displays.
The screens are as follows:
■ Welcome
■ Target Database Logon Credentials
■ Recovery Catalog Logon Credentials
■ Recovery Options
■ Restore Options
■ Recover Limits
■ Database State
If you need an explanation of any of the fields on the wizard screens, click
Help on the wizard screen.
6 When you have completed the wizard, the Selection Summary screen displays
the summary of the recovery template. Review this summary. You can choose
to run the template immediately after the wizard finishes or save the template
locally, or both.
If you need an explanation of any of the fields on the wizard panels, click
Help on the wizard panel.
7 Click Finish to run, to save, or to run and save the recovery template.
where:
-t templ_name.tpl Specifies the full-path name of the template file that you want
to use.
For example:
For Windows:
For UNIX:
install_path\oracle\scripts\database_restore.cmd
UNIX:
/oracle/scripts/database_restore.sh
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 installation script writes sample scripts to the following location:
Windows:
install_path\Netbackup\dbext\oracle\samples\rman\
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
Performing backups and restores of Oracle 127
About NetBackup for Oracle restores
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. Any user who belongs to the database group that performed
the backup can restore it, unless the BKUP_IMAGE_PERM variable is set to USER.
128 Performing backups and restores of Oracle
About NetBackup for Oracle restores
install_path\NetBackup\db\altnames\No.Restrictions
UNIX:
/usr/openv/netbackup/db/altnames/No.Restrictions
To allow clients to restore only from specific clients, create the following file on
the NetBackup master server:
Windows:
install_path\NetBackup\db\altnames\client_name
UNIX:
/usr/openv/netbackup/db/altnames/client_name
Where client_name is the name of the client that is allowed to perform the
redirected restore (the destination client). To the file, add the name of the
NetBackup for Oracle source client.
Note: If the RMAN catalog database has been lost, restore the catalog database
first before continuing with the redirected restore.
Performing backups and restores of Oracle 129
About NetBackup for Oracle restores
3 On UNIX, check the bp.conf files on the source client. Make sure that the
CLIENT_NAME variable either is not set or is set to the host name of the source
client.
4 Make the init.ora file of the source client available to the destination client.
Copy the file to the destination client or modify the file on the destination
client. Change all location-specific parameters.
5 Create a folder or set the permissions for a directory to restore the data files:
■ On Windows, create and start an Oracle service for the previously set
ORACLE_SID. Create the folder to which you want to restore the data files.
■ The user is connected to the Oracle database using a local connection, not
SQL*Net
■ UNIX user is ora on both camel and giraffe
To perform a redirected restore (example)
1 Create the following file on server lion:
Windows: install_path\NetBackup\db\altnames\giraffe
UNIX: /usr/openv/netbackup/db/altnames/giraffe
Edit giraffe to contain the name camel:
2 Do one of the following:
■ Windows: Use the BAR GUI to set lion as the master server.
■ UNIX: Log onto giraffe as ora. Set SERVER=lion in $ORACLE_HOME/bp.conf.
This server must be the first server that is listed in the bp.conf file.
3 Modify the network tnsnames.ora file to enable the RMAN catalog connection.
4 Create inittest.ora.file.
5 Windows: Using Oracle administration, create and start ORACLESERVICETEST.
6 Set the environment variable ORACLE_SID to test. On UNIX, also set
NB_ORA_CLIENT to camel.
Performing backups and restores of Oracle 131
Using NetBackup for Oracle in a Microsoft Windows cluster environment
7 Make sure that the destination database directory exists and has appropriate
access permissions.
The data files are restored to the directory path with the same name they had
when they were backed up.
8 Start the database in a nomount state.
On UNIX, the following is the output:
Now apply the archived logs. Type cancel when you decide to stop recovery.
NetBackup for Oracle users in a Microsoft Cluster environment must take some
additional steps to prepare for server-directed backups, user-directed backups,
and user-directed restores.
install_path\NetBackup\dbext\oracle\samples\rman\
To take the database instance offline with Failsafe graphical user interface
1 Select the Oracle database resource in the Failsafe graphical user interface.
2 Choose to bring it offline.
To take the database instance offline with Failsafe command line (FSCMD), type
the following command:
■ fscmd offlineresource salesdb /cluster=curly /offline=immediate
/domain=domainname /user=user /pwd=pwd
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 the database is shut down.
transactional Shuts down the database only after all of the current transactions
have completed.
Because the offlineresource operation shuts down the Oracle database service,
enter the following command to start the Oracle database service:
Note: When performing user-directed backups, make sure that you are on the
node that owns the shared drive where the Oracle database is installed.
■ OpsCenter retrieves information for you such as databases and control files,
shortening the Oracle clone setup time.
■ A validation process increases the rate of successfully completing the cloning
operation.
■ You do not need access to the original database to perform the cloning
operation.
ORACLE_METADATA=YES
Then send this configuration to the client host by using the following
bpsetconfig command:
ORACLE_METADATA=YES
■ Set up all destination file paths before you run the cloning operation because
the operation does not create new file paths during the process. Ensure that
the Oracle user has write access to these paths.
■ On UNIX and Linux systems, shut down the source database before you clone
in the following situation: You clone to the same system and you either use
the same user or use the same home as the source database.
7 The Destination Host and Login screen contains parameters for the
destination of the clone to be created. Enter the destination host name in the
text box that is provided or click Browse and select from a list of available
hosts. Note the following prerequisites concerning the destination host:
■ The platform type of the source and destination must be the same.
■ A NetBackup client must be installed.
■ A compatible version of Oracle must be installed.
See “Destination host and login panel” on page 141.
For operating system authentication, enter a user name, password (Windows),
and domain (Windows). Then click Next>.
8 The Define Destination Parameters screen appears. The five tabs on this
screen are used to change database attributes, the destination paths of control
files, data files, redo logs, and restore options. After you have changed the
destination parameters, click Next>.
See “Destination Parameters panel” on page 141.
9 The SelectionSummary screen lets you scan the information you have entered
on the previous screens. Links to the recovery sets and destination database
attributes let you view and verify any changes you have made. When you are
satisfied with the summary information, click Next>.
See “Selection summary panel” on page 142.
10 The Pre-clone Check screen lets you validate the database attributes and the
file paths. To validate, click the underlined word here. If a directory path
does not already exist, the validation check flags the error. If a file already
exists, the validation check also flags the error, so that the cloning operation
does not overwrite the file.
See “Pre-clone check panel” on page 143.
When you are ready to launch the cloning operation, click Launch Cloning
Process. A display appears that is similar to the NetBackup Activity Monitor.
Note: In NetBackup (7.1 or greater), validation of the data files that reside in raw
devices may fail even though the Clone operation was successful. You may receive
an error that states the validation for specific paths failed.
140 Guided Recovery
Select a Master Server dialog
■ View Database Schema shows the schema of the selected control file. It shows
how the database is laid out by listing each data file name, tablespace name,
and its size.
■ View Datafiles Recovery Set shows the data file backups to be used for the
restore process. It also shows the backup and image information that is
displayed for each data file. The data file recovery set is generated only for
the files that are backed up as part of an incremental strategy. Even though
files that are backed up as part of a full backup do not appear in this list, the
clone still completes successfully.
If the image spans media, only the first media is shown in the list.
■ View Archived Log Recovery Set shows the archive log backups that may be
used to recover the database to the latest point in time of that control file. This
set is generated only for the files that are backed up as part of an incremental
strategy. Even though files that are backed up as part of a full backup do not
appear in this list, the clone still completes successfully.
Note: The Windows information you enter on this screen is case-sensitive. Be sure
to enter the Windows information appropriately.
■ Database Attributes. This pane appears when you first enter the Database
Attributes screen. Each attribute name has identical source and destination
attributes. You can change the destination attribute of the instance name,
database name, and database home. Note that the instance name is
case-sensitive while the database name is not case-sensitive.
If you use a temporary tablespace or data files, and you plan to write the data
files back to the same location, do not modify the path. If you must modify the
path, make sure that it is identical to the source path including case (upper,
lower, mixed). Otherwise, the clone fails with an error that indicates the
temporary file already exists. This limitation does not affect UNIX and Linux
systems.
■ Control File Paths. This pane displays the source path and the destination
path for each control file. You can change a control file destination path by
clicking in the associated text window and entering the new path. You can also
click Browse to navigate to the desired path. When you change a path, a
highlight bar appears around the text window as a visual indicator that this
path has changed.
■ Data File Paths. This pane lets you change the destination path for one or
more data files. Enter the path in the text window provided, then select the
data files on which to apply it, and press the Apply option.
■ Redo Log Paths. This pane displays the source path and the destination path
for all redo logs. You can type in a new destination path or click Browse to
navigate to the desired path. When you change a path, a highlight bar appears
around the text window as a visual indicator that this path has changed.
■ Restore Options. This pane displays restore options. The option that is
displayed on this pane is Number of parallel streams for restore and recover.
When you are done making changes on this screen, click Next>. All the information
from the previous screen is saved in preparation for the cloning operation. All
the changes that are made in this screen are temporary and are active only for
the cloning session.
■ The destination database attributes selected in the previous screen and the
database initialization parameters to be used for the cloning operation.
restore them. After the backup (cloning operation), you can return the items
to read-only.
The following shows an example of the sequence of steps in the process:
■ Back up Oracle database A which contains read-only tablespace TABLE1.
■ Clone database A to database B.
■ Use the Oracle alter tablespace command to make tablespace TABLE1
read-write. You may revert to read-only if you want.
■ Back up database B.
■ Use RMAN to restore database B.
Snapshot backup captures the data at a particular instant without having caused
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.
The following NetBackup Snapshot Client features are available for use with
NetBackup for Oracle.
Table 7-1 Snapshot Client features used with NetBackup for Oracle
Feature Description
Instant recovery This feature enables instant recovery of backups from disk.
It 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 enables block-level restores.
Table 7-1 Snapshot Client features used with NetBackup for Oracle (continued)
Feature Description
File-based operations Oracle provides the list of files that require backup or restore
to NetBackup for Oracle with Snapshot Client.
Proxy copy
A proxy copy is a special type of backup in which the NetBackup for Oracle agent
manages the control of the data transfer. During the backup and restore operations,
proxy copy enables the agent to manage the entire data movement between the
disks that contain the data files and the storage devices that NetBackup manages.
With proxy copy, RMAN provides a list of files that require backup or restore to
the NetBackup for Oracle agent. The agent determines how the data is moved and
when to move the data. Proxy copy is an extension to Oracle’s Media Management
API.
Backups and restores remain tightly integrated with RMAN and its catalog, which
greatly simplifies administration tasks.
stream content that RMAN provides. If the user has specified multiple streams,
then RMAN opens multiple streams and NetBackup catalogs them as separate
images.
Figure 7-1 represents a stream-based backup or restore.
Oracle Server
Data
Control commands
Oracle database Oracle database
disk disk
NetBackup
Storage
Figure 7-2 NetBackup for Oracle with Snapshot Client file-based backup or
restore
Oracle Server
Control commands
List of files
Oracle database Oracle database
disk disk
Data Data
NetBackup
Storage
For control files, Oracle RMAN performs conventional stream-based backups only.
NetBackup for Oracle must use stream-based backups for control files even when
you use Snapshot Client methods for the other database objects.
The Oracle Intelligent Policy handles both stream-based and file-based
components. File-based and stream-based backups require different configurations.
When configuring your NetBackup for Oracle with Snapshot Client backups, be
sure to configure a policy that allows both stream-based and file-based backups.
RUN
{
154 NetBackup for Oracle with Snapshot Client
How NetBackup for Oracle with Snapshot Client works
The RMAN procedure for the data files that are backed up by proxy is the same
as for conventionally backed up data files. RMAN knows that the data files were
backed up by proxy, and it issues a proxy restore request to NetBackup for Oracle,
which restores the data files to the new location. For more information on the
required procedure, see your Oracle documentation.
On the restore, NetBackup for Oracle with Snapshot Client restores both
components from the backup image. If one or both of the components are missing,
NetBackup for Oracle with Snapshot Client creates the missing component(s).
run {
allocate channel t1 type 'SBT_TAPE';
backup
incremental level 0
proxy
format ’bk_%U_%t’
tablespace tbs1;
release channel t1;
}
run {
allocate channel t1 type 'SBT_TAPE';
backup
incremental level 1
format ’bk_%U_%t’
tablespace tbs1;
release channel t1;
}
156 NetBackup for Oracle with Snapshot Client
How NetBackup for Oracle with Snapshot Client works
The agent splits the files into three 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.
NetBackup for Oracle with Snapshot Client 157
How NetBackup for Oracle with Snapshot Client works
If the RMAN recovery catalog is not used, the version of the control
file being backed up does not contain 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 {
allocate channel t1 type 'SBT_TAPE';
backup
format 'cntrl_%s_%p_%t'
current controlfile;
release channel t1;
}
158 NetBackup for Oracle with Snapshot Client
How NetBackup for Oracle with Snapshot Client works
run {
allocate channel t1 type 'SBT_TAPE';
backup proxy
format 'bk_%U_%t'
(tablespace tbs1, tbs2);
release channel t1;
}
To use NAS snapshot with NetBackup for Oracle, the Oracle database must be
installed and configured to work in a NAS environment.
If you want to use a SnapVault storage unit, make sure that the storage unit is
configured before you start configuring the NAS snapshot policy.
For more information about NAS snapshot and SnapVault, see the NetBackup
Snapshot Client Administrator’s Guide.
The following list highlights some of the requirements that pertain to database
agents:
■ Snapshot Client backups do not back up all database objects. Your backup
configuration must include schedules to perform snapshot and stream-based
backups. This configuration ensures that the entire database can be restored
successfully.
■ On UNIX, the user identification and group identification numbers (UIDs and
GIDs) associated with the files to be backed up must be available. The UID and
GID must be available to both the primary client and the alternate backup
client. The UID on the primary client and the alternate backup client must be
the same. Similarly, the GID on the primary client and the alternate backup
client must be the same.
Note: The UID number can be different than the GID number.
■ Allocate different areas for data files, archived redo logs, and the control file
for database activities. Write the data files to their own repository because it
is required for an instant recovery point-in-time rollback. Only data files can
exist on the volume or the file system that you want to restore.
■ The hardware and software that is required for the appropriate snapshot
method must be installed and configured correctly.
■ NetBackup Snapshot Client must be installed and configured correctly, and
the license key for this option must be registered.
■ To perform off-host backups, perform any special configuration that is
required.
Select appropriate
storage unit or
storage unit group
Click Perform
snapshot backups
Click Retain
snapshot for Instant
Recovery or SLP
management
Use Alternate If you select Alternate client, also specify the name of the client
client (UNIX and to perform the backup. This option may require additional
Windows clients) configuration. The alternate client must be a client that shares
the disk array.
Use Data mover If you click Data mover, also select one of the following possible
(UNIX clients data movers:
only).
NetBackup Media Server
16 On the Backup Selections tab, specify the correct setup depending on policy
setup.
■ Oracle Intelligent Policy backup policy. Use the radio button to select
Whole Database, Partial database – Tablespaces, Partial database –
Datafiles, or Fast Recovery Area when using this type of policy.
■ Script- or template-based backup policy. Specify the backup template or
backup script when you use this type of policy.
More information is available about how to use templates and scripts for a
NetBackup for Oracle policy with Snapshot Client.
164 NetBackup for Oracle with Snapshot Client
Restoring NetBackup for Oracle from a snapshot backup
About NetBackup for Oracle restores of volumes and file systems using
snapshot rollback
You can request that an entire volume or an entire file system be restored from
an instant recovery Snapshot backup. This type of a restore is called a point in
time rollback. All the data in the snapshot is restored; single file restore is not
available in a rollback.
See the NetBackup Snapshot Client Administrator’s Guide.
The following considerations are relevant for NetBackup for Oracle restores:
■ Snapshot rollback overwrites the entire volume.
■ With NetBackup for Oracle, snapshot rollback always performs file verification.
The agent checks for the following:
■ The requested files (number and names) are identical to those in the
snapshot
■ The primary volume does not contain any files that were created after the
snapshot was made
If verification fails, the rollback aborts with status 249.
3 Select Actions > Select Restore Type > Point in Time Rollback.
4 Use the NetBackup for Oracle recovery wizard for the restore.
See “About NetBackup for Oracle restores” on page 122.
166 NetBackup for Oracle with Snapshot Client
Restoring NetBackup for Oracle from a snapshot backup
Note: If the data file you want to restore has not changed since it was backed up,
the rollback may fail. Initiate the restore from a script and use the Oracle FORCE
option.
■ Example:
RUN {
allocate channel t1 'SBT_TAPE';
send 'NB_ORA_PC_RESTORE=rollback';
sql 'alter tablespace TEST offline immediate'
restore tablespace TEST;
recover tablespace TEST;
release channel t1;
}
Note: Symantec recommends that Snapshot Client users who want to perform
BLI backups use BLI with RMAN.
NetBackup for Oracle also provides a method for BLI backup without RMAN that
uses scripts to put tablespaces into, and take them out of, backup mode. This
method is not recommended, and it requires a significantly different configuration.
But for Oracle 12c, using script-based BLI backups without the use of RMAN are
not supported.
cumulative BLI backup can reduce the number of incremental backup images
that must be applied during a restore operation. This speeds up the restore
process.
■ Differential BLI backup.
A backup in which NetBackup performs a backup of only those data blocks
(within the database files) that changed since the last backup. The previous
backup can be of type full, cumulative incremental, or differential incremental.
When NetBackup initiates BLI backups, it creates, manages, and uses the
appropriate Storage Checkpoints of the filesystem(s) hosting the Oracle data file
systems. These Storage Checkpoints identify and maintain a list of modified blocks.
mode. During the creation of the Storage Checkpoint, all tablespaces are placed
in backup mode.
Full backup The full and incremental backup schedule types automatically
start the backups by running the NetBackup for Oracle RMAN
Differential
scripts or templates. They also store the snapshot backups.
incremental backup,
Note: For most snapshot types, any automatic backup schedule
Cumulative
(full, cumulative, or differential) results in a full volume snapshot.
incremental backup
BLI is the only snapshot method that can perform an incremental
backup.
Property Description
Application Schedules:
For NetBackup for Oracle with Snapshot Client, the order of precedence for
environment variables is the same as for standard NetBackup for Oracle. Refer
to the instructions for how to configure the NetBackup and the user variables.
See “About configuring the run-time environment” on page 93.
NetBackup for Oracle installs sample scripts in the following location:
Windows:
install_path\NetBackup\dbext\oracle\samples\rman
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
The following are the scripts for NetBackup for Oracle with Snapshot Client that
show how to configure the required variables:
NetBackup for Oracle with Snapshot Client 175
About Oracle support for Replication Director
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 {
allocate channel t1 type 'SBT_TAPE';
send 'NB_ORA_PC_SCHED= sched, NB_ORA_PC_STREAMS= number’;
backup proxy
(database format 'bk_%U_%t');
}
For more information, see the sample scripts that are provided with the agent.
See “Proxy backup examples” on page 156.
Scripts ■ All scripts that are necessary to protect all ■ NetBackup can continue to use custom scripts
parts of the database are automatically to perform database backups.
generated at run-time. ■ The administrator must know how to
■ The administrator does not need to know how configure RMAN scripts.
to configure RMAN scripts. ■ The administrator must set the retention
■ The retention levels for the different parts levels for the different parts of the database
of the database are automatically assigned correctly.
■ The administrator must ensure that a
snapshot of the proxy data is created.
Schedules The administrator configures only one schedule The administrator must configure two schedules
that backs up all parts of the database and sets with two retentions:
the correct retention automatically.
■ One Full Backup schedule to back up the
The Archived Redo Log schedule is not snapshot (proxy) data part of the database.
supported with a snapshot backup. ■ One Application Backup schedule to back
up the stream-based part of the Oracle
database.
Backups User-directed backups are not supported. To User-directed backups are supported.
attempt a user-directed backup (results in a
status 240 (no schedules of the correct type exist
in this policy).
Load balancing RAC load balancing is not supported. RAC load balancing is supported.
4 Select the Attributes tab. The following items are specific to creating an
Oracle policy for snapshots with Replication Director:
■ Policy type
For NetBackup to perform Oracle backups, select Oracle. An Oracle tab
appears.
■ Policy storage
Oracle combines snapshots (proxy) and stream-based backups as part of
the same backup. The storage that is indicated here is used for the
stream-based part of the Replication Director backup.
Select a storage lifecycle policy that is configured to contain the
stream-based (non-snapshot) part of the database backup. The storage
must use a storage lifecycle policy that is configured for non-snapshot
backups.
■ Use Replication Director
Enable Use Replication Director to automatically select other options
that Replication Director requires:
■ Perform snapshot backups: Ensures that the policy creates snapshots
of the disk array.
■ Retain snapshots for Instant Recovery or SLP management: Ensures
that the policy retains the snapshot after the backup completes.
■ Options button
178 NetBackup for Oracle with Snapshot Client
About Oracle support for Replication Director
Note: Unless creating Block Level Incremental (BLI) backups, always select
Full Backup to create snapshots of the Oracle database.
■ Override policy storage selection: Enable and select the SLP that is
configured for snapshot replication. (A snapshot SLP is one in which the
first operation is a snapshot operation.) This option must be enabled so
180 NetBackup for Oracle with Snapshot Client
About Oracle support for Replication Director
that the schedule storage overrides the policy storage with a snapshot
SLP.
■ Retention: The retention for the streamed data is based on the
non-snapshot SLP that was indicated as the Policy storage in Step 4.
■ The non-snapshot SLP specified on the policy storage in Step 4
determines the retention for the streamed data.
■ The snapshot SLP that is specified as the schedule storage (Override
policy storage selection) determines the retention for the snapshot
data.
6 Select the Instances tab and specify the instances to back up. The policy must
include at least one instance. To continue to use the Oracle Intelligent Policy
method, select either Protect instances or Protect instance groups.
Script- or template-
based Oracle policy
method
7 Select the Backup Selections tab. Select the parts of the database to back up.
Note that the selection applies to all listed instances.
The following can be selected for the policies that use Replication Director:
■ Whole database: Backs up the entire database (default).
■ Partial database - Tablespaces: Backs up the tablespaces.
■ Partial database - Datafiles: Backs up the data files.
■ Fast Recovery Area (FRA): Do not select for a policy that uses Replication
Director.
Note: If you back up the partial database, and later want to perform a
Point-in-time rollback restore, make sure that you select all of the tablespaces
or data files from a partition in the Backup Selections.
For copy-back restores, this is not a requirement.
4 Select the Attributes tab. The following items are specific to creating an
Oracle policy for snapshots with Replication Director:
■ Policy type
For NetBackup to perform Oracle backups, select Oracle. An Oracle tab
appears.
■ Policy storage
Oracle combines snapshots (proxy) and stream-based backups as part of
the same backup. The storage that is indicated here is used for the
stream-based part of the Replication Director backup.
Select the storage that is configured to contain the stream-based
(non-snapshot) part of the database backup. The storage can be either a
storage lifecycle policy that is configured for non-snapshot backups, or a
disk or Media Manager unit.
■ Use Replication Director
Enable Use Replication Director to automatically select other options
that Replication Director requires:
■ Perform snapshot backups: Ensures that the policy creates snapshots
of the disk array.
■ Retain snapshots for Instant Recovery or SLP management: Ensures
that the policy retains the snapshot after the backup completes.
■ Options button
NetBackup for Oracle with Snapshot Client 183
About Oracle support for Replication Director
5 Select the Instances tab and specify the instances to back up. Select Clients
for use with scripts and templates. If either of the other two are selected,
the Oracle Intelligent Policy is used and the scripts are created automatically.
Oracle Intelligent
Policy method
Script- or template-
based Oracle policy
method
NetBackup for Oracle with Snapshot Client 185
About Oracle support for Replication Director
After selecting the Clients for use with scripts and templates option, a
message appears that describes the effect of this choice:
■ Existing selections (if any) for this policy are erased.
■ The Oracle tab is removed from this policy.
■ Another effect is that the Selections tab turns into the Clients tab.
Click Yes to continue Oracle policy configuration.
Note: Unless creating Block Level Incremental (BLI) backups, always select
Full Backup to create snapshots of the Oracle database.
■ Override policy storage selection: Enable and select the SLP that is
configured for snapshot replication.
■ Retention: The SLP indicates the retention for the backup.
NetBackup for Oracle with Snapshot Client 187
About Oracle support for Replication Director
9 Configure the schedule in the Start Window tab and the Exclude Days tab.
Click OK to save and close the schedule.
10 Select the Clients tab. By default, the Clients for use with scripts or templates
option is selected for this script- or template-based Oracle policy.
11 Add the client name(s) that contain the Oracle database and indicate the
operating system of each.
12 Select the Backup Selections tab. Specify the script or the template that
NetBackup should use. Indicate only one script or one template.
13 When the policy configuration is complete, click OK.
188 NetBackup for Oracle with Snapshot Client
About Oracle support for Replication Director
Chapter 8
Troubleshooting
This chapter includes the following topics:
2 For the Backup, Archive, and Restore interface and the Oracle Intelligent
Policy, verify that the following binaries exist.
On Windows: install_path\NetBackup\bin\bpdbsbora.exe
On Windows: install_path\NetBackup\bin\bpubsora.exe
On Windows: install_path\NetBackup\bin\dbsbrman.dll
On UNIX: /usr/openv/netbackup/bin/bpdbsbora
On UNIX: /usr/openv/netbackup/bin/bpubsora
On UNIX: /usr/openv/lib/libdbsbrman.so (libdbsbrman.sl on HP-UX)
3 Check that both the NetBackup server and client software work 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.
4 The logs can become very large, especially bpdbm. Ensure that enough free
disk space exists in the log directory disk partition.
192 Troubleshooting
NetBackup debug logs and reports
install_path\NetBackup\logs\README.debug file
UNIX:
/usr/openv/netbackup/logs/README.debug file
Troubleshooting 193
Enabling the debug logs manually (Windows)
NetBackup provides other reports that are useful in isolating problems. One such
report is All Logs Entries on the server. Information on server reports is available.
See the NetBackup Administrator’s Guide, Volume I.
install_path\NetBackup\logs\bpubsora
■ bphdb
For any backup that is initiated from an automated schedule on the master
server.
install_path\NetBackup\logs\bphdb
■ bpdbsbora
For any template-based backup or restore, including OIP and Guided
Recovery.
install_path\NetBackup\logs\bpdbsbora
■ dbclient
For any backup or restore using RMAN.
install_path\NetBackup\logs\dbclient
■ bpbkar
For any snapshot backup.
install_path\NetBackup\logs\bpbkar
■ tar
For any snapshot restore.
194 Troubleshooting
Enabling the debug logs manually (UNIX)
install_path\NetBackup\logs\tar
2 Verify the user or group that the Oracle process (process that loads
orasbt.dll) has appropriate permissions to write to the following directories
if they exist. If the following directories do not exist, the directories are created
automatically with the correct permissions.
install_path\NetBackup\logs\user_ops
install_path\NetBackup\logs\user_ops\dbext
install_path\NetBackup\logs\user_ops\dbext\logs
Also verify that the user or group that the Oracle process runs as has
appropriate permissions to write to the log directories in step 1.
3 On the NetBackup server or servers, create the debug log directories for the
legacy processes that interact with the Oracle agent.
On the master server:
install_path\NetBackup\logs\bprd
install_path\NetBackup\logs\bptm
4 The debug logs for unified processes on the server and the client hosts are
created automatically by NetBackup.
NetBackup writes unified logs to install_path\NetBackup\logs.
For information on how to use logs and reports, see the NetBackup
Troubleshooting Guide.
/usr/openv/netbackup/logs/bpubsora
■ bphdb
Troubleshooting 195
Enabling the debug logs manually (UNIX)
For any backup that is initiated from an automated schedule on the master
server.
/usr/openv/netbackup/logs/bphdb
■ bpdbsbora
For any template-based backup or restore, including OIP and Guided
Recovery.
/usr/openv/netbackup/logs/bpdbsbora
■ dbclient
For any backup or restore using RMAN.
/usr/openv/netbackup/logs/dbclient
■ bpbkar
For any snapshot backup.
/usr/openv/netbackup/logs/bpbkar
■ tar
For any snapshot restore.
/usr/openv/netbackup/logs/tar
2 Verify the user or group that the Oracle process (process that loads libobk)
has appropriate permissions to write to the following directories if they exist.
If the following directories do not exist, the directories are created
automatically with the correct permissions.
/usr/openv/logs/user_ops
/usr/openv/logs/user_ops/dbext
/usr/openv/logs/user_ops/dbext/logs
Also verify that the user or group that the Oracle process runs as has
appropriate permissions to write to the log directories in step 1.
196 Troubleshooting
Enabling the debug logs manually (UNIX)
3 On the NetBackup server or servers, create the debug log directories for the
legacy processes that interact with the Oracle agent.
On the master server:
/usr/openv/logs/bprd
/usr/openv/logs/bptm
4 The debug logs for unified processes on the server and the client hosts are
created automatically by NetBackup.
NetBackup writes unified logs to /usr/openv/logs.
For information on how to use logs and reports, see the NetBackup
Troubleshooting Guide.
Troubleshooting 197
Enabling the debug logs manually (UNIX)
/usr/openv/netbackup/logs/bpbackup
/usr/openv/netbackup/logs/bpbkar
/usr/openv/netbackup/logs/bpdbsbora
/usr/openv/netbackup/logs/bpubsora
/usr/openv/netbackup/logs/bphdb
/usr/openv/netbackup/logs/bporaexp
/usr/openv/netbackup/logs/bporaimp
/usr/openv/netbackup/logs/bprestore
/usr/openv/netbackup/logs/tar
/usr/openv/netbackup/logs/dbclient
chmod 777 /usr/openv/netbackup/logs/dbclient
For example:
cd /usr/openv/netbackup/logs
mkdir bphdb
2 The user_ops, each of the log directories, and any subdirectories should have
777 permissions. They must exist and be accessible for the applications to
operate correctly.
For example:
See “Permissions for NetBackup for Oracle log directories” on page 49.
3 Enable logging for the nbpem, nbjm, and nbrb scheduling processes that use
unified logging.
NetBackup writes unified logs to /usr/openv/logs.
You do not need to create log directories for processes that use unified logging.
Information on how to use logs and reports is available.
See the NetBackup Troubleshooting Guide.
198 Troubleshooting
About the NetBackup for Oracle log files
■ Windows: obk_stdout.mmddyy.hhmmss.txt
UNIX: obk_stdout.mmddyy
Unless it is redirected elsewhere, NetBackup writes template or shell script output
to this file.
■ Windows: obk_stderr.mmddyy.hhmmss.txt
UNIX: obk_stderr.mmddyy
Unless it is redirected elsewhere, NetBackup writes template or shell script errors
to this file.
■ Windows: mmddyy.log
UNIX: log.mmddyy
This log contains debugging information for the bphdb process. bphdb is the
NetBackup database backup binary. It is invoked when an automatic backup
schedule is run. NetBackup for Oracle uses this client process for template or shell
script execution.
■ Windows: mmddyy.log
■ UNIX: log.mmddyy
This log contains debugging information and execution status for the Oracle for
NetBackup client processes.
On Windows, the processes are linked to the library program that is provided with
NetBackup for Oracle.
■ Windows: mmddyy.log
■ UNIX: log.mmddyy
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).
bporaexp64 The bporaexp (or bporaexp64 on UNIX) directory contains the following execution
log:
■ Windows: mmddyy.log
■ UNIX: log.mmddyy.log
bporaimp64 The bporaimp (or bporaimp64 on UNIX) directory contains the following execution
log:
■ Windows: mmddyy.log
■ UNIX: log.mmddyy
VERBOSE = X
msglog ‘logfile_name’
■ RMAN verifies its environment and then issues requests to the API.
On Windows, some information, such as the NetBackup version, API versions,
and trace file name, is registered with RMAN. An error now is usually due to
a problem with client and server communication. Check the messages in the
bprd and the bpcd logs for clues.
202 Troubleshooting
Troubleshooting RMAN backup or restore errors
install_path\NetBackup\logs\dbclient\mmddyy.log
UNIX:
/usr/openv/netbackup/logs/dbclient/log.mmddyy
If the bprd process failed, check the logs for bprd and bpbrm.
A failure now 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.
On Windows, try setting the SERVER and NB_ORA_POLICY values in the client
environment.
On UNIX, try setting the SERVER and POLICY values in the bp.conf file on the
client or by setting environment variables.
For example, the following C Shell setenv commands specify the Oracle policy,
schedule, and server for NetBackup to use:
■ 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.
■ RMAN tells the API to close the session.
Troubleshooting 203
Troubleshooting the UNIX browser interface and wizards
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, as follows:
■ RMAN aborts if it encounters an error while it reads 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.
■ Make sure that your login ID and password have Oracle SYSDBA privileges.
Initially, NetBackup for Oracle attempts OS Authentication to log on. If that
fails, you are prompted for a user name, password, and an optional Transparent
Network Substrate (TNS) alias. The user name and password you enter must
have SYSDBA privileges.
■ In a clustered environment, failure to connect to the database can mean a
problem with the network configuration. The browser must connect locally.
However, in some environments, all connections are considered to be remote
connections, even a connection to a local database. This behavior is true for
example in an Oracle Real Application Clusters (RAC) environment. In such
cases, you must make the connection using a TNS alias.
In a Linux environment, Oracle backups and restores fail if the Linux logon is not
the Oracle user. In such cases, Oracle generates the following message:
INF - ORA-19554: error allocating device, device type: SBT_TAPE, device name:
INF - ORA-27211: Failed to load Media Management Library
If you want to start an Oracle job as someone other than an Oracle user, augment
the default shared library search path. Use the Linux ldconfig(8) command to
add $ORACLE_HOME/lib to the search path.
install_path\NetBackup\logs
UNIX:
/usr/openv/netbackup/logs/
Note: This change may delay detecting problems during subsequent backups.
Consider putting the original value back in place once any restore that requires
a change is complete.
completes but before the job completes. The delay may be due to one of the
following:
■ Oracle delays
■ Network issues
■ Storage unit delays
■ Oracle server post-backup processing
The delays during the transfer can be especially pronounced if using large data
files. Lengthy delays make it difficult for NetBackup to know if Oracle is hung or
delayed. To review setting information and delay examples, refer to the following
article:
http://www.symantec.com/docs/TECH227741
To determine the cause of delays after the transfer, refer to the following article:
http://www.symantec.com/docs/TECH198864
208 Troubleshooting
Delays in backup job transfer and completion
Appendix A
Real Application Clusters
This appendix includes the following topics:
The virtual network host name may be associated with an IP address in the
following ways:
■ With an IP address for a host in the cluster
■ A virtual IP address for an Oracle instance running on a host in the cluster
■ A failover virtual IP address that may move between the hosts in the cluster
Backup operations may use the various virtual network host names, or the network
host name of the hosts in the cluster.
To differentiate between the various network names, the following terms and
definitions are used:
Host name The network host name that is associated with a specific
host in the cluster.
VIP name The network host name that is associated with a virtual IP
address specific to an instance in the cluster.
Failover name The network host name that is associated with an IP address
that is active on a running node. This network host name
is the network host name that can perform a backup at this
time.
Warning: Do not use a single client name if the backup is load balanced across
more than one node. In a load-balanced configuration, the node that hosts the IP
address to which the client name resolves, generates successful backups. However,
the jobs originating from the other nodes fail with status code 54.
Oracle 11g R2 Grid Infrastructure (CRS) includes the Single Client Access Name
(SCAN) feature. A single SCAN can resolve to multiple IP addresses each assigned
to a different physical node in the cluster.
A SCAN can be used in a NetBackup policy that receives the Application Backup
request. However, this abstraction of the client name causes backup and restore
jobs to fail with status code 54. Also, the client side fails with status code 6 (backup)
or status code 5 (restore).
Accordingly, ensure that the client that appears in the NetBackup Oracle policy
is not a SCAN. Also, ensure that any NB_ORA_CLIENT or CLIENT_NAME that the
node provides in the backup request is not a SCAN. These names must reliably
resolve on both the master server and the media server to an IP address. This IP
address allows the server processes to connect to the node from which the backup
request originated.
Real Application Clusters 211
About RAC archiving schemes
CFS archive
destination
Database
data files
Node 1 Node 2
If the CFS solution is not available, Oracle recommends a scheme like that in
Figure A-2. In Figure A-2, each node archives to a local directory and writes a copy
to each of the other nodes’ archive directories. The locations are shared between
the nodes (with read and write permissions) by NFS mounting the directory (UNIX)
or sharing the locations (Windows).
Figure A-2 describes non-CFS local archiving scheme with archive sharing.
212 Real Application Clusters
About RAC archiving schemes
Database
data files
Node 1 Node 2
A scheme similar to the previous one exists if each node archives to a local
directory, and the locations are shared (read-only) with the other nodes in the
cluster. These locations are shared among the nodes by NFS-mounting the
directory (UNIX) or sharing the locations (Windows). Therefore, each node can
read each archive destination.
Figure A-3 describes non-CFS local archiving scheme with archive read-only
sharing.
214 Real Application Clusters
About RAC archiving schemes
Figure A-3 Non-CFS local archiving scheme with archive read-only sharing
Database
data files
Node 1 Node 2
The simplest archiving scheme is local archiving with no sharing. Each node
writes only to the local destination, and no access is given to the other nodes in
the cluster.
Figure A-4 describes non-CFS local archiving scheme with no archive sharing.
Archive Archive
destination destination
1 2
Database
data files
Node 1 Node 2
Note: This example works only if the backup is not load balanced across multiple
nodes, because NB_ORA_CLIENT=$NB_ORA_CLIENT evaluates only to the node
on which the RMAN script is executed.
216 Real Application Clusters
Example of restoring a database
RUN
{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT,NB_ORA_SERV=$NB_ORA_SERV';
BACKUP
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT,NB_ORA_SERV=$NB_ORA_SERV';
BACKUP
ARCHIVELOG ALL ;
RELEASE CHANNEL ch00;
}
Note: This example works only if the backup is not load balanced across multiple
nodes. The reason is because NB_ORA_CLIENT=$NB_ORA_CLIENT evaluates only
to the node on which the RMAN script is executed.
The following example restores the entire database from any node:
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=saturn,NB_ORA_SERV=jupiter';
RESTORE
DATABASE;
RECOVER
DATABASE;
RELEASE CHANNEL ch00;
}
Real Application Clusters 217
Troubleshooting database restores (UNIX and Windows)
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=saturn,NB_ORA_SERV=jupiter';
RESTORE
ARCHIVELOG ALL;
RELEASE CHANNEL ch00;
}
If the remote archive logs destinations do not allow write access, use a script such
as the following to restore the archive logs:
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=saturn,NB_ORA_SERV=jupiter';
218 Real Application Clusters
About restoring archive logs
Where <directory> is the directory into which the archive logs are restored.
Use a script like the preceding one if your configuration is a configuration shown
in one of the following topics:
■ See Figure A-3 on page 214.
■ See Figure A-4 on page 215.
Appendix B
Best practices for
protecting Oracle RAC with
NetBackup
This appendix includes the following topics:
■ About using Templates and Oracle Intelligent Policy (OIP) with RAC
■ Example RAC configuration: Failover name exists and backup is not load
balanced
■ Example RAC configuration: Failover name exists and backup is load balanced
■ Example RAC configuration: Failover name is not available and backup is not
load balanced
■ Example RAC configuration: Failover name is not available, and backup is load
balanced, one policy with custom script
■ Example RAC configuration: Failover name is not available and backup is load
balanced, simple script with manual policy failover
Oracle database backup and recovery is more difficult as databases grow in size
and greater demands on database availability limit the time to perform backups.
Often the backup time window is too short to accommodate a complete backup
process by using only one backup node in the cluster. Database administrators
need more efficient methods to complete these large backups in the allotted time.
For the Oracle RAC database, Oracle can split the backups into pieces and send
them in parallel from multiple nodes, which shortens the processing time.
This section describes the methods that can be used to backup the Oracle RAC
database. You can use one node to backup the database or balance the backup load
across multiple nodes of an Oracle RAC database.
Note: Using a separate template or OIP for each instance in a RAC may be
successful. However, using these methods may result in multiple backups of the
same shared application data.
Note: Oracle 11g R2 Grid Infrastructure (CRS) includes the Single Client Access
Name (SCAN) feature. This feature allows a single host name to resolve to
multiple IP addresses each assigned to a different physical node in a cluster.
Ensure that the client that appears in the NetBackup Oracle policy is not a
SCAN. Also, ensure that any NB_ORA_CLIENT or CLIENT_NAME provided by
the client host in the backup request is not a SCAN. These names must reliably
resolve on both the master server and the media server to a client host IP
address. This IP address allows the server processes to connect to the client
host from which the backup request originated. If the SCAN is used in a
NetBackup policy, this abstraction of the client name leads to backup and
restore jobs failing. The backup and restore jobs may fail with a status 54. The
client side fails with status 6 (backup) or status 5 (restore).
■ The NetBackup master server uses the automatic schedules in the Oracle policy
to determine when the scripts in the backup selections are run on clients.
■ The NetBackup scheduler starts one Automatic Backup job for each client in
the policy. The jobs for multiple clients can run concurrently. The scheduler
executes each script on each client in the specified sequence. All the scripts
for one client are run in the same automatic job.
■ The backup scripts start RMAN.
■ If an automatic schedule and script do not exist in the policy, a process on the
client can still initiate RMAN when necessary.
The following lists what occurs when RMAN requests the backup:
■ RMAN connects to the appropriate Oracle instance(s) for the backup. Hence,
the script may execute on one host, but the backup may take place on a different
host.
■ RMAN allocates one or more channels according to the backup script.
■ RMAN sends one or more backup pieces on each channel, in sequence.
■ Each channel interacts with NetBackup for Oracle and sends a user-directed
backup request to the NetBackup master server for each backup piece.
■ Each request becomes a separate NetBackup Application Backup job. Hence
there can be one Application Backup job queued or active, concurrently, per
allocated channel.
■ RMAN can send one or more of the variables NB_ORA_CLIENT,
NB_ORA_POLICY, and NB_ORA_SCHED to the NetBackup master server.
■ If RMAN does not send NB_ORA_CLIENT, the client name is used.
222 Best practices for protecting Oracle RAC with NetBackup
Example RAC configuration: Failover name exists and backup is not load balanced
■ If RMAN does not send NB_ORA_POLICY, the master server selects the first
Oracle policy it finds for the client.
■ If RMAN does not send NB_ORA_SCHED, the master server selects the first
Application Backup schedule in the policy.
■ The NetBackup master server must be able to match any requested client name,
Oracle policy and Application Backup schedule, or the job fails.
The following lists how NetBackup receives the data from RMAN:
■ The Application Backup jobs activate and the NetBackup media server processes
which connect to the provided client name to receive the data. Hence, the client
name that is sent in the user-directed request must bring the data connection
back to the requesting host.
■ RMAN sends the appropriate data on the appropriate channel, and the data is
transferred to storage.
■ The NetBackup master server configuration must allow the physical host
names access to all of the backup images.
Best practices for protecting Oracle RAC with NetBackup 223
Example RAC configuration: Failover name exists and backup is load balanced
cd /usr/openv/netbackup/db/altnames
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
echo "failover_vipname" >> hostname1
cp hostname1 hostname2
■ You can use Preferred Network on the client to specify the outbound interface
for user-directed requests to the master server. This method is not
recommended. However, if you use this method then you must allow the VIP
names to access all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
Note: This method may not be desirable because it affects the source IP for
user-directed file system backup, list, and restore requests.
The backup script then runs on the active host that currently hosts the failover
name. RMAN allocates the channels on that host to perform the backup. The
Application Backup jobs queue to the failover name, and the NetBackup media
server connects back to the failover name for the data transfer. The backup images
are stored under the failover name regardless of which host performed the backup.
Restores can take place from either host as long as the restore request is configured
to SEND 'NB_ORA_CLIENT=failover name';
■ The backup script or an identical copy must be accessible to all hosts in the
cluster. The clustered file system is a good location.
■ Do not configure the backup script to send a single value for NB_ORA_CLIENT.
The NetBackup media server must connect back to the correct host, which
depends on which host originated the user-directed backup request. Select
one of the following three methods to accomplish this task:
■ Configure the backup to provide a host-specific client name with each backup
request using one of the following three options:
■ Configure RMAN to bind specific channels to specific instances and provide
the associated client names on each channel for backup image storage.
Also, configure RMAN for connect-back to the requesting host for the data
transfer. Do not use the failover name, because it is active on only one of
the hosts.
Note: If one or more of these nodes are down, these allocation operations
fail which causes the backup to fail.
■ Alternatively and by default, the backup uses the client names which should
be distinct for each host and is typically the physical host name.
■ Add both VIP names or both host names to the policy, in addition to the
failover name.
■ Modify the script so that it exits with status 0 if the client name is not
the failover name.
■ The NetBackup master server configuration must allow the physical host
names access to the backup images. The images are stored under the VIP names
or host names as follows:
cd /usr/openv/netbackup/db/altnames
echo "failover_name" >> hostname1
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
■ You can use Preferred Network or another means to force NetBackup to use
the IP addresses associated with the VIP names for outbound user-directed
requests. If you use this method then you must allow the VIP names to access
all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
226 Best practices for protecting Oracle RAC with NetBackup
Example RAC configuration: Failover name is not available and backup is not load balanced
Option A: The NetBackup scheduler starts three automatic jobs, and each runs
the backup script (two of them on the host that currently hosts the failover name).
The two executions of the backup script that receive the VIP names or host names
exit immediately with status 0. The reason immediate exit is done is to avoid a
redundant backup and any retries. The third execution of the backup script that
receives the failover name, starts RMAN. RMAN then sends the data for backup
by using the appropriate client name for the instance or host for the channel.
NetBackup stores the backup images under the initiating policy using both client
names.
Option B: The first policy runs the backup script by using the failover name.
RMAN sends the name of the second policy and the configured client names for
each channel with the user-directed request from each host. The second policy
stores the backup images using both client names.
Either client can initiate a restore. RMAN must be configured with 'SET
AUTOLOCATE ON;' to request the backup pieces from the appropriate
instance-host that performed the backup. Alternatively, you can restore from
either host or instance if you configure each restore request to include the correct
client name. This name is the client name used at the time the backup piece was
transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup'
■ The backup script must be accessible to both hosts in the cluster, the clustered
file system makes a good location.
■ The backup script should be customized so that it starts RMAN on exactly one
of the clients. If the script is executed on the primary, then start RMAN and
perform the backup. If the script is executed on the secondary and the primary
is up, then exit with status 0 so the NetBackup scheduler doesn't retry this
client. If the script is executed on the secondary and the primary is down, then
start RMAN and perform the backup. You can build the script customization
around a tnsping to the primary or even a query of the database. Use this
customization to see if the other instance is open and able to perform the
backup.
■ Each user-directed backup request must use a client name which allows the
NetBackup media server to connect back to the correct host for the data
transfer. By default, the backup uses the CLIENT_NAME from the bp.conf file
which is distinct for each host. A better solution is to configure RMAN to
provide the appropriate client name from the policy as follows:
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT';
■ Configure the NetBackup master server to give the physical host names access
to all of the backup images.
cd /usr/openv/netbackup/db/altnames
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
■ You can use Preferred Network or another means to force NetBackup to use
the IP addresses associated with the VIP names for outbound user-directed
requests. If you use this method then you must allow the VIP names to access
all of the backup images.
228 Best practices for protecting Oracle RAC with NetBackup
Example RAC configuration: Failover name is not available, and backup is load balanced, one policy with custom script
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
Either client can initiate a restore. RMAN must be configured with 'SET
AUTOLOCATE ON;' to request the backup set pieces from the appropriate instance
or host that performed the backup. Alternatively, you can restore from either
host or instance if you configure each restore request to include the correct client
name. This client name is the one that is used at the time the backup set piece
was transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup'
■ The backup script must not be configured to send a single value for
NB_ORA_CLIENT. This configuration is because the NetBackup media server
needs to connect back to the correct host depending on which host originated
the user-directed backup request.
■ Configure the backup to provide a host-specific client name with each backup
request using one of the following three options:
■ Configure RMAN to bind specific channels to specific instances and provide
the associated client names on each channel for backup image storage.
Also, configure RMAN for connect-back to the requesting host for the data
transfer.
Note: If one or more of these nodes are down, these allocation operations
fail which causes the backup to fail.
■ Alternatively by default, the backup uses the client names which should
be distinct for each host and is typically the physical host name.
■ Configure the NetBackup master server to allow the physical host names access
to all of the backup images.
230 Best practices for protecting Oracle RAC with NetBackup
Example RAC configuration: Failover name is not available and backup is load balanced, simple script with manual
policy failover
cd /usr/opnv/netbackup/db/altnames
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
■ You can use Preferred Network or another means to force NetBackup to use
the IP addresses associated with the VIP names for outbound user-directed
requests. If you use this method then you must allow the VIP names to access
all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
The net result is that the backup script runs on all of the currently active hosts
but only starts RMAN on one host. RMAN allocates channels across the hosts for
load balancing. The user-directed backup requests include a NB_ORA_CLIENT or
CLIENT_NAME specific to the requesting host and which matches the policy. The
connect-back for data transfer and the backup image are stored under that name.
Either client can initiate a restore. RMAN must be configured with 'SET
AUTOLOCATE ON;' to request the backup pieces from the appropriate
instance-host that performed the backup. Alternatively, you can restore from
either host or instance if you configure each restore request to include the correct
client name. This name is the client name used at the time the backup piece was
transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup';
Note: If one or more of these nodes are down, these allocation operations
fail which causes the backup to fail.
■ Alternatively and by default, the backup uses the client names which should
be distinct for each host and is typically the physical host name.
■ Configure the NetBackup master server to allow the physical host names access
to all of the backup images.
cd /usr/opnv/netbackup/db/altnames
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
■ Although not recommended, you can use preferred network or another means
to force NetBackup to use the IP addresses associated with the VIP names for
outbound user-directed requests. If you use this method then you must allow
the VIP names to access all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
The second policy executes the backup script on the primary host when it is
scheduled. RMAN starts the backup process on all of the hosts, and they send
back the appropriate NB_ORA_CLIENT or CLIENT_NAME for that host. If the
primary is down, initiate the third policy manually from the NetBackup master
server and perform a similar backup.
Either client can initiate a restore. RMAN must be configured with 'SET
AUTOLOCATE ON;' to request the backup pieces from the appropriate
instance-host that performed the backup. Alternatively, you can restore from
either host or instance if you configure each restore request to include the correct
client name. This name is the client name used at the time the backup piece was
transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup';
However, if a failover name was not used, then the backup images for individual
clients are stored in uniquely named image directories. This configuration can
cause complications when an operation such as crosscheck or restore are
performed from an alternate cluster or an alternate node within the cluster
Note: This technique works best when you use the VIP names for the instances
as the racclient names. If you use physical host names, the backup images from
file system backups are stored with the Oracle backup images within a single
image directory. This situation can result in two potential problems. First, if the
same file name exists on both hosts but with different content, care must be used
to select the correct backup image from which to restore. The selection confusion
can be eliminated by configuring the file system backup to specify a policy keyword
that is specific to the host from which each file system backup is taken. Then use
the host-specific keyword to constrain the image search when performing browse
and restore. Second, either host can restore the files that were backed up from
the other host. Being part of the same cluster, this restore technique is normally
not a concern. But be aware in case there are special considerations for permissions
and security restrictions at your site.
The following procedure can be used to centralize storage of the backup images
from all nodes in the cluster under one client name. That single client name can
then be used for maintenance and restore operations.
In the following procedure, all steps are performed on the master server unless
otherwise noted. Also, the procedure uses two examples of network routable host
names:
■ racclient1
■ racclient2
In this procedure, the logical name for the cluster is racname. If there is a failover
name that is always active on a node in the cluster, then it could be used as the
racname. Alternatively, the racname can temporarily be added as a host name
alias for racclient1 or racclient2 to complete the initial configuration and then be
removed.
234 Best practices for protecting Oracle RAC with NetBackup
Image catalog configuration for RAC
To centralize storage of the backup images from all nodes in the cluster under one
client name
1 On the master server, confirm the NetBackup version is 7.5.0.6 or higher:
Windows:
type install_path\Veritas\NetBackup\version.txt
UNIX:
cat /usr/openv/netbackup/version
2 On both the master and the media server, confirm that the RAC client names
are resolvable, network routable, and reverse resolve accurately:
Fix any host name forward and reverse resolution inconsistencies, and any
network routing problems. Be sure to clear the NetBackup host cache and
wait 10 seconds after making any name resolution changes:
bpclntcmd –clear_host_cache
Best practices for protecting Oracle RAC with NetBackup 235
Image catalog configuration for RAC
3 On the master server, check if image directories or client aliases already exist
for either of the racclients or the logical name for the cluster:
Windows:
dir install_path\Veritas\NetBackup\db\images\racclient1
dir install_path\Veritas\NetBackup\db\images\racclient2
dir install_path\Veritas\NetBackup\db\images\racname
UNIX:
ls -ld /usr/openv/netbackup/db/images/racclient1
ls -ld /usr/openv/netbackup/db/images/racclient2
ls -ld /usr/openv/netbackup/db/images/racname
Windows or UNIX:
Note: Do not continue this procedure if either of the client names already
have image directories or are aliases to a client name other than the racname.
Consider merging the existing image directories and client names per
TECH208362, instead of using this procedure.
http://www.symantec.com/docs/TECH208362
Alternatively, create new network resolvable and network routable host
names for the RAC clients and return to step 2.
4 If the logical cluster name already had an image directory and is an alias for
itself, then skip to step 6.
5 Run a backup using the logical cluster name as a NetBackup client name.
■ If the racname is not a resolvable host name, temporarily make it a host
name alias for the host name of one of the RAC client names. Changing
the host name alias is most easily done my modifying the hosts file.
■ The backup should be a file system backup using a new or an existing
policy, it can be a backup of only one file.
■ Afterward, make sure the racname has an image directory and client alias
per the checks in step 3. Then remove any temporary host name alias or
policy that was created.
236 Best practices for protecting Oracle RAC with NetBackup
Image catalog configuration for RAC
6 Direct future backups and image searches for racclient1 and racclient2 to the
logical cluster name.
Create the client aliases for the cluster and confirm:
cd install_path\Veritas\NetBackup\db\altnames
echo racname >> peername_racclient1
echo racname >> peername_racclient2
UNIX:
cd /usr/openv/netbackup/db/altnames
echo racname >> peername_racclient1
echo racname >> peername_racclient2
$ bpclntcmd -pn
expecting response from server mymaster
racclient1.com racclient1 192.168.0.11 60108
For more information about client alias best practices, refer to the following tech
note:
Best practices for protecting Oracle RAC with NetBackup 237
Image catalog configuration for RAC
http://www.symantec.com/docs/TECH208362
See “Oracle RAC with NetBackup best practices” on page 219.
See “About NetBackup for Oracle operations” on page 220.
238 Best practices for protecting Oracle RAC with NetBackup
Image catalog configuration for RAC
Appendix C
Deduplication best
practices
This appendix includes the following topics:
■ Editing the RMAN script and configuring NetBackup for Oracle for a proxy
copy backup
the backup set identically each time. The backup set is generated with the same
data from the same files in the same sequence each time the database is backed
up. This uniformity ensures better deduplication. In addition, when FILESPERSET=1
is in effect, Oracle does not perform multiplexing, so Oracle includes only one file
in each backup set. If FILESPERSET is specified with a number other than 1, Oracle
groups files together unpredictably and deduplication rates suffer. You may also
want to increase the number of channels that are allocated to the backup, if
possible.
Symantec recommends that you test your database backups by running both
stream-based backups and proxy copy backups. Measure the deduplication rates
and the backup times, and see which method fits best in your environment. The
Oracle database files themselves benefit the most from deduplication. Typically,
the archive logs and the control files are unique, so they benefit less from
deduplication.
Deduplication performs best when used in the following ways:
ORACLE_OVERRIDE_DATA_MOVEMENT = 1
BACKUP
FILESPERSET=1
%BACKUP_TYPE%
FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
DATABASE;
If your site requires encryption, you can specify encryption in the NetBackup
for Oracle backup policy.
Deduplication best practices 243
Example RMAN script for a stream-based backup
Note: Make sure that Oracle optimization, encryption, and compression are
disabled for the entirety of the database backup. Make sure to check specifications
outside of the RMAN backup script, too.
RUN {
BACKUP
$BACKUP_TYPE
SKIP INACCESSIBLE
TAG hot_db_bk_level0
244 Deduplication best practices
Example RMAN script for a stream-based backup
BACKUP
FORMAT 'bk_u%u_s%s_p%p_t%t'
PROXY
DATABASE;
If your site requires encryption, you can specify encryption in the NetBackup
for Oracle backup policy.
246 Deduplication best practices
Example RMAN script for a proxy copy backup
Note: Make sure that Oracle optimization, encryption, and compression are
disabled for the entirety of the database backup. Also, make sure to check
specifications outside of the RMAN backup script.
RUN {
# Specify 2 streams.
SEND 'NB_ORA_PC_STREAMS=2';
BACKUP
PROXY
SKIP INACCESSIBLE
TAG hot_db_bk_proxy
FORMAT 'bk_%s_%p_%t'
Deduplication best practices 247
Example RMAN script for a proxy copy backup
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
#
# Note: During the process of backing up the database, RMAN also backs up the
# control file. This version of the control file does not contain the
# information about the current backup because "nocatalog" has been specified.
# To include the information about the current backup, the control file should
# be backed up as the last step of the RMAN section. This step would not be
# necessary if we were using a recovery catalog or auto control file backups.
#
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND ' NB_ORA_SERV=$NB_ORA_SERV’;
BACKUP
FORMAT 'cntrl_%s_%p_%t'
CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
248 Deduplication best practices
Example RMAN script for a proxy copy backup
Appendix D
Snapshot Client support of
SFRAC
This appendix includes the following topics:
■ On the master server or media server that resides outside of the cluster, you
must configure the policy to back up the Oracle RAC database.
■ Configure the alternate client so that the snapshot is taken using that offhost.
The alternate client should not be part of the cluster.
CLIENT_NAME = <virtual_name>
■ Alternatively, add the following parameter to the RMAN script file that
you are using for backup and restore, and keep the default CLIENT_NAME
as the hostname:
NB_ORA_CLIENT = <host_name>
3 Specify the required host mode options in the storage array that provides
the storage LUNs. For example, in the Host group options of an Hitachi array,
enter the type of host (for example, Solaris) and enable the VERITAS Database
Edition/Advanced Cluster for Oracle RAC (Solaris) option.
Snapshot Client support of SFRAC 251
Performing a rollback restore in an SFRAC environment
4 Add the following line to the bp.conf file, on each node in the cluster.
PREFERRED_NETWORK = <virtual-host-name>
[QUIESCENCE_INFO]
"QUIESCENCE_SERIAL_QUIESCENCE"=dword:00000001
The following are entities in the VCS that monitor the application I/O stack:
■ CFSMount contains the mount points (cfs) where data files, archive logs, and
control files are stored.
■ CVMVolDg contains all the Volume Groups (cvm) configured on top of the
various array LUNs that participate in the hardware snapshot.
■ The Database Resource Group contains the database instance and assists in
failover.
To perform a rollback restore in the SFRAC environment
1 Ensure that you previously created a virtual IP for the clustered node. Point
that virtual IP to the master node of the cluster.
2 On all the clustered nodes, take the VCS database service group (Oracle,
CFSMount, and CVMVolDg resources) offline by using the following command:
4 Mount the CFSMount points manually outside VCS on the master node. This
action helps when you start the database in mount state.
5 Start the database with mount option on the clustered master node.
6 Run the rollback restore operation from the RMAN script or the client GUI.
A sample RMAN script file (hot_database_backup_proc) is located in the
following directory path:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
NB_ORA_PC_RESTORE=rollback
# umount <mntPt>
Snapshot Client support of SFRAC 253
Troubleshooting NetBackup in an SFRAC environment
9 On all the clustered nodes, take the VCS database service group (Oracle,
CFSMount, and CVMVolDg resources) back online:
Resolution: The client name mentioned in the policy and in the bp.conf file
at the client are different.
■ Problem: The backup failed with error 156. The bpfis logs show the following
error.
file:[QUIESCENCE_INFO]
"QUIESCENCE_SERIAL_QUIESCENCE"=dword:00000001
254 Snapshot Client support of SFRAC
Troubleshooting NetBackup in an SFRAC environment
■ Problem: The rollback failed with the following error displayed in the GUI:
Resolution : Add the following line in the bp.conf file on the master node of
the cluster PREFERRED_NETWORK = <virtual_name>
Appendix E
Script-based block-level
incremental (BLI) backups
without RMAN on UNIX and
Linux systems
This appendix includes the following topics:
of Oracle database files. NetBackup for Oracle script-based BLI performs backups
using the Storage Checkpoint facility in the Veritas File System (VxFS) available
through the Veritas Storage Foundation for Oracle.
2 Verify licensing.
The products must have valid licenses. To check for licenses, enter the
following commands based on your version:
For VxFS versions earlier than 3.5:
# vxlicense -p
# vxlicrep
The command displays all the valid licenses that are installed on the system.
If you have valid licenses, the Storage Checkpoint feature and the Veritas
Storage Foundation for Oracle appear in the list.
3 Verify that both the NetBackup server (master and media) and client software
work properly.
Particularly, verify that you can back up and restore typical operating system
files from the client.
Nodata Storage Checkpoint If the database is offline during the entire backup window
(a cold database backup) or you use this checkpoint type,
the additional space is minimal. Each file system requires
about 1% of free space.
Fulldata Storage Checkpoint If the database is online during the backup and using this
checkpoint type, then more free space is needed in the file
system.
Note: The default option that NetBackup uses for backups is Fulldata Storage
Checkpoint.
To use Nodata Storage Checkpoint instead of the default option, a user must create
the following empty touch file:
/usr/openv/netbackup/ext/db_ext/NODATA_CKPT_PROXY
While most database NetBackup BLI backup policy requirements are the same as
for file system backups, the following items have special requirements:
■ The number of policies that are required
See “Number of policies required for BLI backup” on page 259.
■ Policy attribute values
See “About BLI policy attributes” on page 261.
■ The BLI client list
See “About the BLI client list” on page 261.
■ The list of directories and files to back up
See “Backup selections list for BLI backups” on page 261.
■ Schedules
See “About schedules for BLI backup policies” on page 262.
Warning: Care must be taken when specifying the keyword phrase. A multistream
backup is attempted if the backup process finds more than one policy with the
following characteristics: Each policy has the BLI attribute set, each policy is
active, each policy contains the same client, and each policy has an identical
keyword phrase.
Typical failure status is "74 - timeout waiting for bpstart_notify to complete.
"See “NetBackup restore and backup status codes” on page 276.
You can check the file systems on the backup client to see if they are included in
one of the NetBackup policies on the server. To see if you need to add any new
file systems to the NetBackup policies, run the following commands from the
server on a regular basis, perhaps as a cron(1) job:
# cd /usr/openv/netbackup/bin/goodies/
# ./check_coverage -coverage -client mars -mailid \nbadmin
The preceding command generates the following output and mails it to the
specified mailid:
CLIENT: mars
Mount Point Device Backed Up By Policy Notes
----------- ------ ------------------- -----
/ /dev/vg00/lvol3 production_servers
/home /dev/vg00/lvol5 production_servers
/oradata1 /dev/dsk/c1t0d0 block_incr1
/oradata2 /dev/dsk/c1t0d0 block_incr1
/oradata3 /dev/nbuvg/nbuvol UNCOVERED
/opt /dev/vg00/lvol6 production_servers
/oracle /dev/vg00/oracle production_servers
/stand /dev/vg00/lvol1 production_servers
/usr /dev/vg00/lvol7 production_servers
/var /dev/vg00/lvol8 production_servers
If there is an UNCOVERED file system that is used by Oracle, add it to one of the
NetBackup policies so that all the necessary file systems are backed up at the same
time.
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 261
Creating NetBackup policies for script-based BLI backup
Note: After a file system is added to a policy, it is a good idea to keep the file system
in that policy. If you change the policy, NetBackup performs a full backup the
next time backups are run even if an incremental backup is requested.
Perform block level Select to enable BLI backups. If the BLI attribute is not enabled,
incremental backups NetBackup uses the standard method to back up the files in
the file list.
Job Priority Set so that the BLI backup policies run before other policies.
Note: Do not change a keyword phrase after it is set in a policy. The keyword
phrase is used in naming Storage Checkpoints. Changing the keyword phrase
necessitates a full backup even if an incremental backup is requested.
names, rather than file names, ensures that new database files added to an existing
configuration are backed up without having to update the file list. Use the
check_coverage script to make sure all file systems are backed up.
If you are using the Quick I/O interface, you need to specify both the Quick I/O
file name and the associated hidden file in the file list (for example, dbfile and
.dbfile), or you need to specify the directory that contains both files. NetBackup
does not follow the symbolic links to automatically back up the hidden file if you
enumerate only the dbfile explicitly in the backup selections list. They are both
included if you enumerate their common directory.
When the NetBackup scheduler invokes an automatic backup schedule, it backs
up the files one at a time, in the same order they appear in the backup selection
list.
Oracle does not recommend backing up the online redo log, so it is recommended
that you place online redo log files in a different file system than datafiles, archive
log files, or database control files. Do not include the online redo log files in the
file list.
For server-initiated full and incremental backup schedules, set the start times
and durations to define the appropriate windows for the backups. Follow the same
procedure used to define backup schedules for other policies. For more information
on these procedures, see the NetBackup Administrator’s Guide, Volume I.
The backups are started by the scheduler only within the backup window specified.
For the POLICY_IN_CONTROL, include in the user-directed backup schedule the
time periods when the BLI backup policies complete.
Set the retention level and periods to meet user requirements.
Daily Windows:
Sunday 18:00:00 --> Monday 06:00:00
Monday 18:00:00 --> Tuesday 06:00:00
Tuesday 18:00:00 --> Wednesday 06:00:00
Wednesday 18:00:00 --> Thursday 06:00:00
Thursday 18:00:00 --> Friday 06:00:00
Friday 18:00:00 --> Saturday 06:00:00
Saturday 18:00:00 --> Sunday 06:00:00
Schedule: userbkup
Type: User Backup
Retention Level: 3 (one month)
Daily Windows:
Sunday 00:00:00 --> Sunday 24:00:00
Monday 00:00:00 --> Monday 24:00:00
Tuesday 00:00:00 --> Tuesday 24:00:00
Wednesday 00:00:00 --> Wednesday 24:00:00
Thursday 00:00:00 --> Thursday 24:00:00
Friday 00:00:00 --> Friday 24:00:00
Saturday 00:00:00 --> Saturday 24:00:00
Term Definition
cold database A cold database backup is taken while the database is offline or closed.
backup BLI backup shuts down the database and performs either full or
block-level incremental backups. This backup method is also referred
to in Oracle documentation as a "consistent whole database backup"
or a "closed backup." The data from a cold backup is consistent,
resulting in easier recovery procedures.
In an offline backup, all database files are consistent to the same point
in time (for example, when the database was last shutdown using
typical methods). The database must stay shut down while the backup
runs.
hot database A hot database backup allows the database to be online and open while
backup the backup is performed. With the Storage Checkpoint facility, this
backup method runs database backups in parallel so a database does
not need to be in backup mode for a long time.
Nodata storage A Nodata storage checkpoint hot backup puts the tablespaces in backup
checkpoint hot mode for the duration of the backup. It uses a Nodata Storage
Checkpoint to reduce the amount of file system space consumed.
Term Definition
quick freeze The quick freeze database backup is different than an online database
database backup backup, because it requires the database to be brought down briefly
to take a snapshot or Fulldata Storage Checkpoint of the database
image. The Fulldata Storage Checkpoint is created in a few seconds
and the database can be restarted immediately. A backup image from
a quick freeze database backup is equivalent to a backup image from
a cold database backup. You can choose this backup method when you
configure BLI notify scripts.
If the database is in ARCHIVELOG mode, you can use all four methods to back up
the database. If the database is in NOARCHIVELOG mode, you can only select the
cold backup or quick freeze backup.
When you use the cold and quick freeze database backups, the default shutdown
command that you use in the bpstart_notify.oracle_bli script is shutdown or
shutdown normal. These commands wait for all users to log off before it initiates
the shutdown . In some circumstances, even after all interactive users are logged
off, processes such as the Oracle Intelligent Agent (Oracle dbsnmp account) can
still be connected to the database, preventing the database shutdown. Attempt to
use the default shutdown commands to shut down the database cleanly.
Alternatively, you can use shutdown immediate to initiate the database shutdown
immediately.
■ post_checkpoint_notify.POLICY
■ bpend_notify.POLICY
/usr/openv/netbackup/ext/db_ext/oracle/bin/setup_bli_scripts
/usr/openv/netbackup/ext/db_ext/oracle/samples
When you run setup_bli_scripts you need to supply the following information:
■ Identify the POLICY_IN_CONTROL
See “Identify the POLICY_IN_CONTROL for BLI backups” on page 267.
■ Provide the Oracle environment variables
See “Oracle environment variables for BLI scripts” on page 267.
■ Select a backup method
■ Notify scripts for other policies
See “About BLI notify scripts for other policies” on page 268.
See the information about how to use the notify scripts to back up your Oracle
database.
ORACLE_INIT Path name for the Oracle startup parameter file (INIT.ORA). If
you are using an Oracle SPFILE as your parameter file, do not
set the ORACLE_INIT environment variable.
ORACLE_CONFIG Path name for the Oracle configuration file (CONFIG.ORA). Some
database configurations use the CONFIG.ORA file to specify
values for the database parameters that usually do not change.
The CONFIG.ORA file can be called by the INIT.ORA file using
an include statement.
#/usr/openv/netbackup/ext/db_ext/oracle/bin/setup_bli_scripts
The default "connect" statement that will be used to connect to the database is:
"connect / as sysdba"
Would you like to modify the connect and use a specific login? (y/n) n
Please enter the Oracle instance (ORACLE_SID) you want to back up? orac901
To back up a copy of the Oracle control file, you need to specify a file
path where Oracle can write a copy of the control file.
Please enter the file path where Oracle is to write a copy of your
control file? /dbhome/oracle/orac901/admin/orac901/pfile/cntrlorac901.ora
To back up the Oracle archive logs, you need to specify their location.
You now need to decide on how many NetBackup policies you will have
backing up simultaneously. The first one you enter will be known
as the POLICY_IN_CONTROL in the scripts and will perform any needed
DB operations. When you create the policies on the NetBackup server,
you will have to divide the filesystems between these policies.
Please enter the name of the policy that will be the POLICY_IN_CONTROL? BLI_1
Please enter the name of another policy or DONE to stop? BLI_2
Please enter the name of another policy or DONE to stop? BLI_3
Please enter the name of another policy or DONE to stop? BLI_4
Please enter the name of another policy or DONE to stop? BLI_5
Please enter the name of another policy or DONE to stop? BLI_6
Please enter the name of another policy or DONE to stop? DONE
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 271
Performing backups and restores
Note: You must be the root user to perform all operations using the BLI backup
software.
Note: You must be the root user to perform all operations using the BLI backup
software.
Note: For HP-UX PA-RISC checkpoints to unmount and be cleaned up, create touch
file /usr/openv/netbackup/AIO_READS_MAX that contains the value 1.
HP-UX PA-RISC checkpoints may not be unmounted on Oracle database agents.
Note: You must be the root user to perform all operations using the BLI backup
software.
Note: For HP-UX PA-RISC checkpoints to unmount and be cleaned up, create touch
file /usr/openv/netbackup/AIO_READS_MAX that contains the value 1.
To perform a cold (offline) backup, set the environment variable METHOD in the
bpstart_notify script on the client to SHUTDOWN_BKUP_RESTART. The
bpstart_notify script shuts down the database before the backup begins and
the bpend_notify script restarts the database after the backup completes.
To perform a hot (online) backup using Fulldata Storage Checkpoints, make sure
the database is running in ARCHIVELOG mode and set the variable METHOD to
272 Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems
Performing backups and restores
Note: You must be the root user to perform all operations using the BLI backup
software.
For example:
ls -la /db02
total 2192
drwxr-xr-x 2 root root 96 Jan 20 17:39 .
drwxr-xr-x 9 root root 8192 Jan 20 17:39 ..
-rw-r--r-- 1 oracle dba 1048576 Jan 20 17:39 .cust.dbf
lrwxrwxrwx 1 oracle dba 22 Jan 20 17:39 cust.dbf ->\
.cust.dbf::cdev:vxfs:
The preceding example shows that you must include both the symbolic link
cust.dbf and the hidden file .cust.dbf in the backup file list.
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 273
Performing backups and restores
If you want to back up all Quick I/O files in a directory, you can simplify the process
by only specifying the directory to be backed up. In this case, both components
of each Quick I/O file is properly backed up. In general, you should specify
directories to be backed up unless you only want to back up some, files in those
directories.
Note: For HP-UX PA-RISC checkpoints to unmount and be cleaned up, create touch
file /usr/openv/netbackup/AIO_READS_MAX that contains the value 1.
For AIX, the restore destination can be a VxFS or JFS file system. The destination
file system does not need to support the Storage Checkpoint feature to restore
files. However, a VxFS file system with the Storage Checkpoint feature is required
to perform BLI backups of the restored data.
Note that restoring a file causes all blocks in that file to be rewritten. Thus, all
the blocks in the file are considered to have been modified. Thus, the first
subsequent differential incremental backup and all subsequent cumulative
incremental backups back up all of the blocks in the restored file. If you are
restoring an entire database or a file system, the first subsequent backup backs
up all blocks that are restored.
To restore a Quick I/O file, if both the symbolic link and the hidden file already
exist, NetBackup restores both components from the backup image. If either one
of the two components is missing, or both components are missing, NetBackup
creates or overwrites as needed.
Oracle database recovery might be necessary after restoring the files. See the
Oracle documentation for more information on doing database recovery.
NetBackup progress For user-directed backups and restores performed with Backup, Archive, and Restore
logs interface, the most convenient log to use for NetBackup is the progress log. The progress
log file is written to the user's home directory, by default in
/usr/openv/netbackup/logs/user_ops/username/logs. This log indicates whether
NetBackup was able to complete its part of the operation. You can view the progress log
from the Backup, Archive, and Restore interface, or you can use a file editor such as vi(1).
NetBackup debug logs The NetBackup server and client software provide debug logs for troubleshooting problems
that occur outside of BLI backups. To enable these debug logs on the server or client, create
the appropriate directories under the following directory:
/usr/openv/netbackup/logs
For more information on debug logs, see the NetBackup Troubleshooting Guide or see the
/usr/openv/netbackup/logs/README.debug file.
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 275
About troubleshooting backup or restore errors
NetBackup reports In addition to logs, NetBackup provides a set of reports that help isolate problems. One
report is All Log Entries on the server. For a description of all reports, see the NetBackup
Administrator’s Guide, Volume I.
of the backup images because a full backup of the affected file system occurs
after the condition is fixed.
■ If an incremental backup is intended, but the whole file system is backed up
instead, one of the following conditions might be present:
■ Storage Checkpoints that keep track of changes have been removed
■ The Block level incremental attribute is not selected
■ Other errors with a nonzero status code
The most common cause of this problem is the file system removed the Storage
Checkpoint that keeps track of the block changes. This action might occur if
the file system runs out of space, and there are no volumes available to allocate
to the file system. The integrity of the backup images is not affected, because
a full backup of the file system occurs at the next backup opportunity after
NetBackup detects that a Storage Checkpoint is missing.
This indicates that there was an attempt to back up a file system that is not a
VxFS file system with the Block level incremental attribute. This error can
also occur if the file system is not mounted.
■ Status Code 73. bpstart_notify failed.
When running the notify scripts, the bpstart_notify script exited with a
nonzero status code, or the permission bits are set wrong on the
bpstart_notify script. The script must have execute permission. If the
permission bits are set, check the bpstart_notify_output.ORACLE_SID file
in the /usr/openv/netbackup/bin/BLOCK_INCR directory.
■ Status Code 74. Client timed out waiting for bpstart_notify to complete.
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 277
About troubleshooting backup or restore errors
■ About the environment variables set by a user in the XML export parameter
file
Table F-1 NetBackup for Oracle XML export and XML import archiving features
Feature Description
System- and NetBackup for Oracle uses the eXtensible Markup Language (XML)
database-independent standard to represent relational database table data that is
archive format extracted from an Oracle database.
Self-identifying The XML Schema standard is used to describe the table data that
archive format is 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.
Command line Parameter files specify the table data to include in an archive and
interfaces that allow the table data to extract from an archive for import into an Oracle
export and import at database.
row-level granularity
Restore destination NetBackup for Oracle can either restore XML data to an operating
option system directory or import the data back into the Oracle database.
Flexible archive image The NetBackup catalog contains information on the contents of
searches the archive that can be searched by using flexible search criteria,
such as tablename or user.
Command line 1
2 3
Query processor Oracle DBMS
5
XML generator
OS Directory
NetBackup
Activity Process
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 storage unit
282 XML Archiver
NetBackup for Oracle XML export and XML import
Activity Process
XML export NetBackup for Oracle converts Oracle table data to XML
format (XML schema, or metadata, and XML instance, or
data).
Oracle DBMS
Query processor
OCI
Script or template
Command line
(bporaexp)
Backup, archive, and restore
(Parameter file) 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:
■ The NetBackup for Oracle script or template calls the bporaexp utility with a
specified parameter file.
■ The query processor uses the parameters in the specified file to build an SQL
query for each table.
■ Oracle’s OCI API executes the queries on the Oracle instance to be archived.
284 XML Archiver
NetBackup for Oracle XML export and XML import
■ The query processor passes the output (including metadata and data for a
single table or multiple tables) to the XML Generator.
■ For each table passed, the XML generator builds one or more sets of XML
schema and XML instance documents.
■ XML data streams are backed up by NetBackup.
■ Alternately, bporaexp allows the files to be saved to an operating system
directory.
OS Directory
Restore NetBackup
XML
export
XML Format
OS Directory
Activity Process
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.
Activity Process
bporaimp/bporamip64 NetBackup for Oracle’s XML import utility can parse the
commands XML-formatted data for re-insertion into the database or
can redirect the data to an OS directory.
Option to
restore XML
files on disk
Archive name
Table(s) metadata,
Table(s) data Keyword
Table name
Script or template
OCI XML data loader (bporaimp)
Oracle DBMS
(Parameter file)
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.
286 XML Archiver
About the environment variables set by a user in the XML export parameter file
NB_ORA_POLICY Specifies the name of the policy to use for the Oracle backup.
To define NB_ORA_POLICY, use the RMAN PARMS
statement or send statement in Oracle shell scripts. For
example:
Creating XML export templates using the NetBackup for Oracle wizard
(UNIX)
NetBackup for Oracle provides a wizard that solicits information about desired
XML export operations. The wizard uses the information to create a template that
288 XML Archiver
About XML export templates and shell scripts
Creating XML export templates using the NetBackup for Oracle wizard
(Windows)
NetBackup for Oracle provides a wizard that solicits information about desired
XML export operations. The wizard uses the information to create a template that
can be run immediately or saved in a NetBackup-specific location on the current
master server for later use.
To create XML export templates by using the NetBackup for Oracle wizard
1 Open the Backup, Archive, and Restore interface.
See “Starting the NetBackup Backup, Archive, and Restore interface”
on page 100.
2 Choose File > Select Files and Folders to Backup.
3 In the left pane, expand the Oracle node.
Select a node in the left pane to view its details in the right pane.
4 (Optional) Enter your Oracle database logon User name and Password with
SYSDBA privileges.
Perform this step if your current logon does not have Oracle SYSDBA
privileges.
Optionally, also enter your Net service name (TNS alias).
5 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 logon display.
6 Expand the User list to the schema owners of the objects to export.
7 In the right pane, select the Oracle objects to export.
8 Choose Actions > Backup 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
that you want:
■ Welcome
■ Target Database Logon Credentials
■ Configuration Options
■ Archive Export Options
■ NetBackup Archive Destination Options
290 XML Archiver
About XML export templates and shell scripts
If you need an explanation of any of the fields on the wizard screens or more
details, click Help on the wizard screen.
9 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, to run, or to save and run the template, click Finish.
where:
-t templ_name.tpl Specifies the name of the template file name that you
want to use as the basis for the script. Make sure that
the template exists. bpdbsbora retrieves XML export
templates from a known location on the master server,
so specify only the template file name.
install_path\NetBackup\dbext\Oracle\samples\bporaexp
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp
■ For import:
Windows:
install_path\NetBackup\dbext\Oracle\samples\bporaimp
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp
The example export scripts that are installed in bporaexp are as follows:
Windows:
data_archiver_export.cmd
UNIX:
data_archiver_export.sh
data_archiver_export64.sh
bporaexp_help.param
bporaexp_partitions.param
bporaexp_table_to_files.param
bporaexp_tables.param
bporaexp_tables_rows.param
The example import scripts that are installed in bporaimp are as follows:
Windows:
data_archiver_import.cmd
UNIX:
data_archiver_import.sh
292 XML Archiver
Performing an XML export archive
data_archiver_import64.sh
bporaimp_archive.param
bporaimp_archive_schema_to_files.param
bporaimp_archive_to_users.param
bporaimp_bfile_table.param
bporaimp_help.param
bporaimp_ignore_rows_table.param
bporaimp_large_table.param
bporaimp_list.param
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
Automatic backup of an As with Oracle backups using RMAN, the most convenient way to create Oracle archives
Oracle policy that consist of XML exports of data from your database is to set up schedules for automatic
backups. The Oracle policy runs NetBackup for Oracle templates or shell scripts. For a
backup using RMAN, a backup template is used, and for an XML export, an XML export
template is used.
When the NetBackup scheduler invokes a schedule for an automatic backup, the NetBackup
for Oracle XML export templates or shell scripts run as follows:
The NetBackup for Oracle XML export template or shell scripts start the XML export by
running the NetBackup bporaexp or bporaexp64 utility.
Manual backup of an The administrator can use the NetBackup server software to manually run an automatic
Oracle policy backup schedule for the Oracle policy. For more information, see the NetBackup
Administrator’s Guide, Volume I.
See “Testing configuration settings for NetBackup for Oracle” on page 109.
User-directed XML The following sections describe procedures for performing user-directed XML exports.
exports from the client
■ Running NetBackup for Oracle XML export templates.
See “Running NetBackup for Oracle XML export templates” on page 293.
■ Using bpdbsbora to run an XML export template.
See “Using bpdbsbora to run an XML export template” on page 294.
■ Running the NetBackup for Oracle XML export script on the client.
See “Running the NetBackup for Oracle XML export script on the client” on page 295.
■ Running bporaexp on the client as an Oracle user.
See “Running bporaexp on the client as an Oracle user” on page 296.
■ Writing to a directory versus writing to a storage unit.
See “Writing to a directory versus writing to a storage unit” on page 296.
■ bporaexp parameters
See “About bporaexp parameters” on page 298.
Where:
XML Archiver 295
Performing an XML export archive
-t templ_name.tpl Specifies the name of the template file that you want to use.
bpdbsbora retrieves the XML export templates from a known
location on the master server, so specify only the file name.
For example:
Running the NetBackup for Oracle XML export script on the client
You can initiate a database XML export from the operating system command
prompt: Type the full path to the shell script that performs the export. For example:
Windows:
install_path\oracle\scripts\data_archiver_export.cmd
UNIX:
/oracle/scripts/data_archiver_export.sh
The operating system shell starts the database XML export archive by running
the XML export script. The XML export script contains commands to run bporaexp.
The NetBackup for Oracle installation script installs sample scripts in the following
location:
Windows:
install_path\NetBackup\dbext\oracle\samples\bporaexp
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp
296 XML Archiver
Performing an XML export archive
3 Configure the runtime environment, because this method does not call the
full script that includes the runtime configuration.
On UNIX and Linux, check the sample scripts for runtime environment details.
See “About configuring the run-time environment” on page 93.
bporaexp creates a set of XML schema and instance documents that can be used
to archive Oracle table data. For each archive, one master XML schema (.xsd)
document is generated. In addition, bporaexp generates a table-specific schema
(.xsd) document and a table specific instance (.xml) document for each table.
Additional files are created if the table contains LONG or LOB columns.
See “Performing an XML export archive” on page 292.
DIRECTORY=\db\netbackup\xml
UNIX:
XML Archiver 297
Performing an XML export archive
DIRECTORY=/db/netbackup/xml
Table F-6 shows the files NetBackup creates when you run the command.
File Content
UNIX: /db/netbackup/xml/test1/USER1/TEST1.xsd
UNIX: /db/netbackup/xml/test1/USER1/TEST1.xml
If the DIRECTORY parameter is not specified, NetBackup writes the backup images
to a storage unit. A NetBackup backup set is created and cataloged under the
name:
Windows:
\Oracle\XMLArchive
UNIX:
/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:
Windows:
\Oracle\XMLArchive\test1\test1.xsd
\Oracle\XMLArchive\test1\USER1\TEST1.xsd
\Oracle\XMLArchive\test1\USER1\TEST1.xml
UNIX:
/Oracle/XMLArchive/test1/test1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xml
298 XML Archiver
Performing an XML export archive
NAME Y no default The name of the master XML schema file. Directory
NB_ORA_SERV N default master Optionally specifies the name of the Storage Unit
server NetBackup master server.
NB_ORA_CLIENT N default client Optionally specifies the name of the Storage Unit
NetBackup for Oracle client.
NB_ORA_POLICY N default Oracle Optionally specifies the name of the Storage Unit
policy NetBackup for Oracle policy.
NB_ORA_SCHED N default backup Optionally specifies the name of the backup Storage Unit
policy policy schedule to use.
schedule
ROW_BUFFER N 1000 Specifies the size, in rows, of the buffer used Directory
to fetch rows. Tables with LONG columns are
fetched one row at a time. The maximum
value allowed is 32767.
TABLES Y no default Lists the table names, view names, and Directory
partition names to export. The USERID must
have SELECT privilege on the tables and
views. The syntax used is:schema.table:
partition name or schema.view name
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.
For example, assume you named the list parameter file bporaimp_list.param.
At the command prompt, type the following:
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.
The following UNIX or Linux example uses bplist to search all Oracle archives for
a client named jupiter. The sample output is produced for two archives, test1
and little_sales, where each archive has one Oracle table (test1 has
USER1.TEST1 and little_sales has USER1.LITTLE_SALES).
/Oracle/XMLArchive/little_sales/little_sales.xsd
/Oracle/XMLArchive/little_sales/USER1/LITTLE_SALES.xsd
/Oracle/XMLArchive/little_sales/USER1/LITTLE_SALES.xml
/exb_n2bm5bco_1_1392342936
/exb_mabm02ko_1_1392170136
/exb_lqbltds6_1_1392083334
The following Windows example uses bplist to search all Oracle archives for a
client named jupiter. The sample output is produced for one archive, test.
scheduled. Typically, you run an XML import template immediately and then
delete it.
The restore process requires a password for Oracle database access. Templates
store encrypted passwords that are decrypted at runtime.
To start the XML import wizard
1 Start the NetBackup Backup, Archive, and Restore interface.
On UNIX and Linux, from the command line, run the following command:
/usr/openv/netbackup/bin/jbpSA &
4 Expand the Oracle node in the left pane to view an Oracle instance hierarchy
in the right pane.
To use the XML import wizard
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.
4 Choose Actions > Restore.
5 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:
XML Archiver 305
Restoring an XML export archive
■ Welcome
■ Target Database Logon Credentials
■ Archive Import Options
■ NetBackup Archive Source Options
■ NetBackup Import Destination Options (Windows)
If you need an explanation of any of the fields on the wizard screens, or more
details, click Help on the wizard screen.
6 Review the summary.
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.
See “About storing templates” on page 107.
where:
-t templ_name.tpl Specifies the full path name of the template you want to use.
For example:
306 XML Archiver
Restoring an XML export archive
Windows:
UNIX:
install_path\oracle\scripts\data_archiver_import.cmd
UNIX:
/oracle/scripts/data_archiver_import.sh
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
(bporaimp64 on some platforms).
The NetBackup for Oracle installation script writes sample scripts to the following
location:
Windows:
install_path\NetBackup\dbext\oracle\samples\bporaimp
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp
ARCHIVE_DATE_FROM N no default Optionally specifies a start date for the archive Storage Unit
to be imported. Used with ARCHIVE_DATE_TO
to specify a range. If not used, the most recent
archive is imported. If the range used results
in more than one archive, the most recent from
the range is used. The date format is
mm/dd/yyyy [hh:mm:ss].
ARCHIVE_DATE_TO N no default Optionally specifies an end date for the archive Storage Unit
to be imported. Used with
ARCHIVE_DATE_FROM to specify a range. If
not used, the most recent archive is imported.
If the range used results in more than one
archive, the most recent from the range is
used. The date format is mm/dd/yyyy
[hh:mm:ss].
308 XML Archiver
Restoring an XML export archive
BFILE_DIRECTORY Y (if any no default Specifies a directory for the output of any Directory
table being BFILE columns being imported. Oracle’s
imported CREATE DIRECTORY command can be used
has BFILE to create the DIRECTORY in Oracle, and the
columns) name should match the name used in the
export file.
NAME Y no default The name of the master XML schema file. This Directory
parameter is required if LIST = N.
NB_ORA_SERV N default Optionally specifies the name of the NetBackup Storage Unit
master master server.
server
310 XML Archiver
Restoring an XML export archive
NB_ORA_CLIENT N default Optionally specifies the name of the NetBackup Storage Unit
client for Oracle client.
RESTORE_TO_DIRECTORY N no default Optionally specifies a directory for the output Storage Unit
of the bporaimp utility. If used, the XML data
is not parsed and inserted into Oracle.
ROW_BUFFER N 1000 Specifies the size, in rows, of the buffer used Directory
to insert rows. Tables with LONG or LOB
columns are inserted one row at a time. The
maximum value allowed is 32767.
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. Any user who belongs to the database group that performed
the backup can restore it, unless the BKUP_IMAGE_PERM variable is set to USER.
nb_ora_serv = NetBackup_server
nb_ora_client =
original_client_where_XML_export_occurred.
install_path\NetBackup\db\altnames\saturn
UNIX:
/usr/openv/netbackup/db/altnames/saturn
NAME = sales
NB_ORA_SERV = jupiter
NB_ORA_CLIENT = jupiter
USERID = orauser/orapasswd
Examine these logs for messages that show how to determine the source of
an error.
These logs are written by the NetBackup client and contain the following:
■ Requests from bporaexp and bporaimp
■ Activities between bporaexp and bporaimp and NetBackup processes
If the logs do not contain any messages, the following conditions could be
present:
■ bporaexp or bporaimp terminated before requesting service from
NetBackup.
■ bphdb (if started by the scheduler or graphical user interface) did not start
the template or shell script successfully. Check the bphdb logs for stderr
and stdout files.
Try to run the XML export or XML import template or script file from the
command line to determine the problem.
On UNIX, the error is usually due to a file permission problem for bphdb itself
or for the export or import script file.
Ensure that the full XML export or import script file name is entered correctly
in the Backup Selections list of the Oracle policy configuration, or for
templates, that the name is correct.
On UNIX, logs are not created in this directory if the permissions are not set
for the Oracle user to write to the directory. The full permissions setting,
chmod 777, is best.
XML Archiver 315
Troubleshooting XML export or XML import errors
For more information about debug logs and reports, refer to the NetBackup
Administrator’s Guide, Volume I.
The following explains the sequence of events for an action that bporaexp or
bporaimp initiates in NetBackup mode. This situation occurs when DIRECTORY is
not specified in the bporaexp or bporaimp command’s parfile. It suggests
solutions for the problems that can occur at each point in the sequence.
To troubleshoot by stage
1 bporaexp or bporaimp starts.
■ Using a template that is run from the NetBackup client GUI or bpdbsbora.
■ Manually from the NetBackup Administration Console on the master
server.
■ Automatically by an automatic export schedule.
If an error occurs now, check the bporaexp or bporaimp log.
2 bporaexp or bporaimp verifies its environment and then connects to Oracle
and NetBackup.
An Oracle environment problem, a database problem, an incorrect user ID,
or an incorrect password can cause Oracle connect errors.
A NetBackup error now is usually due to a problem with client and server
communication. Check the messages in the bprd and bpcd logs for clues.
Also verify the bp.conf entries on the UNIX or Linux client.
3 bporaexp or bporaimp issues a backup or restore request.
install_path\NetBackup\logs\bporaexp\log.mmddyy
UNIX:
/usr/openv/netbackup/logs/bporaexp/log.mmddyy
If the bprd process failed, check the bprd and bpbrm logs.
During this sequence, most failures occur because of incorrect NetBackup
server or Oracle policy configuration parameters.
NetBackup can usually select the correct Oracle policy and schedules.
However, NetBackup can select a policy or schedule in error if there are several
Oracle policies in its database.
In Windows, 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
In UNIX, try setting the SERVER and POLICY values in the bp.conf file on the
client or by setting the following bporaexp parameters:
NB_ORA_POLICY=policyname
NB_ORA_SCHED=schedule
XML Archiver 317
Additional XML export and import logs
NB_ORA_SERV=NetBackup_server
NB_ORA_CLIENT=NetBackup_client
install_path\NetBackup\logs\bporaimp\mmddyy.log
UNIX:
/usr/openv/netbackup/logs/bporaimp/log.mmddyy
Make sure that the correct NetBackup server and NetBackup client values
are used by setting the following bporaimp parameters:
NB_ORA_SERV=NetBackup_server
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.
bporaimp uses the reverse process. 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.
When bporaexp and bporaimp are used and the backup images are written to a
storage unit, these errors are also logged in the NetBackup debug logs. These logs
appear in the following directories:
Windows:
install_path\NetBackup\logs\bporaexp
install_path\NetBackup\logs\bporaimp
/user/openv/netbackup/logs/bporaexp
/user/openv/netbackup/logs/bporaimp
When you use bporaexp and bporaimp and the backup images are written to an
operating system directory, the file that is specified by the LOG= parameter is the
only source of error logging and tracing.
Index
I N
IGNORE_ROWS 309 NAME 299, 309
INIT.ORA 268 NB_ORA_CLIENT 286, 298–299, 301, 307, 310
installation NB_ORA_COPY_NUMBER 97
adding a license key 39 NB_ORA_POLICY 287, 298–299
prerequisites for clusters 38 NB_ORA_SCHED 287, 298–299
requirements for NetBackup servers 38 NB_ORA_SERV 286, 298–299, 301, 307, 309
instance group NB_PC_ORA_RESTORE variable 166
adding an instance 66 nbjm scheduling process 197
automatic registration 67 nbpem scheduling process 197
instant recovery nbrb scheduling process 197
configuration requirements 159 NetApp
overview 148 number of snapshots per volume 178, 183
policy configuration 159 NetBackup
restore method 164 Client Service log on account configuring 108
see Snapshot Client 148 logs and reports 274
mode 298
J server and client requirements 38
Nodata Storage Checkpoint 257
jbpSA 304
K O
offhost backup. See Snapshot Client
KEYWORD 299, 302, 309
configuring 162
overview 148
L Oracle
libobk environment variables 267
shared library module 191 Intelligent Agent 266
license keys 39 policy for snapshot backups
Oracle Intelligent Policy 176
322 Index
T X
tab XML
Backup Selections tab 80 archiving features 280
Instances tab 78 export 282
Oracle tab 81 Export Wizard 288
TABLES 300, 302, 310 import 284
templates Import Wizard 304
administration 293 instance 282–283, 285, 296
advantages over scripts 86 schema 280, 283, 285, 296
creating for XML export 287, 289
overview 19
XML export 287
testing policy configuration 109
timeout failures
minimizing 205
TNS_ADMIN
automatic registration 67
manually adding instance 60
registering an instance 63
TOUSER 310