Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 50 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
50
Dung lượng
1,15 MB
Nội dung
168 Part II: Setup Principles and Practices
from the RMAN repository, RMAN sends the request to NetBackup to delete the corresponding
images from its repository, regardless of the retention level. The code for deleting expired backups
is shown next:
RMAN> allocate channel for maintenance type 'SBT TAPE';
RMAN> crosscheck backup;
RMAN> delete expired backup;
The crosscheck command should be used only in cases where files marked with the status
“Available” that no longer exist can be expired and marked deleted. RMAN should control the
retention using the following command. If you configure the channel with the tape parameters,
there is no need to allocate channels. This feature is available in Oracle 9i Database and newer
versions.
RMAN> allocate channel for maintenance type 'SBT TAPE';
RMAN> delete noprompt obsolete;
RMAN Sample Scripts
Something particularly clever about the NetBackup for Oracle agent installation is that it includes
RMAN backupand recovery sample scripts that are pre-instrumented (that is, they already include
code snippets or templates) with code for using NetBackup. Look for the sample scripts in
/<install_path>/netbackup/ext/db_ext/oracle/samples/rman.
These sample scripts will be included:
cold database backup.sh
hot database backup proxy.sh
cold duplex database backup full.sh
hot tablespace backup.sh
database restore.sh
hot tablespace backup proxy.sh
hot database backup.sh
pit database restore.sh
New scripts can be generated from the Administration Console. For anyone who has suffered
through the time-consuming effort of trying to locate elusive punctuation errors, these scripts
come as a pleasant surprise.
The following is an RMAN code snippet for calling NetBackup:
rman target / catalog <user>/<password>@rman cat db log <my output.log>
run
{
allocate channel t1 type 'SBT TAPE'
parms "ENV (NB ORA SERV <storage server>,
NB ORA POLICY RMAN DEFAULT, NB ORA CLIENT <db server>)";
backup database format 'db %d%U%t'
}
The NetBackup Administrator’s Guide recommends adding a %t at the end of the format
string, since NetBackup uses a timestamp as part of its search criteria for catalog images. You
can also do this by using configure.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Chapter 7: Enhancing RMAN with VERITAS NetBackup for Oracle 169
The following is an RMAN code snippet for calling NetBackup that uses configure
commands:
rman target / catalog <user>/<password>@rman cat db log <my output.log>
rman> CONFIGURE CHANNEL DEVICE TYPE 'SBT TAPE' PARMS
'SBT LIBRARY /<install path>/netbackup/bin/libobk.so64.1,
ENV (NB ORA SERV <storage server>, NB ORA POLICY <policy name>,
NB ORA CLIENT <db server>)';
rman> CONFIGURE DEVICE TYPE 'SBT TAPE' FORMAT 'db %d%U%t'
rman> backup database;
Troubleshooting
Inevitably, something will break in the environment. Knowing how to prioritize problems in
advance helps to resolve them more smoothly. This section highlights steps to help troubleshoot
issues.
The following are general troubleshooting steps to take:
1. Verify Oracle agent installation by making sure that the proper libraries exist in /<install_
path>/netbackup/bin. Refer to Table 7-2 earlier in the chapter to determine which library
(for example, libobk.a) corresponds to your operating system.
2. Check the database server (client) to ensure that the bphdb executable exists. This is used
by both the NetBackup scheduler and the GUI to start backups.
3. Check that the following executables exist:
/<install_path>/netbackup/bin/bpdbsbora
/<install_path>/netbackup/bin/bpubsora
/<install_path>/lib/libdbsbrman.so
/<install_path>/lib/libnbberman.so
4. Check that the following /<install_path>/netbackup/logs directories exist with
777 permissions:
On the database server (client): bpdbsbora, dbclient, bphdb, and bpcd
On the master server: bprd and bpdbm
On the media server: bpbrm and bptm
Use NetBackup Logs
NetBackup generates logs for backupand restore operations. These logs can be used to investigate
media manager problems, but RMAN errors will be written to the RMAN logs. There are two
types of NetBackup logs:
Progress logs Located in /<install_path>/netbackup/logs/user_ops/username/logs, these
logs are generated for any backup or restore operations. These files can sometimes be
large and cumbersome. They contain sizable amounts of data. The key here is knowing
■
■
■
■
■
■
■
■
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
170 Part II: Setup Principles and Practices
how to extract the data you need. There are basically two error types, numbers 16 and
32; 16 is an error failure and 32 is a critical failure. The best way to find them is to search
the log files for <16> and <32>.
Debug logs Each debug log corresponds to a NetBackup process and executable. When
debugging is turned on, the logs are written to /<install_path>/netbackup/logs. These logs
can grow quickly in size, so use debugging only when necessary.
To enable logging on the database server (client), modify the /<install_path>/netbackup/
bp.conf file with this line:
VERBOSE #
# is a value of 1 to 5 to indicate the level of logging. Keep in mind that a higher value
generates a lot of information and could cause the directory to run out of space.
NOTE
Make sure that the debug file permissions are set to 777. Verify that
libobk is linked properly if log files are not being created.
Determine Which Library Is in Use
Find out which NetBackup library is interfacing with Oracle:
ls -l $( echo $LD LIBRARY PATH | sed -e "s/:/ /g")/libobk* | grep libobk
Security Best Practices
Since the NetBackup software runs in a networked environment, it is susceptible to vulnerabilities
such as denial of service attacks. To prevent these situations from happening, the following best
practices are recommended by Veritas, which is now Symantec:
Allow administrative access to privileged users only.
Allow remote access only from trusted servers.
Apply the latest patches.
Install NetBackup behind a firewall.
Ensure virus protection is running on the servers.
Monitor network traffic for malicious activity.
Block external access to the default ports used by NetBackup.
NetBackup server and clients should face toward the internal network.
■
■
■
■
■
■
■
■
■
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Chapter 7: Enhancing RMAN with VERITAS NetBackup for Oracle 171
Cost Justification
It’s not always easy to justify the costs of purchasing expensive software and licenses for an
information technology department, which is traditionally considered to be a non-revenue
generating part of an organization. This section provides some ideas for demonstrating to
management the value of purchasing VERITAS NetBackup for Oracle.
The NetBackup for Oracle software extends the capabilities of RMAN. Since the software
allows RMAN to speak directly to storage servers, it automates processes that would otherwise
be done by people. It shortens backupand recovery time by eliminating some steps altogether
and by cutting out process variation. Essentially, this translates into better overall application
performance (since backups take less time), reduced business outages during recovery events,
more error-free recoveries, and greater productivity of database and storage administrators.
The NetBackup software could easily pay for itself during just one significant business outage
where productivity and revenue are negatively impacted.
Summary
We have explored how NetBackup software is used to facilitate a networked backupand recovery
environment. We outlined the ways in which it extends existing RMAN functionality. We described
how to configure each layer for direct component communication, which eliminates the need for
manual intervention. We discovered that using NetBackup to enhance RMAN results in faster
backup and recovery, reduced process variation, and shorter business outages during recovery
events. NetBackup for Oracle software has been thoughtfully developed for those of us who are
excited about easily deployed and feature-rich backupand recovery solutions.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
This page intentionally left blank
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER
8
Configuring HP Data
Protector for Oracle
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
174 Part II: Setup Principles and Practices
n large environments, it’s hard for database administrators to schedule, manage,
monitor, and report all database backups centrally. Another challenge for DBAs
is managing the backup media: setting the protection, monitoring the usage, and
checking on the backup history. For HP customers, using a backup user interface
with RMAN such as HP Data Protector overcomes all these issues.
This chapter begins with a discussion of the integration between OracleRMANand HP Data
Protector. It then describes the configuration of Oracle backups with Data Protector. You will
learn how to back up and restore an Oracle database with Data Protector. Finally, you will learn
how to set up synchronization between OracleRMAN Metadata and Data Protector Media
Management Database.
Integration of Oracleand Data Protector
You must properly integrate Oracleand Data Protector in order to run successful backup/restore
operations. To integrate them, therefore, you’ll now learn about the support matrix and the
integration components, and do a workshop on integration configuration.
Support Matrix
HP Data Protector A.06.00 supports Oracle11g Recovery Manager on the following operating
systems:
Oracle 11g 64-bit Oracle11g 32-bit
HP-UX 11.23 (64-bit) (Itanium and PA-RISC)
HP-UX 11.31 (64-bit) (Itanium and PA-RISC)
Solaris (Sparc) 9, 10 (64-bit) (x86 and x64)
Oracle Enterprise Linux 4.0, 5.0 (64-bit) (x64)
Oracle Enterprise Linux 5.3 (64-bit)
Red Hat Enterprise Linux 3.0, 4.x, 5.x (x64)
SuSE Linux Enterprise Server 9, 10 (x64)
Windows Server 2003 (x64)
Windows Server 2008 (32-bit) (64-bit)
AIX 5.x, 6.1
SuSE Linux Enterprise Server 9 and 10
Red Hat Enterprise Linux 3.0, 4.x, 5.x
Oracle Enterprise Linux 4.0, 5.x (32-bit)
Windows Server 2003 (32-bit)
Integration Components
For Oracleand Data Protector integration, RMANand the Data Protector Oracle Integration
software work together to accomplish backup, copy, restore, recovery, and duplication operations.
The Data Protector Oracle Integration agent uses the information in the recovery catalog or
in the control file to determine how to execute the requested backupand restore operations. By
using this integration, you can perform Oracle full and incremental (up to incremental level 4)
backups. Oracle incremental backups can be differential or cumulative. By default, Data Protector
performs Oracle differential incremental backups. By changing the default RMAN script created
by Data Protector, you can specify a cumulative backup.
I
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Chapter 8: Configuring HP Data Protector for Oracle 175
NOTE
Even if you configure an Oracle incremental backup, you won’t
see the backup definition as “incremental” in Data Protector. Data
Protector will mark it “full,” because Data Protector incremental
backup is a different concept, used on file system backups.
With Data Protector, both online and offline database backups can be performed. However,
successful backups require proper configurations. For an online database backup, the database
instance must be in ARCHIVELOG mode, and for an offline database backup, the database needs
to be prepared for backup with the Pre-exec and Post-exec options in the backup specification.
You can use these options for shutting down the database or making a tablespace offline before
backup, and then reverse operations after backup.
Figure 8-1 shows the general architecture of Oracleand Data Protector integration.
Data Protector User Interface
Data Protector Cell Manager
IDB
Ob2rman.pl
DP backup
specification
SM
Devices
Media Agent Clients
ORACLE
Data Protector MML
RMAN
Datafiles Control files
Archived logs
Oracle Server
Executables
Backup API
RMAN
Recovery
Log
MA
Data
Control
FIGURE 8-1 Integration architecture of Oracleand Data Protector
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
176 Part II: Setup Principles and Practices
The components of this integration, as shown in Figure 8-1, are
SM The Data Protector Session Manager, which manages the backupand restore sessions.
MA The Data Protector General Media Agent, which reads and writes data from and to media
devices.
Data Protector MML The Data Protector Oracle Integration Media Management Library, which
is a set of routines that enables data transfer between the Oracle server and Data Protector. The
Data Protector MML links Data Protector andOracle server software.
Ob2rman.pl The Data Protector Oracle Integration agent, which works with RMAN to manage
all aspects of the backup/recovery operations on the Oracle target database.
Backup API The Oracle-defined application programming interface.
IDB The Internal Database, where all the information about Data Protector sessions, including
session messages, objects, data, used devices, and media, is written.
RMAN The Oracle Recovery Manager.
RMAN WORKSHOP: Integration Configuration
Workshop Notes
To run a successful RMANbackup of an Oracle Database using Data Protector Integration,
you should have the Oracle target database mounted or opened, the recovery catalog database
configured and opened if being used, Oracle Net Services properly configured, and Data
Protector Disk Agent, Media Agent, andOracle Integration installed on the server the target
database resides on.
In this workshop, it is assumed that devices and media are ready for use, and that Data Protector
Cell Manager is installed and properly configured. HP OpenView Storage Data Protector Manager
software, which may reside in a PC, will be used to configure the integration.
Step 1. First you must install the Data Protector agent to target server.
a. Run HP OpenView Storage Data Protector Manager software and connect the Cell Manager.
b. In the Context List, select Clients, and in the Scoping Pane, right-click Clients and click
Add Clients.
c. In the Add Client Systems window, select the platform of the target server (Windows or
Unix), and choose the installation server, which can be the Cell Manager. Click Next.
d. Type the IP or host name (if it can be resolved) of the target server in the Name box and
click Add. Click Next (see Figure 8-2).
e. Select the components you want to install. For Oracle Database backups, Disk Agent,
Media Agent, andOracle Integration must be installed on the target server. Select the
components and click Finish (see Figure 8-3). After the installation completes, continue
the configuration with Step 2.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Chapter 8: Configuring HP Data Protector for Oracle 177
FIGURE 8-2 Defining client IP/host name
FIGURE 8-3 Component selection
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
[...]... select Backup in the drop-down menu 2 In the left pane, choose Backup | Backup Specifications | Oracle Server 3 Right-click the backup specification you want to start and select Start Backup Scheduling a Backup To schedule an Oraclebackup specification: 1 In the HP OpenView Storage Data Protector Manager, select Backup in the drop-down menu 2 In the left pane, choose Backup | Backup Specifications | Oracle. .. Data Protector CLI to start an interactive backup of a predefined Oraclebackup specification ■ Use Data Protector Scheduler to schedule a backup of a predefined Oraclebackup specification ■ Use either Oracle Recovery Manager or Oracle Enterprise Manager to start a backup on the Oracle server Running an Interactive Backup To start an interactive backup of an Oracle database using the Data Protector... selection is disabled, and it is only possible to browse the Source tab RMANBackup Now that you’ve integrated Oracle with Data Protector and configured an RMANbackup on Data Protector, you’ll learn how to run an RMANbackup of a Data Protector integrated Oracle database Backup Methods To start an RMANbackup of a Data Protector integrated Oracle database, you can choose from these three methods: ■ Use either... default copy group for your TDPO backups, so you set the option verdeleted as follows: TSM:SERVER1> update copygroup standard standard standard verdeleted 0 ANR2017I Administrator SERVER CONSOLE issued command: UPDATE COPYGROUP standard standard standard verdeleted 0 ANR1532I Backup copy group STANDARD updated in policy domain STANDARD, set STANDARD, management class STANDARD TSM:SERVER1> Step 8 Generate... using TSM and TDPO for backups, TDPO_NAME could be the root of why backups and restores aren’t working If backups were done with a TDPO_NODE of oc1 _oracle and then a new TDPO_NODE, oc2 _oracle, were created, and if the tdpo file were changed to use the new TDPO_NAME, RMAN would be unable to access any backups taken under oc1_ oracle until the TDPO_NODE were changed in the tdpo file to oc1 _oracle Another... RMAN script 2 RMAN contacts the Oracle server, which contacts Data Protector via the MML interface and initiates the backup 3 During the backup session, the Oracle server reads data from the disk and sends it to Data Protector for writing to the backup device 4 Messages from the Data Protector backup session and messages generated by Oracle are logged to the Data Protector database Restoring Oracle Using... Disk 1 for Oraclebackup pool /dev/sdb1 /tsm02 3.5GB Disk 2 for Oraclebackup pool /dev/sdc1 /tsm03 3.5GB Disk 3 for Oracle backup pool /dev/sdd1 /tsm04 3.5GB Disk 4 for Oracle backup pool TABLE 9-2 Raw Disks for TSM Storage Devices Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark 192 Part II: FIGURE 9-2 Setup Principles and Practices Client/TSM relationship and TSM system... Protector for Oracle 179 Other Unix ■ 32-bit ln -s /opt/omni/lib/libob 2oracle8 .so libobk.so ■ 64-bit ln -s /opt/omni/lib/libob 2oracle8 _64bit.so libobk.so If you start a backup without manually linking Oracle server software and MML as just shown, you will probably see this error message: RMAN 00571: RMAN 00569: ERROR MESSAGE STACK FOLLOWS RMAN 00571: RMAN 03009: failure of allocate command on DP TEST... Library Recovery Manager complete RMANBackup Configuration on Data Protector To configure an Oracle RMANbackup configuration on Data Protector, decide which devices, media pool, and media will be used for that backup operation Then you can create the Data Protector Oraclebackup specification Data Protector offers database backup templates that can be used when creating the backup specification You can... use RMAN CLI or Enterprise Manager to perform backups of Data Protector integrated databases To use Data Protector backup media in Oracle database backups, you must specify the channel type SBT_TAPE Backup Procedure When a backup is started with Data Protector, the following happens in the background: 1 Data Protector executes ob 2rman. pl, which starts RMAN on the client and sends the preconfigured RMAN . libob 2oracle8 .sl libob 2oracle8 _64bit.sl
HP-UX on IA-64 libob 2oracle8 .so libob 2oracle8 _64bit.so
Solaris libob 2oracle8 .so libob 2oracle8 _64bit.so
AIX libob 2oracle8 .a. Protector and configured an RMAN backup on Data
Protector, you’ll learn how to run an RMAN backup of a Data Protector integrated Oracle database.
Backup