br*tools to back up the oracle database - sap · pdf filebackup concept ... oracle real...

16
BR*Tools to Back Up the Oracle Database White Paper: Oracle Database Administration February 2012

Upload: nguyentuong

Post on 18-Mar-2018

228 views

Category:

Documents


5 download

TRANSCRIPT

BR*Tools to Back Up the Oracle Database White Paper: Oracle Database Administration February 2012

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

2

TABLE OF CONTENTS

INTRODUCTION ................................................................................................................. 3 Status ............................................................................................................................................. 3 General Information ...................................................................................................................... 3

BRBACKUP ........................................................................................................................ 5

BRARCHIVE ....................................................................................................................... 6

BRRESTORE ...................................................................................................................... 7

BRRECOVER ...................................................................................................................... 8

BACKUP CONCEPT ........................................................................................................... 9

EXTERNAL BACKUP PROGRAMS ................................................................................. 10

COMPUTING CENTER MANAGEMENT SYSTEM .......................................................... 12

ADDITIONAL FUNCTIONS ............................................................................................... 14

ADDITIONAL INFORMATION .......................................................................................... 15 SAP Library ................................................................................................................................. 15 SAP Notes ................................................................................................................................... 15

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

3

INTRODUCTION

All the business application data of the three-tiered SAP client/server system is saved in a relational database. Therefore, it is essential to perform backups regularly using an appropriate backup strategy. You need to not only regularly back up data and other components of the relational database but also profiles and SAP programs that have been changed (for example, during an upgrade).

The basic backup programs (for example, “dd,” “cpio,” “tar”) for UNIX operating systems are not optimal on their own for backing up a relational database because they do not:

Deal with special problems that may be encountered during a database backup

Provide tape management

Therefore, SAP offers its own backup programs and tools to help you easily perform complete backups of the SAP system, so ensuring smooth and trouble-free system operation.

Status

The following SAP tools are available for backing up and managing Oracle database backups:

BRBACKUP

Backup of data files, control files and online redo log files of the database

BRARCHIVE

Backup of the offline redo log file

BRRESTORE

Restore of data files, control files, online redo log files and offline redo log files

BBRECOVER

Automatic restore/recovery, disaster recovery

General Information

BRBACKUP and BRARCHIVE for backing up data are command-line programs, which you can easily schedule in the background. You can call online help when entering parameters. The messages of both programs are available in English and German.

The backups are based on the following programs:

cpio, dd in a UNIX environment (cp or dd for a disk backup). See figure “SAP – Oracle Database Backup Using cpio or dd” [page 4] below.

MKS-cpio, MKS-dd for Windows – deprecated for BRTOOLS native tape copy routines (“copy” or MKS-dd for a disk backup)

External backup programs that can be accessed using the BACKINT interface program. See graphic “SAP – Oracle Database Backup Using an External Backup Program” [page 10] below.

Oracle Recovery Manager (RMAN) on both UNIX and Windows platforms. For more information, see the documentation BR*Tools with Oracle Recovery Manager at:

www.sdn.sap.com/irj/sdn/ora SAP on Oracle Knowledge Center Key Topics Backup and Recovery

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

4

SAP – Oracle Database Backup Using cpio or dd

Data

files

Online redo

log files

Oracle Database

Control

file

Offline redo

log files

Detail

log

Summary

log

MediaMedia

cpio/ dd

serial

BRARCHIVE

BRRECOVER

BRBACKUP BRRESTORE

cpio/ dd

parallel

All actions are logged in the file system and corresponding database tables. Backup logs and profiles are always included in backups performed by BRBACKUP and BRARCHIVE.

BRBACKUP and BRARCHIVE allow extensive volume management. To use the functions provided, the volumes need to be initialized with BRBACKUP and BRARCHIVE to ensure that they include an SAP-specific label. Volumes that have not been released for use cannot be overwritten, if the retention period has not expired.

You can use query mode to find the names and number of volumes required for BRBACKUP and BRARCHIVE or BRRESTORE, without starting a backup or restore.

BR*Tools provide a complete and detailed verification to be performed when the backup is completed.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

5

BRBACKUP

The BRBACKUP tool allows an online or offline backup of the control file, of data files in individual or all tablespaces and, if necessary, of the online redo log files, as shown in the graphic “SAP – Oracle Database Backup Using cpio or dd“ [page 4] above. BRBACKUP also saves the profiles and logs relevant for the backup.

In addition to the actual backup, BRBACKUP also:

Changes the state of the database automatically, depending on the type of backup wanted (that is, online or offline)

Checks the status of files

Optimizes the data distribution on the backup media. The algorithm for distribution is specially adapted to the requirements of a database backup, that is, to backing up a small number of large files. The distribution of data depends on whether you carry out a serial or parallel backup

Performs software compression, if the option is selected

Saves to hardware compressing tape stations, taking previously determined compression rates into account

The BRCONNECT program makes sure that the database status required for the online or offline backup remains unchanged during the backup. The saving rates largely depend on the number of tape stations in use and the CPU load (particularly when software compression is used).

