Você está na página 1de 11

White Paper:

Oracle Database Administration

Split Mirror Disk


Backup for Oracle

November 2003
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 2003 SAP AG. All rights reserved . JAVA® is a registered trademark of Sun Microsystems, Inc.

J2EE™ is a registered trademark of Sun Microsystems, Inc.


No part of this publication may be reproduced or transmitted in any
form or for any purpose without the express permission of SAP AG. JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc.,
The information contained herein may be changed without prior used under license for technology invented and implemented by
notice. Netscape.

Some software products marketed by SAP AG and its distributors SAP, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business
contain proprietary software components of other software vendors. Workflow, WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE,
Management Cockpit, mySAP, mySAP.com, and other SAP products
Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and services mentioned herein as well as their respective logos are
and SQL Server® are registered trademarks of Microsoft Corporation. trademarks or registered trademarks of SAP AG in Germany and in
several other countries all over the world. MarketSet and Enterprise
IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, Buyer are jointly owned trademarks of SAP Markets and Commerce
MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, One. All other product and service names mentioned are the
pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, trademarks of their respective owners.
Netfinity®, Tivoli®, Informix and Informix® Dynamic ServerTM are
trademarks of IBM Corp. in USA and/or other countries.

Disclaimer
ORACLE® is a registered trademark of ORACLE Corporation. Some components of this product are based on Java™. Any code
change in these components may cause unpredictable and severe
UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of malfunctions and is therefore expressively prohibited, as is any
the Open Group. decompilation of these components.

LINUX is a registered trademark of Linus Torvalds and others. Any Java™ Source Code delivered with this product is only to be used
by SAP’s Support Services and may not be modified or altered in any
Citrix®, the Citrix logo, ICA®, Program Neighborhood®, way.
MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other
Citrix product names referenced herein are trademarks of Citrix
Systems, Inc. Documentation in the SAP Service Marketplace
You can find this documentation at the following address:
HTML, DHTML, XML, XHTML are trademarks or registered http://service.sap.com/dbaora
trademarks of W3C®, World Wide Web Consortium, Massachusetts
Institute of Technology.
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
Syntax
body text, titles of graphics and
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.
Split Mirror Disk Backup for Oracle

Contents
Introduction........................................................................................................... 5
Architecture........................................................................................................... 5
Basic Backup Process .......................................................................................... 6
Offline Split Mirror Disk Backup........................................................................... 6
Online Split Mirror Disk Backup ........................................................................... 7
Software Configuration......................................................................................... 7
Profile Parameters and Command Options for init<SID>.sap............................. 8
High Availability .................................................................................................... 9
Special Features ................................................................................................... 9
Implementing the SAP System on the Backup Server ........................................................ 9
Implementing BRARCHIVE to Backup Redo Log Files........................................................ 9
Scheduling Backup Sessions from CCMS........................................................................... 9
Scripts and Programs for the split_cmd Parameter ............................................................ 9
Additional Information ........................................................................................ 11
SAP Service Marketplace....................................................................................................11
SAP Library .........................................................................................................................11
SAP Database Guide: Oracle .................................................................................................................... 11
SAP Notes ...........................................................................................................................11

November 2003 4
Split Mirror Disk Backup for Oracle

Introduction
If you want to perform an offline backup for large systems, but your Oracle data and SAP System
always need to be online, you can back up files using a split mirror disk backup. The SAP backup tool
BRBACKUP supports this configuration from SAP Release 4.0. BRBACKUP also supports online
backups using this configuration.
Instead of backing up the production database on the production server, BRBACKUP is started in this
configuration on a backup server, to back up the database files of the split mirror disks. Therefore, the
backup load is moved from the production server to the backup machine and so does not affect the
performance of the SAP System during the backup. BRBACKUP can be used to control the splitting
and later synchronization of the disks.
In addition, BRBACKUP also communicates with the production database to obtain information about
the database structure and store the results of the backup. This allows the Computing Center
Management System (CCMS) to monitor the backups in the SAP production system.
The actual splitting and later synchronization of the disks is executed by a script or program supplied
not by SAP, but by the manufacturer of the operating system, disk, or backup software. The BACKINT
interface can also be used in this configuration, as the split mirror disk configuration is transparent to
BACKINT.

If you want to perform an offline backup, the database must be stopped for a short period
– usually only a few minutes – while the system splits the disks.

This paper provides an overview of split mirror disk backup for Oracle. For more
information on split mirror solutions, see the following on SAP Service Marketplace:
service.sap.com/split mirror

Architecture

SQL* Net V2

Automatic
SAP System tape
changer

Production Backup BRBACKUP


database database
host host

Storage System

November 2003 5
Split Mirror Disk Backup for Oracle

Basic Backup Process

Production Backup
database database
host host

Automatic
tape
SAP shadow process File system 4 changer

