split mirror disk bkup ora

11
 White Paper: Oracle Database Administration Split Mirror Disk Backup for Oracle November 2003  

Upload: hdoanvo

Post on 08-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 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

S p l i t M i r r o r D i s k

B a c k u p f o r O r a c l e

N o v e m b e r 2 0 0 3  

Page 2: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 2/11

 

 © Copyright 2003 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®, NT®, EXCEL®, Word®, PowerPoint® 

and SQL Server® 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, z/OS, AFP, Intelligent Miner, WebSphere®,

Netfinity®, Tivoli®, Informix and Informix® Dynamic ServerTM are

trademarks of IBM Corp. in USA 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.

LINUX is a registered trademark of Linus Torvalds and others.

Citrix®, the Citrix logo, ICA®, Program Neighborhood®,

MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other

Citrix product names referenced herein are trademarks of Citrix

Systems, Inc.

HTML, DHTML, XML, XHTML are trademarks or registered

trademarks of W3C®, World Wide Web Consortium, Massachusetts

Institute of Technology.

JAVA® is a registered trademark of Sun Microsystems, Inc.

J2EE™ 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, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business

Workflow, WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE,

Management Cockpit, mySAP, mySAP.com, 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. MarketSet and Enterprise

Buyer are jointly owned trademarks of SAP Markets and Commerce

One. All other product and service names mentioned are the

trademarks of their respective owners.

Disclaimer

Some components of this product are based on Java™. Any code

change in these components may cause unpredictable and severe

malfunctions and is therefore expressively prohibited, as is any

decompilation of these components.

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

way.

Documentation in the SAP Service Marketplace

You can find this documentation at the following address:http://service.sap.com/dbaora

S A P A GNeurottstraße 1669190 WalldorfGermanyT +49/18 05/34 34 24F +49/18 05/34 34 20w w w . s a p . c o m

Page 3: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 3/11

 

Typographic Convent ions

Type Style Represents

Example Text  Words or characters that appearon the screen. These includefield names, screen titles,pushbuttons as well as menunames, paths and options.

Cross-references to other

documentation

Example text Emphasized words or phrases inbody text, titles of graphics andtables

EXAMPLE TEXT Names of elements in thesystem. These include reportnames, program names,transaction codes, table names,and individual key words of aprogramming language, whensurrounded by body text, forexample, SELECT andINCLUDE.

Example text Screen output. This includes fileand directory names and theirpaths, messages, names ofvariables and parameters,source code as well as names ofinstallation, upgrade anddatabase tools.

Example text Exact user entry. These arewords or characters that youenter in the system exactly asthey appear in thedocumentation.

<Example text> Variable user entry. Pointedbrackets indicate that youreplace these words andcharacters with appropriateentries.

EXAMPLE TEXT Keys on the keyboard, forexample, function keys (such asF2) or the Enter key.

Icons

Icon Meaning

Caution

Example

Note

Recommendation

Syntax

Page 4: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 4/11

Split Mirror Disk Backup for Oracle 

November 2003 4

Contents

Int roduct ion ........................................................................................................... 5 

 Arc hi tec tu re........................................................................................................... 5 

Bas ic Backu p Process .......................................................................................... 6 

Offl ine Spli t Mirror Disk Backup ........................................................................... 6 

Onli ne Spli t Mirror Disk Backup ........................................................................... 7 

Sof tware Configu rat ion ......................................................................................... 7 

Profi le Parameters and Command Options for ini t<SID>.sap ............................. 8 

High Avail abi li ty .................................................................................................... 9 

Spec ial Features ................................................................................................... 9 

Implementing the SAP System on the Backup Server ........................................................ 9 

Implementing BRARCHIVE to Backup Redo Log Files........................................................ 9 

Schedul ing Backup Sessi ons fr om CCMS........................................................................... 9 

Scripts and Programs for the split_cmd Parameter............................................................ 9 

 Addi ti onal In fo rmation ........................................................................................ 11 

SAP Servi ce Marketplace ....................................................................................................11 

SAP Library .........................................................................................................................11 SAP Database Guid e: Oracle .................................................................................................................... 11 

SAP Notes ...........................................................................................................................11 

Page 5: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 5/11

Split Mirror Disk Backup for Oracle 

November 2003 5

Introduction

If you want to perform an offline backup for large systems, but your Oracle data and SAP Systemalways need to be online, you can back up files using a split mirror disk backup. The SAP backup toolBRBACKUP supports this configuration from SAP Release 4.0. BRBACKUP also supports onlinebackups using this configuration.

Instead of backing up the production database on the production server, BRBACKUP is started in thisconfiguration on a backup server, to back up the database files of the split mirror disks. Therefore, thebackup load is moved from the production server to the backup machine and so does not affect theperformance of the SAP System during the backup. BRBACKUP can be used to control the splittingand later synchronization of the disks.

