Вы находитесь на странице: 1из 11

White Paper:

Oracle Database Administration

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

under license for technology invented and implemented by Netscape.


Typographic Conventions Icons

Type Style Represents Icon Meaning


Example Text Words or characters that appear Caution
on the screen. These include
field names, screen titles, Example
pushbuttons as well as menu
names, paths and options.
Note
Cross-references to other
documentation Recommendation
Example text Emphasized words or phrases in
body text, titles of graphics and Syntax
tables
EXAMPLE TEXT Names of elements in the
system. These include report
names, program names,
transaction codes, table names,
and individual key words of a
programming language, when
surrounded by body text, for
example, SELECT and
INCLUDE.
Example text Screen output. This includes file
and directory names and their
paths, messages, names of
variables and parameters,
source code as well as names of
installation, upgrade and
database tools.
Example text Exact user entry. These are
words or characters that you
enter in the system exactly as
they appear in the
documentation.
<Example text> Variable user entry. Pointed
brackets indicate that you
replace these words and
characters with appropriate
entries.
EXAMPLE TEXT Keys on the keyboard, for
example, function keys (such as
F2) or the Enter key.
Backup Strategy for Oracle

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

Tape re-use possible


total: (56+x) tapes

locked: retention period = 28 days


2

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.

Without redo log information the online backup is worthless.


As the redo log information is much more dynamic than the database data, even more reserve tapes
are required.
We recommend you to back up the redo logs twice for extra security, so that you need 2 x (52 + x)
tapes in the redo log tape pool.
The number of tapes required depends on the hardware implemented and the tape capacity available,
as shown in the table below:

February 2006 6
Backup Strategy for Oracle

Capacity and Performance of Tape devices

Type Capacity (GB) Transfer Rate (GB / hour)


IBM 3590/Magstar 20 - 40 10 - 15
DLT 7000 35 – 70 15 – 20
DST 310 / 312 50 30 - 50

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)

Key: free locked


Number
of tapes Tape re-use possible
for total:
database locked: retention period = 10 days
(40+x) tapes
data 8
A
+
4 B
A B A B A B A 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.

Do not follow this example. It is included to illustrate a faulty backup approach.

Faulty Security Strategy

Number Key: free locked


of tapes
for
database Tapes only locked briefly because retention period = 1 day
data
4 Danger: possible loss of all data

Tapes re-used each day total:


2 tapes
2

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.

SAP recommends the following for your backup strategy:


• A retention period of at least 14 days, preferably 28 or 30 days
• 30 % reserve tapes in the tape pool
• Backup of the redo log information (that is, the archive log files) directly after each
database backup and creation of a second copy of archive log files
• A minimum of 10 generations of complete database backups

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:

All paths refer to Release NW2004s of the SAP Library.


1. Call up the SAP Help Portal at help.sap.com/nw2004s.
2. Choose English → SAP NetWeaver Library → SAP NetWeaver by Key Capability → Application
Platform by Key Capability → Platform-Wide Services → Database Support
→ Oracle.
3. Choose one of the following:
• SAP Database Guide: Oracle
Choose one of the following:
ƒ Approach to Oracle DBA → Database Backup or Restore and Recovery
ƒ BR*Tools for Oracle DBA → BR*Tools in Action → Backup and Database Copy
with BR*Tools
ƒ BR*Tools for Oracle DBA → BR*Tools in Detail → BRBACKUP or BRARCHIVE
or BRRESTORE or BRRECOVER
• CCMS: Oracle → DBA Planning Calendar (Oracle)

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

Вам также может понравиться