Database 1 3 Backup

File system

Mirroring Resynchronization
2
.. .. 5

A’ B’
AB B
Remount

Offline Split Mirror Disk Backup


In an offline backup (that is, backup_type = offline_split), the database is stopped while the
mirror disks are split. All of the following steps, t1-5, are automatically executed by BRBACKUP.
Therefore, you must already have started BRBACKUP on the backup server. The offline backup
consists of the following steps (1-5 in the above graphic):
t1: Database on the production machine shut down to ensure a consistent database for an offline
backup.
t2: Mirror disks A' and B' split and connected to the backup server, which is notified that these disks
exist by the split_cmd parameter
t3: Database started to make it available to the SAP System
t4: Backup of the mirror disks A’ and B’ executed on the backup host
t5: Disks and mirror disks resynchronized, using the resync_cmd parameter (optional)
The resynchronization process does not normally use the CPU on the production server.
For more information, see the detailed plan below.

November 2003 6
Split Mirror Disk Backup for Oracle

Online Split Mirror Disk Backup


During an online backup (that is, backup_type = online_split), the system is always available.
The tablespaces to be backed up are only temporarily set to status BACKUP while the disks are split,
thus considerably reducing the amount of redo information. During a normal online backup, the
tablespaces have this status during the entire backup.
The online backup consists of the following steps:
t1: ALTER TABLESPACE ... BEGIN BACKUP: BRBACKUP sets the tablespaces to be backed up to
status BACKUP.
t2: Mirror disks split and connected to the backup server using the split_cmd parameter.
t3: ALTER TABLESPACE ... END BACKUP: BRBACKUP resets the tablespaces to the normal
status.
t4: Mirror disks backed up
t5: Disks and mirror disks resynchronized after backup completed using the resync_cmd parameter
(optional).
The resynchronization process does not normally use the CPU on the production server.
For more information, see the detailed plan below.

Software Configuration
• At least the client software and SVRMGR components of the Oracle database software must
be installed on the backup server.
• The Oracle home directory structure must correspond to the SAP standard installation
required by BRBACKUP.

Default directories

UNIX Windows NT
$ORACLE_HOME/dbs %ORACLE_HOME%\DATABASE
$ORACLE_HOME/bin %ORACLE_HOME%\BIN
$SAPDATA_HOME/sapbackup %SAPBACKUP%
$SAPDATA_HOME/saparch %SAPARCH%
$SAPDATA_HOME/sapreorg %SAPREORG%
$SAPDATA_HOME/sapcheck %SAPCHECK%
$SAPDATA_HOME/saptrace %SAPTRACE%
The SAPBACKUP directory must be connected to the backup server and the production server for the
system to be able to access the control files on the backup server created by the SQL command
alter database backup controlfile to <filename> on the production server.

As of SAP Release 4.5B, the above is no longer necessary.


• The Oracle and BRBACKUP profiles should be available in $ORACLE_HOME/dbs or
%ORACLE_HOME%\DATABASE.
• The backup_type parameter in the profile init<DBSID>.sap must be set to
offline_split |online_split.

November 2003 7
Split Mirror Disk Backup for Oracle

• To establish the connection between the backup server and the production server, you must
define the profile parameter primary_db for the SQLNET connection). Before you do this,
you must perform the following steps:
− Create an Oracle password file:
orapwd file=<ORACLE_HOME>/dbs/orapw<DBSID>
password=<internal password> entries=100
− You must specify the parameter remote_login_passwordfile = exclusive in
all init<DBSID>.ora profiles.
− The user system must have the authorization SYSOPER in the production database.
Start SVRMGR as user internal and execute the following Oracle command:
SVRMGR> grant sysoper to system;
− You might need to change the password for user system:
SVRMGR> alter user system identified by <password>;
• The directory /usr/sap/<SID>/SYS/exe/run or \\<Hostname>\sapmnt\<SID>\SYS
\exe\run must be accessible from the backup server and should contain at least the
programs BRBACKUP, BRCONNECT and BRTOOLS (and optionally BRARCHIVE and
BRRESTORE).
• The paths of all database files accessed by the production database and backup database
must be identical.

Starting with SAP Release 4.5B, this restriction no longer applies. It is now possible to
mount the database files on the backup host in a different SAPDATA_HOME directory by
using the init<DBSID>.sap parameter orig_db_home. By using this parameter you
can even mount the split-off files on the same host.
• The manufacturer of the external backup tool must install and configure the BACKINT
interface on the backup server.

Profile Parameters and Command Options for


init<SID>.sap
• backup_type = offline_split|online_split
• split_cmd = "<split_cmd> [$]"
• <split_cmd> is a program or shell script called by BRBACKUP to split the mirror disks.
• resync_cmd = "<resync_cmd> [$]"
<resync.cmd> is a program or shell script called by BRBACKUP to resynchronize the mirror
disks. If this parameter is not set, BRBACKUP does not perform the resynchronization. At run-
time, BRBACKUP replaces the optional character $ with the name of the text file that contains
the names of all files to be backed up.