In addition, BRBACKUP also communicates with the production database to obtain information aboutthe database structure and store the results of the backup. This allows the Computing CenterManagement 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 suppliednot 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 toBACKINT.

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 moreinformation on split mirror solutions, see the following on SAP Service Marketplace:

service.sap.com/split mirror

Architecture

Backupdatabase

host

BRBACKUP

Automatictape

changer

Productiondatabase

host

SAP System

SQL* Net V2

Storage System

 

Page 6: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 6/11

Split Mirror Disk Backup for Oracle 

November 2003 6

Basic Backup Process

B

Backup

databasehost

Backup

4

Resynchronization

Automatictape

changer

..

Remount

5

A’ B’A

..

Production

databasehost

Database

File system

SAP shadow process

31

Mirroring

2

B

File system

 

Offline Split Mirror Disk Backup

In an offline backup (that is, backup_type = offline_split), the database is stopped while themirror 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 backupconsists 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 offlinebackup.

t2: Mirror disks A' and B' split and connected to the backup server, which is notified that these disksexist 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.

Page 7: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 7/11

Split Mirror Disk Backup for Oracle 

November 2003 7

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, thetablespaces 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 tostatus 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 normalstatus.

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 mustbe installed on the backup server.

• The Oracle home directory structure must correspond to the SAP standard installationrequired 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 thesystem to be able to access the control files on the backup server created by the SQL commandalter 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.

Page 8: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 8/11

Split Mirror Disk Backup for Oracle 

November 2003 8

• To establish the connection between the backup server and the production server, you mustdefine 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 inall 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 theprograms BRBACKUP, BRCONNECT and BRTOOLS (and optionally BRARCHIVE andBRRESTORE).

• The paths of all database files accessed by the production database and backup databasemust be identical.

Starting with SAP Release 4.5B, this restriction no longer applies. It is now possible tomount the database files on the backup host in a different SAPDATA_HOME directory byusing the init<DBSID>.sap parameter orig_db_home. By using this parameter youcan even mount the split-off files on the same host.

• The manufacturer of the external backup tool must install and configure the BACKINTinterface on the backup server.

Profile Parameters and Command Options forinit<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 containsthe 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 messagesnot interpreted as error messages. If the command is not successful, a return code of >0is 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 

Page 9: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 9/11

Split Mirror Disk Backup for Oracle 

November 2003 9

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 withcontinuous online operation of the SAP System except for a few minutes required to split the mirrordisks. Transactions cannot be performed during this time.

You can also execute an online backup that does not require the system to be offline. The tablespacesto be backed up are only temporarily set to status BACKUP during the time required to split the mirrordisks.

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 thebackup server along with the disks A’ and B’ to operate an independent SAP System on the backupserver. For this you must install the entire Oracle server software on the backup server. Thisindependent SAP System contains snapshot data that SAP transactions can use (for example, DataWarehouse).

Implementing BRARCHIVE to Backup Redo Log Files

BRARCHIVE should be running on the production server. If the backup device is connected to thebackup 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 ofBRARCHIVE).

For the synchronization of BRBACKUP sessions with BRARCHIVE sessions, note that you can start aBRARCHIVE session immediately after the disks are split and not just at the end of the onlineBRBACKUP 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 theactions are scheduled for each database server.

Scripts and Programs for the split_cmd ParameterSince a flush to clear memory must be executed on the operating system or file system before theinterface to the storage system can be accessed, most split mirror disk solutions rely on the know-howof the operating system and storage system suppliers. If this fact is disregarded, data inconsistenciescan result. Experience has shown that the first step in the splitting of the disks (that is, the assignmentof the file names to physical disk areas – "resolving") can take so long that this action must be runbefore Begin/End Backup.

To do this, the BRBACKUP –q (-query) options let you start the split_cmd script and instruct thesystem to only complete the first step.

The following diagram illustrates the control of BRBACKUP with the split_cmd parameter:

Page 10: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 10/11

Split Mirror Disk Backup for Oracle 

November 2003 10

Control Flow of BRBACKUP and split_cmd

split_cmd2: reads <special file>and splits disks of relevant files

split_cmd1: resolves names andstores them in <special file>

brbackup –m <quantity> …-p <special profile> -q

brbackup:perform actual

backup

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

brbackup:alter tablespace

begin backup

brbackup:alter tablespace

end backup

Phase 2Phase 1

 

Page 11: Split Mirror Disk Bkup Ora

8/6/2019 Split Mirror Disk Bkup Ora

http://slidepdf.com/reader/full/split-mirror-disk-bkup-ora 11/11

Split Mirror Disk Backup for Oracle 

November 2003 11

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 inthe 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  andComputing 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 alllinks 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