You can also back up any files or directories you want. However, the backup of a directory is restricted to the files it contains. This enables backups of all SAP objects that do not belong to the database (for example, programs, SAP start profiles, selected logs, and so on).

You can also perform database backups on several disks or remotely connected tape stations. BRBACKUP also supports Oracle databases on raw devices and, Oracle Real Application Cluster (RAC), and Oracle Automatic Storage Management (ASM), including Oracle database appliances like Oracle Exadata Database Machine configurations.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

6

BRARCHIVE

You can use the BRARCHIVE tool to back up the offline redo log files, that is, the online redo log files saved to the archiving directory by Oracle. For more information, see the graphic “SAP – Oracle Database Backup Using cpio or dd” [page 4] above. BRARCHIVE also saves all the logs and profiles of the backup process.

Reasons for backing up offline redo log files include the following:

In the event of a failure, a consistent database status can only be recovered, if all relevant redo log files are available.

The database system of a production SAP System has to be operated in the ARCHIVELOG mode to prevent overwriting of unsaved online redo log files. To protect the archive directory against overflowing, it has to be emptied regularly.

An online backup of data files is useless if the related redo log files are missing. Therefore, you must back up the offline redo log files generated during the online database backup immediately after running BRBACKUP.

For security reasons, BRARCHIVE offers duplicate backup of offline redo log files (redundant serial or parallel backup is possible). On the basis of the logs, BRARCHIVE can make sure that redo log files are not deleted before they have been backed up and that the same files are saved once or twice.

BRARCHIVE allows the database administrator to continually back up offline redo log files. This means that the archiving directory, where Oracle places the offline redo log files, can be kept free by continually saving and then deleting saved redo log files.

You can save offline redo log files on local or remote tape or on local or remote disk. Backup on disk is used particularly in the standby database environment.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

7

BRRESTORE

You can use the BRRESTORE tool to restore files of the following type:

Database data files, control files and online redo log files saved with BRBACKUP

Offline redo log files saved with BRARCHIVE

Non-database files saved with BRBACKUP

You can specify files, tablespaces, complete backups, log sequence numbers of redo log files, or the position of a file on tape. The BRRESTORE program automatically determines the corresponding backup tape and the position of the files needed on the tape. BRRESTORE checks whether the required free disk space is available to allow the files to be restored.

If you perform an automatic recovery with BRRECOVER, BRRESTORE is called internally to restore the files from the backup.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

8

BRRECOVER

You can use the BRRECOVER tool to help recover your database with the following functions:

Complete database recovery

Database point-in-time (PIT) recovery

Tablespace point-in-time (PIT) recovery

Whole database reset

Restore of individual backup files

Restore and application of offline redo log files

Disaster recovery

BRRECOVER recovers transactions lost since the database backup, using backups of the offline redo log files to roll forward the lost transactions. BRRECOVER supports database recovery after:

Media errors, such as a disk crash or accidental deletion of database files

User errors such as software problems or when a user accidentally drops a table

Disaster, when the entire database is lost, including backup profiles and logs

After recovery, BRRECOVER automatically rebuilds NOLOGGING indexes that were created during or after the backups used. For more information, see SAP Note 849485.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

9

BACKUP CONCEPT

Your chosen backup concept depends basically on data volumes, available hardware and tolerated downtimes in the event of an offline backup or a recovery. A reliable backup concept is essential to deal with situations such as:

Database failure due to faulty disk

Database failure due to handling errors

Resetting the database to a previous status

Disaster recovery

A possible backup strategy for the Oracle database of a productive SAP System is for example:

Complete database backup (offline) every weekend with backup verification

Complete database backup (online) daily (on working days)

Daily double backup of offline redo log files after an offline backup or directly after an online backup

Possibly an additional logical backup (using Oracle export) of the most important tables

The amount of data involved varies. It ranges from about 50 GB with little redo information to about 500 GB or more, with 10 GB redo information per day, when a production system is using OLTP processing.

Capacity planning for the future might estimate values of up to several TB data in a database, depending on the application. The backup procedure for such large amounts of data has to consider tolerated downtimes and incorporate technical strategies to ensure high availability and prevent failures. For example, you can achieve this by using an Oracle Real Application Cluster (RAC) configuration, disk mirroring with a RAID system, or having a standby database system.

Measures taken to prevent hardware failure do not help if a logical error occurs. For this reason, restoring with BRRESTORE and recovering data with BRRECOVER is just as important as the data backup with BRBACKUP and BRARCHIVE. For more information, see “Additional Information” [page 15].

We recommend that you verify backups, ideally once a week, and at least once in each tape management cycle.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

10

EXTERNAL BACKUP PROGRAMS

All SAP backup programs can call the interface program BACKINT that enables them to communicate with an external backup program, as shown in the graphic below.

SAP – Oracle Database Backup Using an External Backup Program

BACKINT BACKINT BACKINT BACKINT

BRBACKUP BRARCHIVE BRRESTORE BRRECOVER

Oracle database

SAP tool

Interface program

External backup

restore program External BACKUP server

Database files Offline redo log files

Media

BACKINT is generally implemented and sold by the vendor of the external backup program. SAP assumes responsibility for defining BACKINT and guarantees the functions related to BRBACKUP, BRARCHIVE, BRRESTORE, and BRRECOVER.

