Oracle Database Backup & Recovery, Flashback* Whatever, Data Guard
Backup Strategy for Oracle Database
-
Upload
dhiraj-jankar -
Category
Documents
-
view
236 -
download
0
Transcript of Backup Strategy for Oracle Database
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 1/11
W h i t e P a p e r :
O r a c l e D a t a b a s e A d m i n is t r a t i o n
W h i t e P a p e r :
O r a c l e D a t a b a s e A d m i n is t r a t i o n
B a c k u p S t r a t e g y f o r
O r a c l e
F e b r u a r y 2 0 0 8
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 2/11
SAP Copyr igh t s and
Trademarks
© Copyright 2008 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, and PowerPoint are registered
trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex,
MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries,
xSeries, zSeries, System i, System i5, System p, System p5, System x,
System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere,
Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+,
OpenPower and PowerPC are trademarks or registered trademarks of
IBM Corporation.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either
trademarks or registered trademarks of Adobe Systems Incorporated in
the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
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.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used
under license for technology invented and implemented by Netscape.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, PartnerEdge,
ByDesign, SAP Business ByDesign, 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 in
several other countries all over the world. 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.
Where to Find this Documentation
You can find this documentation at the following address:
h t t p : //w w w . s d n . s a p . c o m /i r j /s d n / o r a
S A P A G
Neurottstraße 1669190 WalldorfGermanyT +49/18 05/34 34 24F +49/18 05/34 34 20w w w . s a p . c o m
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 3/11
Typographic Conventions
Type Style Represents
Example Text Words or characters quoted fromthe screen. These include fieldnames, screen titles,pushbuttons labels, menunames, menu paths, and menuoptions.
Cross-references to otherdocumentation.
Example text Emphasized words or phrases inbody text, graphic titles, andtable titles.
EXAMPLE TEXT Technical names of systemobjects. These include reportnames, program names,transaction codes, table names,and key concepts of aprogramming language whenthey are surrounded by body
text, for example, SELECT andINCLUDE.
Example text Output on the screen. Thisincludes file and directory namesand their paths, messages,names of variables andparameters, source text, andnames of installation, upgradeand database tools.
Example text Exact user entry. These arewords or characters that youenter in the system exactly as
they appear in thedocumentation.
<Example text> Variable user entry. Anglebrackets indicate that youreplace these words andcharacters with appropriateentries to make entries in thesystem.
EXAMPLE TEXT Keys on the keyboard, forexample, F2 or ENTER.
Icons
Icon Meaning
Caution
Example
Note
Recommendation
Syntax
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 4/11
Backup Strategy for Oracle
February 2008 4
Contents
Int roducti on ....................................................................................................... 5
Example 1 ...................... ..................... ..................... ...................... .................... 6
Example 2 ...................... ..................... ..................... ...................... .................... 8
Example 3 ...................... ..................... ..................... ...................... .................... 9
Summary.......................................................................................................... 10
Add it ional Info rmat ion ..................................................................................... 11
SAP Lib rary ...................................................................................................................... 11
SAP Notes ........................................................................................................................ 11
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 5/11
Backup Strategy for Oracle
February 2008 5
Introduction
SAP data is stored in a relational database. A data backup consists of database files and SAP filessuch 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. Asthis data generally only changes when profile parameters are modified or after an upgrade, you onlyneed to perform a backup in such cases. However, for database objects the situation is completelydifferent, as we describe in this document.
Since it is generally very dynamic, SAP data requires a comprehensive security strategy. Thefollowing 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 suchas BACKINT or RMAN.
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 6/11
Backup Strategy for Oracle
February 2008 6
Example 1The 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 ofthe data (without log redo information) fits onto two tapes, if DLT techniques are used.
Backup Strategy with Daily Complete Backups
Number of tapesfor database data
days
2
1
S M T W T F SS M T
locked: retention period = 28 days
Key:
Number of tapesfor redo logs
2
1
locked: retention period = 28 days
total: (52+x) tapes
3
free locked
Tape re-use possible
Tape re-use possible
W T F S SM T W T F SS M TW T F S S
total: (56+x) tapes
daysS M T W T F SS M TW T F S SM T W T F SS M TW T F S S
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 backupgenerations are available in the event of database failure. The tape pool ought to contain severalreserve tapes, shown as “+ x” in the above graphic. The additional tapes – we recommendapproximately 30% of the required number – are intended as a reserve in case the amount of data tobe 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 theday, 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 theredo log tapes to less than the retention period for the data backup tapes. Particularly in the case of anonline 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 tapesare 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:
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 7/11
Backup Strategy for Oracle
February 2008 7
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
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 8/11
Backup Strategy for Oracle
February 2008 8
Example 2
The database is too large for a complete daily offline or online backup and has to be available 24hours 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 thenight, 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)
Numberof tapesfordatabasedata
days
4
total:(40+x) tapes
Numberof tapesfor redo
logs
days
2
1
total:(19+x) tapes
3
8
locked: retention period = 10 days
AA BB AA BB AA BB
AA
BB
++
AA BB
locked: retention period = 10 days
WeSo Mo Tu We Th Fr Sa So Mo Tu
Tape re-use possible
Tape re-use possible
Key: free locked
WeSo Mo Tu We Th Fr Sa So Mo Tu
This strategy is generally subject to more errors than the one described above in the first examplebecause the database administrator is responsible for the correct distribution of the data to the partialbackups (A) and (B). Furthermore, the risk of losing data is greater because online backups are onlyconsistent in combination with redo information.
Here, the number of tapes required for the data backup is 40 + x. For security reasons, an additionalfull 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 onlinebackups are absolutely worthless without them. Here it is essential to back up the redodata twice.
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 9/11
Backup Strategy for Oracle
February 2008 9
Example 3
As in the first example, a full backup is performed offline once a day. The retention period is set to 1day 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 isdestroyed. As the redo information has also not been saved separately, in the case of a disk failurewhich 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
Numberof tapes
fordatabase
data
days
2
total:2 tapes
Numberof tapesfor redologs
days
2
1
Sa So Mo Tu We Th Fr Sa So Mo Tu
Danger: possible loss of daily transactions
4 Danger: possible loss of all data
Tapes only locked briefly because retention period = 1 day
No backup of redo information
Tapes re-used each day
Sa So Mo Tu We Th Fr Sa So Mo Tu
Key: free locked
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 10/11
Backup Strategy for Oracle
February 2008 10
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 thedatabase at the time of the last backup to be recovered. An online backup without redo information isworthless.
The different situations described above only represent simplified examples intended to illustrate theproblems 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 eachdatabase backup and creation of a second copy of archive log files
• A minimum of 10 generations of complete database backups
8/3/2019 Backup Strategy for Oracle Database
http://slidepdf.com/reader/full/backup-strategy-for-oracle-database 11/11
Backup Strategy for Oracle
February 2008 11
Additional Information
SAP Library
You can find more information on Oracle database administration and the contents of this document inthe SAP Library as follows:
All paths refer to Release SAP NetWeaver Process Integration 7.1 of the SAP Library.
1. Call up the SAP Help Portal at help.sap.com/nwpi71 → KNOWLEDGE CENTER FOR SAP
NETWEAVER PROCESS INTEGRATION 7.1 → SAP NetWeaver Process Integration Library English .
2. Choose Administrator’s Guide → Technical Operations for SAP NetWeaver → Administration of
Databases → Database Administration for Oracle .
3. Choose one of the following:o 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
o CCMS: Oracle
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 → SAPDocumentation in Help Portal
SAP Notes
You can find SAP Notes at:
service.sap.com/notes