Академический Документы
Профессиональный Документы
Культура Документы
Backup Strategy
for Oracle
February 2006
SAP AG
Neurottstraße 16
69190 Walldorf
Germany
T +49/18 05/34 34 24
F +49/18 05/34 34 20
www.sap.com
© Copyright 2006 SAP AG. All rights reserved. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver and
other SAP products and services mentioned herein as well as their
No part of this publication may be reproduced or transmitted in any respective logos are trademarks or registered trademarks of SAP AG
form or for any purpose without the express permission of SAP AG. in Germany and in several other countries all over the world. All other
The information contained herein may be changed without prior product and service names mentioned are the trademarks of their
notice. respective companies. Data contained in this document serves
informational purposes only. National product specifications may
Some software products marketed by SAP AG and its distributors vary.
contain proprietary software components of other software vendors.
These materials are subject to change without notice. These materials
Microsoft, Windows, Outlook, and PowerPoint are registered are provided by SAP AG and it affiliated companies ("SAP Group")
trademarks of Microsoft Corporation. for informational purposes only, without representation or warranty of
any kind, and SAP Group shall not be liable for errors or omisions
IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, with respect to the materials.
MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries,
xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, The only warranties for SAP Group products and services are those
Tivoli, and Informix are trademarks of IBM Corp. in USA and/or other that are set forth in the express warranty statements accompanying
countries. such products and services, if any. Nothing herein should be construed
as constituting an additional warranty.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Disclaimer
Open Group. Some components of this product are based on Java™. Any code
change in these components may cause unpredictable and severe
Citrix, ICA, Program Neighborhood , MetaFrame, WinFrame, malfunctions and is therefore expressively prohibited, as is any
VideoFrame, MultiWin are trademarks or registered trademarks of decompilation of these components.
Citrix Systems, Inc.
Any Java™ Source Code delivered with this product is only to be used
HTML, XML, XHTML and W3C are trademarks or registered by SAP’s Support Services and may not be modified or altered in any
®
trademarks of W3C , World Wide Web Consortium, Massachusetts way.
Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc. Documentation in the SAP Service Marketplace
You can find this documentation at the following address:
JavaScript is a registered trademark of Sun Microsystems, Inc., used http://service.sap.com/dbaora
Contents
Introduction........................................................................................................... 5
Example 1 .............................................................................................................. 6
Example 2 .............................................................................................................. 8
Example 3 .............................................................................................................. 9
Summary ............................................................................................................. 10
Additional Information ........................................................................................ 11
SAP Library .........................................................................................................................11
SAP Database Guide: Oracle .................................................................................................................... 11
SAP Notes ...........................................................................................................................11
February 2006 4
Backup Strategy for Oracle
Introduction
SAP data is stored in a relational database. A data backup consists of database files and SAP files
such as programs, log files, and so on, which are stored centrally under /usr/sap/... . You use
operating system tools to back up this directory tree, which is part of the hierarchical file system. As
this data generally only changes when profile parameters are modified or after an upgrade, you only
need to perform a backup in such cases. However, for database objects the situation is completely
different, as we describe in this document.
Since it is generally very dynamic, SAP data requires a comprehensive security strategy. The
following examples illustrate two appropriate and one faulty backup strategy. In the event of an error,
the faulty strategy results in the complete loss of all business data.
In the examples below the tape administration is controlled by BRBACKUP and BRARCHIVE.
Nevertheless, the strategies shown in the examples below are valid for other backup strategies such
as BACKINT or RMAN.
February 2006 5
Backup Strategy for Oracle
Example 1
The size of the database is less than 100 GB and daily backups are possible.
As the SAP System does not have to be available after 18:00, you can perform the backup offline.
Alternatively, you can perform the backup at a time when the transaction load is low. A full backup of
the data (without log redo information) fits onto two tapes, if DLT techniques are used.
Backup Strategy with Daily Complete Backups
Number of tapes
for database data Key: free locked
S M T W T F S S M T W T F S S M T W T F S S M T W T F S S days
Number of tapes
for redo logs
Tape re-use possible total: (52+x) tapes
locked: retention period = 28 days
3
S M T W T F S S M T W T F S S M T W T F S S M T W T F S S days
To be able to deal with a faulty backup, several generations of backups have to be available.
Therefore, for this example, the retention period is set to 28 days and consequently 27 backup
generations are available in the event of database failure. The tape pool ought to contain several
reserve tapes, shown as “+ x” in the above graphic. The additional tapes – we recommend
approximately 30% of the required number – are intended as a reserve in case the amount of data to
be backed up greatly increases or an extra unplanned backup becomes necessary.
Using a separate tape pool, you also need to back up the redo log information generated during the
day, which is temporarily stored on a separate large disk until the tape backup. As this data is
necessary to recover a database after restoring a data backup, never set the retention period for the
redo log tapes to less than the retention period for the data backup tapes. Particularly in the case of an
online backup, it is best to always back up redo logs directly after the data backup.
February 2006 6
Backup Strategy for Oracle
February 2006 7
Backup Strategy for Oracle
Example 2
The database is too large for a complete daily offline or online backup and has to be available 24
hours a day on 5 working days.
Therefore, an online backup is chosen and spread over two days, part A and part B. It runs during the
night, as this is the only time when the transaction load is low.
Backup Strategy for a Very Large Database with Partial Backups (A) and (B)
days
So Mo Tu We Th Fr Sa So Mo Tu We
Number
Tape re-use possible
of tapes
for redo locked: retention period = 10 days total:
logs (19+x) tapes
3
days
So Mo Tu We Th Fr Sa So Mo Tu We
This strategy is generally subject to more errors than the one described above in the first example
because the database administrator is responsible for the correct distribution of the data to the partial
backups (A) and (B). Furthermore, the risk of losing data is greater because online backups are only
consistent in combination with redo information.
Here, the number of tapes required for the data backup is 40 + x. For security reasons, an additional
full offline backup is performed at the weekend. If this strategy is used with a retention period of 7
days, only 4 generations of backups will be available.
The redo log files are even more important than in the first example, as the online
backups are absolutely worthless without them. Here it is essential to back up the redo
data twice.
February 2006 8
Backup Strategy for Oracle
Example 3
As in the first example, a full backup is performed offline once a day. The retention period is set to 1
day so the two tapes required are overwritten each day.
In the event of a disk error, this single backup has to be used. If it cannot be read, the database is
destroyed. As the redo information has also not been saved separately, in the case of a disk failure
which affects data and redo information, all transactions executed since the last backup will be lost.
days
Sa So Mo Tu We Th Fr Sa So Mo Tu
Number
of tapes
for redo
logs No backup of redo information
2 Danger: possible loss of daily transactions
days
Sa So Mo Tu We Th Fr Sa So Mo Tu
February 2006 9
Backup Strategy for Oracle
Summary
The strategy described in the first two examples, or any similar strategy based on the same principles,
enables you to recover the database to any point in time (that is, you can eliminate application errors,
also called logical errors). Without the redo information, an offline backup only enables the state of the
database at the time of the last backup to be recovered. An online backup without redo information is
worthless.
The different situations described above only represent simplified examples intended to illustrate the
problems involved.
February 2006 10
Backup Strategy for Oracle
Additional Information
SAP Library
You can find more information on Oracle database administration and the contents of this document in
the SAP Library from any of the following:
You can find extracts from the SAP Library in the SAP Service Marketplace at:
service.sap.com/dbaora → General
However, we recommend you to use the SAP Library as described above, because not all
links function correctly in these extracts.
SAP Notes
You can find SAP Notes in the SAP Service Marketplace at:
service.sap.com/notes
February 2006 11