If split_cmd/resync_cmd is completed successfully, an exit code of 0 is returned.


Only messages beginning with #INFO are accepted, that is, these are the only messages
not interpreted as error messages. If the command is not successful, a return code of >0
is returned as well as messages describing the cause of the error.
• primary_db = <conn_str>
<conn_str> is an instance string to the production database that allows BRBACKUP to
connect the backup server to the production database.
• brbackup -t|type online_split Online backup of mirror disks

November 2003 8
Split Mirror Disk Backup for Oracle

brbackup -t|type offline_split Offline backup of mirror disks


This command line option replaces the backup type set in the backup_type parameter.

High Availability
In contrast to a normal offline backup, a configuration using split mirror disks provides users with
continuous online operation of the SAP System except for a few minutes required to split the mirror
disks. Transactions cannot be performed during this time.
You can also execute an online backup that does not require the system to be offline. The tablespaces
to be backed up are only temporarily set to status BACKUP during the time required to split the mirror
disks.

Special Features

Implementing the SAP System on the Backup Server


If the split disks do not have to be resynchronized immediately after the backup you can use the
backup server along with the disks A’ and B’ to operate an independent SAP System on the backup
server. For this you must install the entire Oracle server software on the backup server. This
independent SAP System contains snapshot data that SAP transactions can use (for example, Data
Warehouse).

Implementing BRARCHIVE to Backup Redo Log Files


BRARCHIVE should be running on the production server. If the backup device is connected to the
backup server, you can use the remote device with the pipe option or the BACKINT interface.
Alternatively, you can connect the directory $ORACLE_HOME/saparch to the backup server. If you
do this, consider the known disadvantages of an NFS mount (see also the verification possibilities of
BRARCHIVE).
For the synchronization of BRBACKUP sessions with BRARCHIVE sessions, note that you can start a
BRARCHIVE session immediately after the disks are split and not just at the end of the online
BRBACKUP session. At this point, Oracle regards the backup as already finished.

Scheduling Backup Sessions from CCMS


CCMS scheduling in the SAP System on the production server cannot be used for BRBACKUP as the
actions are scheduled for each database server.

Scripts and Programs for the split_cmd Parameter


Since a flush to clear memory must be executed on the operating system or file system before the
interface to the storage system can be accessed, most split mirror disk solutions rely on the know-how
of the operating system and storage system suppliers. If this fact is disregarded, data inconsistencies
can result. Experience has shown that the first step in the splitting of the disks (that is, the assignment
of the file names to physical disk areas – "resolving") can take so long that this action must be run
before Begin/End Backup.
To do this, the BRBACKUP –q (-query) options let you start the split_cmd script and instruct the
system to only complete the first step.
The following diagram illustrates the control of BRBACKUP with the split_cmd parameter:

November 2003 9
Split Mirror Disk Backup for Oracle

Control Flow of BRBACKUP and split_cmd

Phase 1 Phase 2

split_cmd1: resolves names and split_cmd2: reads <special file>


stores them in <special file> and splits disks of relevant files

brbackup: brbackup: brbackup:


alter tablespace alter tablespace perform actual
begin backup end backup backup

brbackup –m <quantity> … brbackup –m <quantity> …-p <normal profile>


-p <special profile> -q

November 2003 10
Split Mirror Disk Backup for Oracle

Additional Information

SAP Service Marketplace


For more information on split mirror solutions, including suppliers, see:
service.sap.com/split-mirror

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 6.40 of the SAP Library.


• An SAP system if you have installed the documentation
...

a. Choose Help → SAP Library.


The browser starts.
b. In the browser, choose SAP NetWeaver Components → Application Platform (SAP Web
Application Server).
• The SAP Help Portal at:
help.sap.com
...

a. Choose SAP NetWeaver → SAP Web Application Server.


b. Select the required language.
c. Choose SAP NetWeaver Components → Application Platform (SAP Web Application
Server).
• The help files on the online documentation CDs
If you want to view the help files in HTML-Help format from the online documentation CDs,
you need a PC running Microsoft Windows to install the HTMLHelp Viewer.

You can find extracts from the SAP Library for the SAP Database Guide: Oracle and
Computing Center Management System (CCMS) on 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 Database Guide: Oracle


In the documentation SAP Database Guide: Oracle (Release 6.40) from the SAP Library [Page 11],
look at the following for more information on the contents of this document:
Approach to Oracle DBA → Database Backup → Advanced Backup and Recovery → Split mirror Disk
Backup

SAP Notes
You can find SAP Notes in the SAP Service Marketplace at:
service.sap.com/notes

November 2003 11

Você também pode gostar