SAP has defined a BACKINT certification for external backup tools to ensure optimal functions in combination with BACKINT.

Most of the external backup programs support well-known UNIX operating systems as well as Windows on the client side.

We strongly recommend using the BACKINT solution only with certified external backup tools. The advantages of this solution are:

A uniform backup strategy for the database and the file system

Client/server backup configuration allows use of one backup server

Support of various backup media such as tape robots

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

11

The BACKINT interface provides granular (that is, dynamic) switching for the tablespace status (BEGIN-/END-BACKUP) during backup. This drastically reduces the volume of redo log information.

For a list of companies and their products supporting the BACKINT interface, see:

www.sap.com/partners

For more information on the external backup programs, contact the relevant vendor.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

12

COMPUTING CENTER MANAGEMENT SYSTEM

With the Database Planning Calendar of the Computing Center Management System (CCMS), you can schedule and start several database administration tasks and check their results. See transaction DBACOCKPIT. For example, you can start and check online or offline backups with BRBACKUP and backup of offline redo log files with BRARCHIVE, as shown in the graphic below.

CCMS – DBA Planning Calendar

CCMS lets you check the results of performed database actions by displaying the following:

Overview of all backups, the last successful, or last unsuccessful backup performed with BRBACKUP

The location and status of the redo log directory as well as the amount of free space available in the directory, the archive status of offline redo logs and BRARCHIVE action logs.

Check on the adequacy of your backups for a recovery and the backup and redo logs that are currently required to recover the database

For more information, see the graphic “CCMS – Overview of BRBACKUP or BRARCHIVE Backups” [page 13] below.

You can also display detailed information including the runtime of the actions and the amounts of data transferred.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

13

CCMS – Overview of BRBACKUP or BRARCHIVE Backups

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

14

ADDITIONAL FUNCTIONS

The following additional functions are available:

Backup of non-database files with BRBACKUP

SAP tool BRRESTORE integrated in BRRECOVER for restoring files

Verification of completed backups

Support of raw devices

Support of Oracle Storage Management (ASM)

Support of the Oracle Real Application Cluster (RAC) configuration

Support of Oracle database appliances like Oracle Exadata Database Machine

Backup of file system files with the dd command

Support of the Oracle standby database configuration

Restart for BRBACKUP and BRRESTORE.

If a backup or a restore fails, you can continue with the remaining objects. You do not have to start from the beginning. You can also use this function to assure the completeness of partial backups.

Delayed verification of a backup

You can perform the verification at any time after the backup. This can improve performance and shorten the backup.

Database and offline redo log backups on one tape

This is a BRBACKUP and BRARCHIVE run on one tape. For example, after the backup the tapes are not rewound but BRARCHIVE continues writing the archive logs on them and performs the end label checking.

Backup of a disk backup using two-step backup strategy

This is a database backup to disk and then a backup of the disk to tape. You can perform this under full control of BRBACKUP or BRARCHIVE.

Consistent online backup

If you cannot perform an offline backup, you can perform an online backup which includes the offline redo logs generated during the online backup as an alternative. The entire backup is then logically consistent.

Backups with jukeboxes and autoloaders

These select and mount tapes in an arbitrary sequence.

Integration of Oracle Recovery Manager (RMAN)

RMAN is integrated into the SAP backup tools BRBACKUP, BRARCHIVE, and BRRESTORE. For example, this enables you to perform SAP-supported incremental backups.

BR*TOOLS TO BACK UP THE ORACLE DATABASE February 2012

15

ADDITIONAL INFORMATION

SAP Library

You can find more information on Oracle database administration and the contents of this document in the SAP Library as follows:

All paths refer to SAP NetWeaver 7.3.

1. Call up the SAP Help Portal at help.sap.com/nw73 Application Help SAP Library: English.

2. Choose SAP NetWeaver Library: Function-Oriented View Database Administration Database

Administration for Oracle SAP Database Guide: Oracle.

3. Choose one of the following:

Approach to Oracle DBA Database Backup or Restore and Recovery

BR*Tools for Oracle DBA BR*Tools in Detail BRBACKUP or BRARCHIVE or BRRESTORE or BRRECOVER

You can also find these plus selected extracts from the SAP Library at:

www.sdn.sap.com/irj/sdn/ora SAP on Oracle Knowledge Center SAP Documentation in Help Portal

SAP Notes

You can find SAP Notes at service.sap.com/notes.

www.sap.com

© Copyright 2012 SAP AG. All rights reserved

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the United States and other countries.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Systems Incorporated in the United States and other countries.

Oracle and Java are registered trademarks of Oracle and its affiliates.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems Inc.

HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc.

IOS is a registered trademark of Cisco Systems Inc.

RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are trademarks or registered trademarks of Research in Motion Limited.

Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc.

INTERMEC is a registered trademark of Intermec Technologies Corporation.

Wi-Fi is a registered trademark of Wi-Fi Alliance.

Bluetooth is a registered trademark of Bluetooth SIG Inc.

Motorola is a registered trademark of Motorola Trademark Holdings LLC.

Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company.

Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company.

Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.