Oracle Restore and Recovery

S AP N e t W e a v e r 7 . 1 February 2008

Copyright
© 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, 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, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, 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. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, 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.

(C) SAP AG

2

Icons in Body Text
Icon Meaning Caution Example Note Recommendation Syntax

Additional icons are used in SAP Library documentation to help you identify different types of information at a glance. For more information, see Help on Help → General Information Classes and Information Classes for Business Information Warehouse on the first page of any version of SAP Library.

Typographic Conventions
Type Style Example text Description Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation. Example text EXAMPLE TEXT Emphasized words or phrases in body text, graphic titles, and table titles. Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE. Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. Keys on the keyboard, for example, F2 or ENTER.

Example text

Example text <Example text>

EXAMPLE TEXT

(C) SAP AG

3

....................................55 Whole Database Reset with BR*Tools .......................................................................................................................................102 Restoring and Applying Offline Redo Log Files........................................................................19 Whole Database Reset ........................................................................................28 Disaster Recovery .........I ........................................................................................................................................................36 BR*Tools User Interface ........................................32 Configuration of BR*Tools .................................92 Restoring Control Files...............97 Restoring and Applying an Incremental Backup.....................52 Database Point-In-Time Recovery with BR*Tools .......................122 -a2|-archive2 ..................................................................................................................72 Managing Flashback Database with BR*Tools ............104 Performing Flashback Database ..........44 Checking BR*Tools Release Information............................81 Checking the Status of Database Files .....................66 Disaster Recovery with BR*Tools ............................................................................110 Opening the Database ............................................................................................87 Checking the Status of Tablespaces........25 Restore and Application of Offline Redo Log Files ..............................123 (C) SAP AG 4 ..........................................................................................57 Restore of Individual Backup Files with BR*Tools .........................................35 Starting BR*Tools ........117 Completion of BRRESTORE Runs ..............................................................34 Effects of Autoextend and Resize on BR*Tools ..................32 Configuring the Scroll Line Count for BR*Tools ....................................II ......................96 Restoring Data Files....................................................................................116 Restoring Files...................50 Restore and Recovery with BR*Tools ..81 Setting Point In Time and Tablespaces for Recovery .......................................................................59 Restore and Application of Offline Redo Log Files with BR*Tools ..............118 Examples of BRRESTORE Runs ....................29 Getting Started with BR*Tools.......78 Procedures for Restore and Recovery with BR*Tools .....................................22 Restore of Individual Backup Files........................83 Selecting Database Backups ............123 -b2|-backup2 ..............Restore and Recovery............................................................................................................................................53 Tablespace Point-In-Time Recovery with BR*Tools ...........7 Complete Database Recovery ..............................................................14 Tablespace Point-in-Time Recovery.......................................................................................................................................................................................................................................................................85 Checking the Status of Database Files ...........................50 Complete Database Recovery with BR*Tools...................................113 BRRESTORE ......................................................................90 Exporting the Tablespaces Not Being Recovered...............119 Command Options for BRRESTORE ....................................................11 Database Point-In-Time Recovery........................................................................................................................................................................................38 How to Use BR*Tools ..................................................................33 Configuring the UNIX Command at for BR*Tools Batch Functions .......................................................................120 -a|-archive|-a1|-archive1 ............................33 Setting the Option To Log Displayed Information for BRSPACE......122 -b|-backup|b1|backup1.......

........................................................................134 BRRESTORE Summary Log.........127 -m|-mode.........................................................................................................126 -i|-interval .........................................................................................................................130 -o|-output..................................................................................................................................................................................................................................................................127 -l|-language ...................141 -h|-help .......................................................................................................131 -r|-parfile....132 -V|-VERSION ..........................................138 -d|-device ................................................................................................................................................................................................................................................................................................................................................................................................................133 BRRESTORE Detail Log.................-c|-confirm ..................................................................................................................................................................................................................................................................................................................................................................................................................128 -n|-number...........................................................................................................................................................................................................................................................................................................................143 -n|-seq1|-sequence1 ...............................145 -w|-own|-owner....................................................................................................................................148 BRTOOLS ...............................140 -g|-scn|-change ...............................................................133 Names of the BRRESTORE Detail Logs.........126 -k|-compress ..........................131 -w|-verify...........................126 -h|-help ........................................................................................136 -a|-tsp|-tablespace...........................................135 Command Options for BRRECOVER ..................................................................................................................130 -q|-query..........................................129 -n2|-number2......................................145 BRRECOVER Detail Log .....................................................................................................................................144 -t|-type .....................................139 -e|-degree...............................................125 -f|-fillup ............................146 BRRECOVER Summary Log ..........................125 -g|-abort...................................................................................................142 -l|-language ....................................................................................................................................................133 BRRESTORE Logs...142 -n|-seq|-sequence .....................145 BRRECOVER Logs ...............................................................................................................145 -V|-VERSION ...............................................................142 -m|-pit|-time ....130 -p|-profile .................................................................149 (C) SAP AG 5 ....................................137 -b|-backup .143 -p|-profile .............................................................................................................................................................141 -i|-interval ..............138 -c|-confirm ............................................141 -j|-ins|-instance .....................................................................................................................................................................................................144 -s|-scroll......143 -o|-rpt|-point........................................124 -d|-device ................................................131 -u|-user.....................................................................................................144 -r|-parfile...............................................................................................................................................................................................................................................................144 -u|-user..............124 -e|-execute ............134 BRRECOVER.......

.........................................151 -i|-interval ........................................................................................150 -h|-help ........................................159 Recovering from All Control Files Missing ....................................................................153 Database Recovery with SQLPLUS ...........................................................................................................................160 Recovering from Current Online Redo Log Missing................................................170 Recovering from Errors During the Archiving of Online Redo Logs ...............................................................................................................................................178 (C) SAP AG 6 ......................................................................................151 -p|-profile .................................154 Error Analysis................................................................................................................................................................................................................156 Recovery after Process Errors.....................................................................................152 -u|-user.................................155 Recovery after User Errors ............................................................................................157 Recovery after Media Errors .................Command Options for BRTOOLS................................................152 -w|-show........177 Updating the Control File ..................................164 Recovering from One Inactive Online Redo Log Missing ...............................................................156 Recovery after an Instance Error ...............................................................................................157 Recovering from One Control File Missing ..........................................................................175 Automating the Recovery .....................171 Performing an Incomplete Recovery...................................................................................................169 Recovering from Index Tablespace Missing .......................................165 Recovering from User Tablespace Missing ..................................................................153 Types of Database Errors ...........151 -l|-language .166 Recovering from SYSTEM Tablespace Missing ...............................172 Finishing an Incomplete Recovery .......................156 Recovery after Statement Errors ...149 -c|-confirm .............................................................................................................................................153 -V|-VERSION ............................152 -s|-scroll........

Recommendation We strongly recommend you to practice restore and recovery on a test system as similar as possible to your production system. Repeat this regularly. The business costs of an incorrect or delayed recovery can easily outweigh consultancy fees. If in doubt. especially after you have modified the production system. Caution Always analyze the problem carefully before attempting to recover your database. seek support from SAP. The following graphic shows an overview of the restore and recovery process: Oracle Database Control files Data files Online redo log files Offline redo log files Restore and Recovery BRRECOVER BRBACKUP Detail and summary log BRRESTORE BRARCHIVE Detail and summary log Detail and summary log Control files Data files Online redo log files Offline redo log files Backup Media (C) SAP AG 7 .Restore and Recovery This section helps you to develop an approach to restore and recover of your Oracle database in the event of failure.

Note BRRECOVER recovery is not based on BRBACKUP or BRARCHIVE logs in database tables. you need to perform Disaster Recovery. You might also need to meet other prerequisites. BRARCHIVE. such as directories. • (C) SAP AG 8 . because these tables are not available when you recover the database. which are very important for the restore because they contain all the information about the backups. and timestamps. The BRBACKUP logs and BRARCHIVE logs. or the required offline redo log files made with BRBACKUP or BRARCHIVE. including such items as the BRBACKUP and BRARCHIVE logs and profiles. depending on the context of the recovery. try to locate: • The backups of the missing or faulty data files.It is possible to use BRRECOVER and BRRESTORE for homogeneous database copies. see Enhanced Support for Homogeneous Database Copies in SAP Note 1003028. For more information. Caution If you lose the entire database system. BRRECOVER uses the logs to find the backups of the data files and the offline redo log files. and BRRESTORE Prerequisites Before you start to restore and recover your database. volumes. Integration You use the following tools for database restore and recovery: Tool Restore and Recovery with BR*Tools Use Restore and recovery with the BR*Tools user interface Restore of database and offline redo log files Recovery of database and offline redo log files Database recovery when BR*Tools is not sufficient Restore and recovery BRRESTORE BRRECOVER Database Recovery with SQLPLUS Oracle Recovery Manager – integrated with BRBACKUP.

BRARCHIVE. or BRRECOVER. BRARCHIVE. when the entire database is lost. • The command line In this way. using backups of the database files. For more information. see SAP Note 849485. Activities You can perform restore. BRRESTORE. To analyze the problem. We recommend you to use the BR*Tools menus for restore and recovery because BR*Tools guides you through the necessary steps. you can use the tools BRBACKUP.Features • Restore BRRESTORE restores data files that have been damaged or are missing. BRRECOVER supports database recovery after: o Media errors. check the: o Database alert log (C) SAP AG 9 . or BRRECOVER as necessary to complete the task you have chosen. • Recovery BRRECOVER recovers transactions lost since the database backup. BRRECOVER automatically rebuilds NOLOGGING indexes that were created during or after the backups used. and recovery tasks from either of the following: • The menus in BR*Tools BR*Tools calls the tools BRBACKUP. BRRESTORE. using backups of the offline redo log files to roll forward the lost transactions. Recommendation We recommend you to use the DBA Planning Calendar for routine backup because this enables you to automatically schedule the backup. such as a disk crash or accidental deletion of database files User errors such as software problems or when a user accidentally drops a table Disaster. Proceed as follows to restore and recover your database: 1. but this requires expert knowledge. including backup profiles and logs o o After recovery.

perform a complete. but the database file backup is available You performed a complete or incremental offline o You want to reset the database to the state it was in at the most recent offline or consistent online backup. is software or hardware mirroring available? Do you have a standby database? o o 3. Whole Database Reset (C) SAP AG 10 . If a media error has occurred. Ask yourself the following questions: o o o o What is the status of the database? Is it available or not? What kind of error has occurred? A media or a user error? Which files are corrupt? What type of file is affected? Data files.o Trace files belonging to the background processes in the directory $ORACLE_HOME/saptrace/background. control files. 4. 2. If a user error has occurred. the database is still available. Decide what kind of restore and recovery you want to perform: Scenario Media error such as a disk crash Aim Solution Complete You want to recover to Database the time of failure Recovery Database You want to recover to Point-In-Time a selected point in time Recovery You want to recover Tablespace the affected component Point-in-Time to a selected point in Recovery time. and you have enough time. For more information. offline backup before starting to restore and recover the database. you must replace the affected equipment and recreate the file system as it existed before the error. see Error Analysis. 5. online redo log files? If a media error has occurred. User or software error User or software error within one component of a multi-component database Either of the following applies: o Error in which all copies of redo log files are lost.

Note This section discusses how to approach complete database recovery. For more information on how to perform a complete database recovery. you might want to consider the following in an exceptional situation: • • Restore of individual backup files Restore and application of offline redo log files Be sure to consult SAP Support first if you are unsure about using these functions. including backup profiles and logs Caution Aim Solution You want to recover as Disaster much as possible Recovery Only if you are very experienced. Integration This function performs a complete recovery to the time of failure. a recovery to some time other than the time of failure – see: • • Database Point-In-Time Recovery Tablespace Point-In-Time Recovery 11 (C) SAP AG . Complete Database Recovery This section tells you about restoring damaged or lost data files after a failure in your Oracle database.Scenario or consistent online backup immediately before the error. If you want to perform a point-in-time recovery – that is. Restore lost data files by using appropriate backups 2. Recover the restored data file to the time of failure using the redo log files This function consists of a number of phases that are executed either manually or automatically by BRRECOVER in a predetermined sequence. such as a disk crash. and then recovering the database to the time of failure. such as during a software upgrade. You normally do this after a media error. With this function you can: 1. Loss of entire database system. see Complete Database Recovery with BR*Tools.

either as originals or backups. If the current group is involved.ora Solution if Unavailable Restore from backup as described in Disaster Recovery. Offline redo log files Features The following graphic shows how a complete recovery works: (C) SAP AG 12 .dba init<DBSID>. use ALTER to drop and recreate the group. DATABASE If the non-current redo log group is involved. The table shows what you must do if the files are not available: Missing File Type init<DBSID>. perform a whole database reset from an offline backup or an online consistent backup.ora spfile<DBSID>. Otherwise. If none is available. Copy one of the control file mirrors if available. use one of the following: • • Online redo log files Database Point-In-Time Recovery Whole Database Reset Database files These files are automatically restored and recovered during complete database recovery. Perform database point-in-time recovery to the most recent available redo log file. use one of the following: Control files • • Database Point-In-Time Recovery Whole Database Reset Copy one of the redo log file mirrors if available. you must have the files shown in the following table.Prerequisites To finish complete recovery. BRBACKUP Logs and BRARCHIVE Logs Restore from backup as described in Disaster Recovery.

BRRECOVER logs any recorded errors in data files to the detail log created in the sapbackup directory with the crv suffix (for complete recovery.log (return code 0 or 1).log arch<DBSID>. The data files can be compiled from various backups. v$recover_file to determine the status of database files. To update the v$ views. BRRECOVER does the following: 1. The associated detail logs show whether the required data files were in the backup. BRRESTORE automatically creates missing subdirectories under sapdata directories during the Restore Data Files phase. 2. 3.Detail logs back<DBSID>. so they must exist beforehand. To minimize the (C) SAP AG 13 .) 2. online redo log files. BRRECOVER refers to entries in Oracle's v$ views.log Check status of database files Select database backup Restore data files Apply incremental backup. BRRECOVER stops the database instance if started and sets the database to mount status. BRRECOVER does not create missing sapdata directories automatically. However. such as v$datafile. and data files). Select Database Backup phase BRRECOVER determines the eligible backups using the entries in the BRBACKUP summary log file back<DBSID>. Check the Status of Database Files phase BRRECOVER checks the status of all files in the database (that is. if needed Determine offline redo log files needed Restore offline redo log files Apply Open offline redo database log files oraarch BRRECOVER Database Activities 1. the control files.

Checks the status of database files and tablespaces Database Point-In-Time Recovery (C) SAP AG 14 . Offline redo log files are applied to the database in groups of at most 100 files. The BRARCHIVE summary log file arch<DBSID>. Apply Offline Redo Log Files phase BRRECOVER calls SQLPLUS to apply offline redo log files to the database. BRRECOVER always suggests the most recent backup. 4.subsequent recovery time. 6. Note The restore and apply phases can be executed in parallel to minimize total recovery time. Open Database phase During this phase BRRECOVER: 1. the restore and apply phases are repeated as necessary. Restore Data Files phase BRRECOVER calls BRRESTORE to restore the data files to their original location. You can also select an incremental backup to be restored before applying offline redo log files. Determine Offline Redo Log Files Needed phase BRRECOVER determines the offline redo log files required for a complete recovery. 7. 8. 5. 3. Apply Incremental Backup phase If you selected an incremental backup during the Select Database Backups phase. If you have more than 100 files to apply.log lists the backups of the offline redo log files. BRRECOVER also roughly checks the availability of offline redo log files. Opens the database 2. BRRECOVER automatically selects the corresponding full backup to restore missing files. BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup. BRRECOVER takes existing online redo log files and offline redo log files in saparch or oraarch into consideration. Restore Offline Redo Log Files phase BRRECOVER calls BRRESTORE to restore the offline redo log files that have been found back to the saparch or oraarch directory. In this case.

online redo. In this way. You normally use this function when there has been a logical error – that is. For more information on how to perform a database point-in-time recovery. otherwise use operating system tools. see -a|-archive. use SAP tools. This section discusses how to approach database point-in-time recovery. you minimize lost data. For more information. Back up all offline redo log files using BRARCHIVE. If the database is running. a user or software error – and you want to recover the database to the point immediately before the error. see Database Point-In-Time Recovery with BR*Tools.You can use this function to fully restore and then recover your Oracle database to a specified point in time (PIT). Features The following graphic shows how database point-in-time recovery works: (C) SAP AG 15 . You can also now use point-in-time recovery for a standby database. o • You must have the following data available if you are not using flashback database: o o o The BRBACKUP logs and the BRARCHIVE Logs The data file backups and an incremental backup if required All offline redo log files between the data backup and the chosen PIT Any types of database files – data. Prerequisites • We recommend you to: o Perform a full offline or online backup. control – might be unavailable on disk.

You can also select an incremental backup to be restored before applying offline redo log files.log Detail logs back<DBSID>. To minimize the subsequent recovery time. Select Database Backup phase BRRECOVER determines the eligible backups using the entries in the BRBACKUP summary log file back<DBSID>. BRRECOVER automatically selects the corresponding full backup to restore all data files. The data files can be compiled from various backups. The associated detail logs show whether the required data files were in the backup. BRRECOVER also roughly checks the availability of offline redo log files. BRRECOVER always suggests the most recent backup.arch<DBSID>. In this case. log files redo backup files files if needed log files log files log files recovery if needed needed and flash back oraarch BRRECOVER Database Activities 1.log (return code 0 or 1). Check Status of Database Files phase (C) SAP AG 16 . 3. You can also select flashback database if activated and if the recovery endpoint is covered by the flashback data. Set Point In Time for Recovery phase You enter the recovery end-point in BRRECOVER by choosing one of the following: o o o Point in time Redo log sequence number System change number 2.log Check Restore Set Apply Determine Restore Apply Restore Select Restore Open offline status of control point in incremental offline redo offline offline database all data database redo database files redo time for backup.

9.log lists the backups of the offline redo log files. Determine Offline Redo Log Files Needed phase BRRECOVER determines the offline redo log files required for a recovery. BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup. BRRECOVER checks whether the given recovery timestamp or system change number (SCN) is available in the flashback data. Restore Offline Redo Log Files phase BRRECOVER calls BRRESTORE to restore the offline redo log files that have been found back to the saparch or oraarch directory. Restore Control Files phase BRRECOVER calls BRRESTORE to restore control files if needed. Apply Incremental Backup phase If you selected an incremental backup during the Select Database Backups phase. 10. 8. Restore Data Files phase BRRECOVER calls BRRESTORE to restore all the data files to their original location. 7. 6. BRRECOVER calls BRRESTORE to restore the offline redo log files needed for the flashback to the saparch or oraarch directory (if required). 5. If so. Offline redo log files are applied to the database in groups of at most 100 files. Restore Offline Redo Log Files and Flashback phase When database flashback is active. then performs flashback database. The BRARCHIVE summary log file arch<DBSID>. BRRECOVER takes existing online redo log files and offline redo log files in saparch or oraarch into consideration. the restore and apply phases are repeated as necessary. 4. that is. if they are unavailable or unsuitable for the selected backups. Apply Offline Redo Log Files phase BRRECOVER calls SQLPLUS to apply offline redo log files to the database. (C) SAP AG 17 .BRRECOVER checks the status of database files to determine which will be overwritten. Note The restore and apply phases can be executed in parallel to minimize total recovery time. you can use flashback to perform the database point-inttime recovery. If you have more than 100 files to apply.

11. Open Database phase During this phase BRRECOVER: 1. Checks the status of database files and tablespaces 4. Deletes unnecessary files that are no longer used by the database Example Here are two typical scenarios in which you can use database point-in-time recovery: Logical Error 1 Complete backup (on. Opens the database with the option RESETLOGS 2.or offline) Logical error for example. For more information. see Managing Flashback Database with BR*Tools. deleted table) No change to structure of the database Complete backup Redo logs Error recognized time Recover database 3 2 Restore complete backup without control files and online redo log files Logical Error with Preceding Structure Change (C) SAP AG 18 . Database flashback does not replace regular backups.Caution Before you use database flashback in your production environment. make sure you have tested it thoroughly. Creates missing temporary files 3.

without affecting the other components in the same database. see -a|-archive.Complete backup (on. o • You must have the following data available: 19 (C) SAP AG . For more information.and you want to recover the tablespace to the point immediately before the error. This section discusses how to approach tablespace point-in-time recovery.for example. otherwise use operating system tools.or offline) 1 Logical error for example. You normally use this function when there has been a logical error .for example. you minimize lost data. deleted table Structure of the database changed . It lets you restore the tablespaces for a single component . use SAP tools.that is. Prerequisites • We recommend you to: o Perform a full offline or online backup. For more information on how to perform a tablespace point-in-time recovery. a user or software error . if a component upgrade has failed . Back up all offline redo log files using BRARCHIVE. Tablespace PIT recovery is especially useful for Multiple Components in One Database (MCOD). In this way. If the database is running. tablespace extension Complete backup time Redo logs Recover database 4 2 Restore complete backup without control files and online redo log files Error recognized 3 CREATE DATAFILE <filename> AS <filespec> Tablespace Point-in-Time Recovery You can use this function to fully restore and then recover a group of Oracle tablespaces to a specified point in time (PIT). see Tablespace Point-In-Time Recovery with BR*Tools.

o o o • The BRBACKUP logs and the BRARCHIVE logs The data file backups and an incremental backup if required All offline redo log files between the data backup and the chosen PIT You must be able to open the database before starting the recovery procedure. Set Point In Time and Tablespaces for Recovery phase You enter the recovery end-point in BRRECOVER by choosing one of the following: o o o Point in time Redo log sequence number System change number You specify the tablespaces that you want to recover or a SAP owner for a multi-component database. log files spaces if needed needed to be recovered oraarch Open database and plug in exported tablespaces BRRECOVER Database Activities 1. Select Database Backup phase (C) SAP AG 20 .log Detail logs back<DBSID>. 2.log Set point in time and tablespaces for recovery Select database backup Check tablespace status Export tablespaces not being recovered Apply Restore Restore offline data offline Apply Determine redo files of redo incremental offline redo tablelog files log files backup. BRRECOVER automatically finds tablespaces containing segments belonging to this owner. Features The following graphic shows how tablespace point-in-time recovery works: arch<DBSID>.

The BRARCHIVE summary log file arch<DBSID>. including the SYSTEM and rollback tablespaces. 4. In this case.log lists the backups of the offline redo log files. 8.log (return code 0 or 1). 7. 5. The data files can be compiled from various backups. You can also select an incremental backup to be restored before applying offline redo log files.BRRECOVER determines the eligible backups using the entries in the BRBACKUP summary log file back<DBSID>. BRRECOVER sets the data files of exported tablespaces to OFFLINE. Export Tablespace not Being Recovered phase BRRECOVER sets the tablespaces not being recovered to READ ONLY and exports the tablespaces' meta data using the Oracle EXPDP (Data Pump) tool. Restore Data Files of Tablespaces to Be Recovered phase BRRECOVER calls BRRESTORE to restore data files of the tablespaces to be recovered. Restore Offline Redo Log Files phase (C) SAP AG 21 . 6. BRRECOVER also roughly checks the availability of offline redo log files. these tablespace are not recovered. The associated detail logs show whether the required data files were in the backup. BRRECOVER always suggests the most recent backup. Apply Incremental Backup phase Before applying an incremental backup. placing them in their original location. BRRECOVER takes existing online redo log files and offline redo log files in saparch or oraarch into consideration. To minimize the subsequent recovery time. Determine Offline Redo Log Files Needed phase BRRECOVER determines the offline redo log files required for a recovery. BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup. Check Tablespace Status phase BRRECOVER checks if the: o o Tablespace group to be recovered is self-contained Tablespace group to be exported is self-contained This means that database objects within this group must not have references to objects outside the group. 3. BRRECOVER automatically selects the corresponding full backup to restore all data files. If you selected an incremental backup during the Select Database Backups phase. Therefore.

4. Deletes unnecessary files that are no longer used by the database Whole Database Reset This section tells you about resetting your Oracle database after a failure. You normally need to do this if either of the following applies: • An error occurred in which all copies of the redo log files are lost. but the database file backup is available. at the time of either a complete offline or a consistent online backup. the consistent end point of the backup is used. if not yet done. (C) SAP AG 22 . Note The restore and apply phases can be executed in parallel to minimize total recovery time. Sets imported tablespaces to READ/WRITE. Checks the status of database files and tablespaces 7. • With this function you can reset the database to a previous consistent state. Imports meta data of exported tablespaces using the Oracle IMPDP (Data Pump) tool. BRRECOVER sets the data files of the exported tablespaces to OFFLINE. 9. such as during a software upgrade. Apply Offline Redo Log Files phase Before applying the offline redo log files. If you reset from an online backup. Open Database and Plug In Exported Tablespaces phase During this phase BRRECOVER: 1.BRRECOVER calls BRRESTORE to restore the offline redo log files that have been found back to the saparch or oraarch directory. the restore and apply phases are repeated as necessary. 6. Creates missing temporary files 3. Temporarily drops exported tablespaces from the database. You performed a complete offline backup or a consistent online backup immediately before the error. Opens the database with the option RESETLOGS 2. 5. If you have more than 100 files to apply. 10. Offline redo log files are applied to the database in groups of at most 100 files. BRRECOVER calls SQLPLUS to apply offline redo log files to the database.

If the database is running. an incremental backup If restoring from a consistent online backup. the accompanying redo log files that were saved in the same BRBACKUP run Any types of database files . otherwise use operating system tools.might be unavailable on disk. For more information on how to perform a whole database reset.data. control . You can now also use whole database reset for a standby database. use SAP tools. if selected. online redo log. Prerequisites • We recommend you to perform a full offline backup.This section discusses how to approach whole database reset.log Select database backup Check status of database files Restore control files and offline redo log files Restore data files Apply incremental backup. if needed Apply offline redo log files. if needed Restore offline redo log files and flash back Open database BRRECOVER Database Activities 1. You have the following data available if restore points are not used: o o o • The BRBACKUP logs The data file backups and. Select Database Backup phase (C) SAP AG 23 . Features The following graphic shows how a whole database reset works: Detail logs back<DBSID>. see Whole Database Reset with BR*Tools.

log (return code 0 or 1). Check Status of Database Files phase BRRECOVER checks the status of database files to determine which files will be overwritten. 6. Restore Offline Redo Log Files and Flashback phase When restore points are defined. you can use flashback for the database reset. 7.BRRECOVER determines the eligible backups using the entries in the BRBACKUP summary log file back<DBSID>. 4. Caution Before you use database flashback and restore points in your production environment. To minimize the subsequent recovery time. The selected backup must be a complete offline or a consistent online backup. BRRECOVER calls BRRESTORE to restore offline redo log files needed for the flashback to the saparch or oraarch directory (if required). make sure you have tested it thoroughly. then resets the database to the chosen restore point using flashback. it is only possible to use a normal restore when the timestamp or system change number (SCN) is contained in the flashback data. At the same time. Restore Data Files phase BRRECOVER calls BRRESTORE to restore all the data files to their original location. In this case. 2. However. BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup. Apply Offline Redo Log Files phase If a consistent online backup was selected. BRRECOVER always suggests the most recent backup. BRRECOVER calls SQLPLUS to apply the restored offline redo log files to the database. BRRECOVER automatically selects the corresponding full backup to restore all data files. It is always possible to use a guaranteed restore point. (C) SAP AG 24 . 3. Apply Incremental Backup phase If you selected an incremental backup during the Select Database Backups phase. offline redo log files are restored if a consistent online backup was selected. You can also select an offline or consistent online incremental backup to be restored. 5. In this case. You can also select a restore point if defined and still usable. The associated detail logs show whether the required data files were in the backup. Restore Control Files and Offline Redo Log Files phase BRRECOVER calls BRRESTORE to restore control files.

Open Database phase During this phase BRRECOVER: 1. otherwise use operating system tools. Opens the database 2. This is intended for experts. If the database is running. Creates missing temporary files 3. You must have the following data available: o • The BRBACKUP logs when restoring from a BRBACKUP backup or an incremental backup The data file backups and an incremental backup if required o Features The following graphic shows how restore of individual backup files works: (C) SAP AG 25 . see Restore of Individual Backup Files with BR*Tools. For more information. This section discusses how to approach the restore of individual backup files. see Managing Flashback Database with BR*Tools. 8. Deletes unnecessary files which are no longer used by the database Restore of Individual Backup Files You can restore individual backups files to your Oracle database. use SAP tools. For more information on how to perform a restore of individual backup files.Database flashback does not replace regular backups. Prerequisites • We recommend you to perform a full offline or online backup. Checks the status of database files and tablespaces 4. so make sure you fully understand how it works before using it.

log Select BRBACKUP run Select backup files for restore Restore selected files Specify file for restore Restore specified file Specify file for restore Restore specified file BRRECOVER Database Restore individual files from a BACKINT backup Restore and apply incremental backup Detail logs BACKINT back<DBSID>.Restore files from a BRBACKUP backup Detail logs Restore individual files from tape Restore individual files from disk back<DBSID>. Select BRBACKUP run phase (C) SAP AG 26 .log Select backup files for restore Restore specified file Select incremental backup from BRBACKUP run list Restore and apply incremental backup BRRECOVER Database Activities You can perform the following functions to restore individual backup files: • Restore files from a BRBACKUP backup 1.

You select a BRBACKUP run from the backup list. You can select a BRBACKUP run that finished with an error. 2. Select backup files for restore phase You select files to restore from the list of files backed up in the selected run. 3. Restore selected files phase BRRECOVER calls BRRESTORE to restore the selected files.

Restore individual files from tape 1. Specify file for restore phase You can specify a file on a local or a remote tape device. You can specify not only database files but also non-database files and directories or offline redo log files. You must specify the file position on tape and the restore destination. 2. Restore the file phase BRRECOVER calls BRRESTORE to restore the specified file.

Restore individual files from disk 1. Specify file for restore phase You can specify a file on a local or a remote disk. You can specify not only database files but also non-database files (but not directories) or offline redo log files. You must specify the backup file name and the restore destination. 2. Restore the file phase BRRECOVER calls BRRESTORE to restore the specified file.

Restore individual files from BACKINT backup 1. Specify file for restore phase You can specify not only database files but also non-database files and directories (if supported by BACKINT) or offline redo log files. You must specify the backup file name, the BACKINT backup ID and optionally the restore destination. 2. Restore the file phase

(C) SAP AG

27

To restore the file, BRRECOVER calls BRRESTORE, which then calls BACKINT.

Restore and apply incremental backup 1. Select incremental backup phase You select an incremental BRBACKUP run from the backup list. You can select a BRBACKUP run that finished with an error. 2. Restore and apply incremental backup phase BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup.

Restore and Application of Offline Redo Log Files

You can restore and apply offline redo log files - called archivelog files in the BR*Tools menus - to your Oracle database. This is intended for experts, so make sure you fully understand how it works before using it. This section discusses how to approach restore and application of redo log files. For more information on how to perform a restore and application of redo log files, see Restore and Application of Offline Redo Log Files with BR*Tools. Prerequisites

We recommend you to:
o

Perform a full offline or online backup. If the database is running, use SAP tools, otherwise use operating system tools. Back up all offline redo log files using BRARCHIVE. For more information, see -a|-archive.

o

You must have the BRARCHIVE logs available.

Features The following graphic shows how restore and application of individual backup files works:

(C) SAP AG

28

Restore offline redo log files

Apply offline redo log files

Open database (optional)

Specify offline redo log files

Restore offline redo log files

Specify offline redo log files for application

Apply offline redo log files

Open database

BRRECOVER

Database

Activities You can perform the following functions to restore and apply offline redo log files:

Restore offline redo log files 1. Specify offline redo log files for restore phase You specify the offline redo log files that you want to restore. 2. Restore offline redo log files phase BRRECOVER calls BRRESTORE to restore the specified offline redo log files.

Apply offline redo log files 1. Specify offline redo log files for application phase You specify which offline redo log files you want to apply. 2. Apply offline redo log files phase BRRECOVER calls SQLPLUS to apply the offline redo log files.

Open database (optional) If required, you can open the database after applying the offline redo log files.

Disaster Recovery

(C) SAP AG

29

(C) SAP AG 30 . and how to keep data loss to a minimum by using BRRECOVER.If you lose your entire Oracle database system (possibly including hardware). Note This section discusses how to approach disaster recovery. see Disaster Recovery with BR*Tools. This is a preparation step for subsequent database recovery with one of the following: • • Database point-in-time recovery Whole database reset Prerequisites • • SAP and Oracle software is correctly installed The file systems – that is. step by step. sapdata<x> directories – exist and are configured as before the disaster. and have not taken any special security precautions . Integration You can only restore profiles and log files using this function. For more information about how to perform disaster recovery. This section describes how to begin reinstalling the system in the event of such a disaster. Features The following graphic shows how disaster recovery works: Select restore from BRBACKUP or BRARCHIVE backup Select restore device type Specify restore parameters Select profiles and log files Restore selected profiles and log files Select detail logs for restore Restore selected detail logs BRRECOVER Profile and log directories Activities 1.then you have to recover the system as much as possible. Select restore from BRBACKUP or BRARCHIVE backup.such as setting up a Standby Database .

Specify restore parameters phase Depending on your choice of restore device type. Select detail logs for restore phase (C) SAP AG 31 . you specify appropriate restore parameters.You select the BRBACKUP or BRARCHIVE backup that contains the required profiles and logs. 6. 4. Select profiles and log files phase You select the profiles and log files that you want to restore from the following: o o o o Backup profile Oracle profile BACKINT / mount profile – for more information. Select restore device type phase You select the device to be used from the following possibilities: o o o o o Local tape Remote tape Local disk Remote disk Backup utility 3. 2. see util_par_file Detail log from one of the following: BRARCHIVE Detail Log BRBACKUP Detail Log o Summary log from one of the following BRARCHIVE Summary Log BRBACKUP Summary Log BRSPACE Summary Log BRSPACE Structure Change Log BRSPACE Parameter Change Log 5. Restore selected profiles and log files phase BRRECOVER directly restores the selected profiles and log files without calling BRRESTORE.

You select the detail logs that you want to restore. Getting Started with BR*Tools To get started with BR*Tools. 2. Prerequisites If you are new to Oracle database administration with the SAP system. 7. The default Initialization Profile init<DBSID>.sap Changes to profile parameters become active when you start BR*Tools. 5. If necessary.dba is: o o UNIX: <ORACLE_HOME>/dbs/init<DBSID>. • You have set the environment variables when you configured the database: o o Environment Variables (UNIX) Environment Variables (Windows) 32 (C) SAP AG . such as a disk or external backup tool (BACKINT). Restore selected detail logs phase BRRECOVER directly restores the selected detail logs from the disk. You can only select logs on the selected restore device type. 4. or external backup tool without calling BRRESTORE. you check BR*Tools release information. Prerequisites • You have made any required settings in the initialization profile. You learn about the BR*Tools user interface.sap Windows: %<ORACLE_HOME>%\database\init<DBSID>. tape. the details logs are determined by the mounted tape volume. 3. Process 1. Configuration of BR*Tools To get started with BR*Tools. You learn how to use BR*Tools. see Getting Started with Oracle and the SAP System. you need to configure it and learn how to use it. you need to configure it. You configure BR*Tools. For tape device type. You start BR*Tools.

3. Prerequisites The environment variable BR_LINES and the parameter scroll_lines in the initialization parameter file. For example. Note This section is not relevant for the graphical user interface. For more information on environment variables. you can choose to use more than 20 lines for the scroll line count if your command windows have more than 20 lines. Prerequisites (C) SAP AG 33 . which you can use to schedule BR*Tools functions in batch mode. BRGUI. where you can scroll freely.• You are familiar with the directory structure: o o Directory Structure (UNIX) Directory Structure (Windows) Process 1. Configuring the Scroll Line Count for BR*Tools The BR*Tools character interface uses 20 lines for scrolling in lists. You check the effects of autoextend and resize on BR*Tools. You set the option to log displayed information for BRSPACE. set the following environment variable (operating-system specific) before you start BR*Tools: BR_LINES <Number of lines for scrolling> Configuring the UNIX Command at for BR*Tools Batch Functions This section tells you how to configure the UNIX command /usr/bin/at. You can lengthen or shorten the display. 4. 2. You configure the UNIX command at for BR*Tools batch functions. control the BR*Tools list display. see: • • Environment Variables (UNIX) Environment Variables (Windows) Procedure To select a different number for the scroll line count. You configure the scroll line count for BR*Tools.sap. init<DBSID>.

view. Make sure the proper entries have been made. and so on. Add to the list of authorized users. Choose <Management function> <Show function> . Setting the Option To Log Displayed Information for BRSPACE You can have BRSPACE log the information displayed in a show function for BRSPACE. Prerequisites • Decide whether you need to set this option: o Do not set this option if you want to show the database information and the results do not have to be available at a later time.allow.The at command has the following authorizations: r-sr-xr-x root root at ora<dbsid> To use at. Set the option if you want to record the displayed data in the log files. To list all at jobs. 2. The displayed data is not recorded in the BRSPACE log files to avoid unnecessary logging. These jobs are transparent files that you can display using UNIX commands such as vi. it is valid for each class of displayed information in a BRSPACE run. Enter yes in Create log file. The running at process has root authorization. you must make an entry in the file /usr/lib/cron/at. That is. and then test your configuration. and analyzes the jobs created by BR*Tools in file /usr/spool/cron/atjobs. (C) SAP AG 34 . Procedure 1. Procedure Choose one of the following to set the log option: • BRTOOLS or BRGUI: 1. o • This option is global for BRSPACE. For example. more. enter the command at -l. This helps you avoid processes crashing due to incorrect configuration of the at command. 2. reorganize a small table or tablespace such as PSAP<SCHEMA_ID>USR.

Database System Check Parameters for checking freespace in tablespaces that take into account the Autoextend option are the following: • • TABLESPACE_FULL for absolute freespace for critical segments CRITICAL_SEGMENTS For more information. see BRCONNECT Default Conditions for Database Administration. Example Enter brspace -f dbshow -c dbstate -l at the command line. importing the offline redo log files). Effects of Autoextend and Resize on BR*Tools Autoextend and Resize are two Oracle options for influencing the size of the data files of the database system: • • Autoextend extends the data files automatically by a specified amount Resize lets you increase the size of data files manually (up to the maximum file system size). Choose Continue. Reorganization • The preventative freespace check includes the Autoextend option (C) SAP AG 35 . Enter yes in Create log file. or reduce their size (down to the last used block ID of the data file). These options influence the BR*Tools functions below. Restore and Recovery When performing a recovery (that is. the Oracle database system automatically takes into account the autoextends made to the data files during or after a database backup. and have been adjusted accordingly. • Command line: Use option -l|-log of BRSPACE function dbshow.Example Choose Instance management Show instance status .

for example. see Reorganizing Tables with BR*Tools. The standard Oracle user created during the installation of the SAP system is ora<dbsid> (UNIX) or <DBSID>ADM (Windows). • You can increase or reduce the size of the data files of the tablespaces with the Resize action. For more information. Tablespace Management • You can create the data files of the tablespaces with the parameters AUTOEXTEND ON (OFF). see Altering a Data File with BR*Tools. For more information. and so on (DBA privileges). (C) SAP AG 36 . BR*Tools establishes the connection to the database with a special database user who has authorization to create and delete tablespaces. MAXSIZE and INCREMENT_BY. For more information. to create data files. Prerequisites • You have configured: o o The database system BR*Tools • Logon user You can log on as the operating system user who owns the data files of the database system. You can also use some BR*Tools programs if you are logged on as the SAP System user <sapsid>adm. The parameter MAXSIZE takes into account the memory of the file system or the raw device. You can only use BR*Tools to manage a database system that is running on the same host system. The advantage of this procedure is that the administrator who works with BR*Tools does not have the authorizations of user ora<dbsid> (who can delete database files directly. You can also change these parameters. under UNIX: rwsr_xr_x orac11 dba brbackup). This requires the authorization for the BR*Tools program to be set accordingly (for example. see Extending a Tablespace with BR*Tools and Creating a Tablespace with BR*Tools. Starting BR*Tools You can use this procedure to start BR*Tools for Oracle. you can set the Autoextend parameters MAXSIZE and INCREMENT_BY when you alter the data files. The parameter MAXSIZE takes into account the memory of the file system or the raw device. and perform other critical operations for the database).• Before you reorganize a table. This default user is system.

Note If you start BR*Tools with a script. In this case.. When you use <brtool> -u <user>.Procedure 1. 8 characters for HP-UX. call it as follows from the command line: OS> <brtool> . For more information. If the default password is not used... brbackup -t online . which must be available. by using the ps command). If possible. For example. the command line with the DBA user and its password can be displayed in the UNIX process list (for example.sap. avoid starting BR*Tools with the command option -u and the immediate entry of user name and password. Enter the password interactively. The following examples illustrate different procedures for using passwords: (C) SAP AG 37 . <user name>: <password>: Database user that you defined Password of your database user. as a background job or from the command line. If you want BR*Tools to log on as user system to the Oracle database. see Configuration of BR*Tools. you must not use special characters (such as $ or #) in the user name and password. 32 characters for AIX). Log on to the host where your database system is running. You can call BR*Tools with the following command options: o OS> <brtool> -p [<path>/]<profile name> You can also specify an initialization profile that is different to the standard profile.. BR*Tools uses the values set in the default profile init<DBSID>. you have to use option —u <user>/<password>. o OS> <brtool> -u <user>/<password> Specifies a DBA user different to the default user (system/<default password>). 2. If you do not specify option -p. the password does not appear on the screen as it is entered and is not displayed in the process list. the system prompts you to enter a valid password. In this case. Depending on the operating system the password length is limited to a certain number of places (for example.

30. Access to this file can be restricted with operating system privileges. The menus are controlled by BRTOOLS. OS> <brtool> -u BR*Tools prompts you for the user and password. see Command options for BRSPACE.Example OS> <brtool> -u system BR*Tools prompts you for the password. Call for an OPS$ user (also applies to background processing). You can get an overview of all the command options by entering the following command: OS> <brtool> -h[elp] For information about other command options that are not mentioned in this section.57 BR0656I Choice menu 1 . you can create an OPS$ user (see Oracle documentation and information in SAP Service Marketplace) in the database and assign the SAPDBA role to the user.. You can use BR*Tools with a: • Character-based interface.. The password is not visible on the screen. which shows the main menu: BR0280I Time stamp 2003-03-06 11. OS> <brtool> -u < <file name> The user and password is written to the file <file name>.please make a selection --------------------------------------------------------------BR*Tools main menu 1 = Instance management (C) SAP AG 38 . see the section on command options for the relevant one of the BR*Tools. OS> <brtool> -u /. for BRSPACE command options. The password appears on the screen. To make sure that the password is not visible in the process list. BR*Tools User Interface The user interface to BR*Tools provides you with menus to perform a wide range of database administration functions for your Oracle database. as in the following example. For example. which in turn calls one of the functional BR programs.

h . r .back.cont.Restore and recovery 6 . Features (C) SAP AG 39 . as in the following example.stop.Exit program Standard keys: c .Additional functions 9 .refr.Check and verification 7 . b .Segment management 4 .2 .help --------------------------------------------------------------BR0662I Enter your choice: • GUI.Backup and database copy 5 .Space management 3 . which shows the main menu: Note BRGUI is the graphical interface for BR*Tools.Database statistics 8 . It displays output and gathers user input for BR*Tools. s .

You see the following types of menus when using BRTOOLS:

Control This type of menu leads you from step to step in a pre-defined sequence. You can repeat steps in the correct sequence. Here is an example:
BR0655I Control menu 101 - please decide how to proceed --------------------------------------------------------------Complete database recovery main menu 1 = Check the status of database files 2 * Select database backup 3 * Restore data files 4 * Restore and apply incremental backup 5 * Restore and apply archivelog files 6 * Open database and post-processing 7 - Exit program 8 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help ---------------------------------------------------------------

It is normally possible for you to repeat steps from a control menu but this is not always a sensible thing to do. Only repeat steps when you understand what the effects will be.

Choice This type of menu lets you make an independent choice from the menu in any sequence. You can repeat the choice as often as required. Here is an example:
BR0656I Choice menu 120 - please decide how to proceed --------------------------------------------------------------Restore of individual backup files main menu 1 = Restore files from BRBACKUP backup 2 - Restore individual files from tape 3 - Restore individual files from disk 4 - Restore individual files from backup utility 5 - Restore and apply incremental backup 6 - Exit program 7 - Reset program status

(C) SAP AG

40

Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------•

Input This type of menu lets you enter required parameters or options. Here is an example:
BR0657I Input menu 123 - please check/enter input values --------------------------------------------------------------BRRESTORE main options for restore from BRBACKUP backup 1 - BRRESTORE profile (profile) ........ [initGC2.sap] 2 - BRBACKUP backup run (backup) ....... [bdjwgvvh.fnf] 3 - Fill-up previous restores (fillup) . [no] 4 - Restore device type (device) ....... [util_file] 5 - BACKINT/Mount profile (parfile) .... [initGC2.utl] 6 # Database user/password (user) ...... [system/*******] 7 ~ Restore destination (rest_dest) .... [] 8 - Files for restore (mode) ........... [2,11-12] Standard keys: c - cont, b - back, s - stop, r - refr, h - help ---------------------------------------------------------------

List This type of menu displays a list of items from which you select one entry. Here is an example:
BR0658I List menu 121 - please select one entry --------------------------------------------------------------BRBACKUP database backups for restore Pos. Log Start Type Files Device Rc 1 = bdjwhckx.ffd 2003-01-29 17.30.51 offline 110/0 disk 0 2 - bdjwhadu.fft 2003-01-29 17.05.14 offline 112/0 tape 1 3 - bdjwgyrq.fff 2003-01-29 16.48.42 offline 112/0 util_onl 0 4 - bdjwgwtj.fnt 2003-01-29 16.26.55 onl_cons 115/0 tape 0 5 - bdjwgvvh.fnf 2003-01-29 16.16.29 onl_cons 115/0 util_onl 0 BR0280I Time stamp 2003-01-29 19.05.29

There are a number of sub-types for the list menu:
o

List menu with optional single selection 41

(C) SAP AG

BR0658I List menu 365 - you can select one entry -------------------------------------------------------------List of BRSPACE export runs Pos. Run Date Tables Dumps Size[KB] 1 - sdlmvogy.tbe 2003-09-11 20.28.36 1 1 2 2 - sdlmqobv.tbe 2003-09-10 20.01.43 2 1 14 3 - sdlmqimk.tbe 2003-09-10 18.58.42 2 1 5 4 - sdlmqgin.tbe 2003-09-10 18.34.29 2 1 18 5 - sdlmqfmw.tbe 2003-09-10 18.25.06 2 1 12 ... Press <Rtn> to scroll, <n> to select, 'c' to continue, 's' to stop scrolling.. o

List menu with multiple selection
BR0659I List menu 312 + please select one or more entries -------------------------------------------------------------List of tablespaces for alter Pos. Tablespace Files/AuExt. Type Status SegMan. ExtMan. Backup 1 - DRSYS 1/1 DATA ONLINE AUTO LOCAL NO 2 - EXAMPLE 1/0 DATA ONLINE AUTO LOCAL NO 3 - INDX 1/1 DATA ONLINE AUTO LOCAL NO 4 - PSAP1111D 1/1 DATA ONLINE AUTO LOCAL NO 5 - PSAP1111I 1/1 DATA ONLINE AUTO LOCAL NO ... Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------

o

List menu with optional multiple selection
BR0659I List menu 259 + you can select one or more entries -------------------------------------------------------------List of database tablespaces

(C) SAP AG

42

back..29 113280 0 5 93056:16128:22 40:1728:128 3 . Backup Files/AuExt. Tablespace Type Status ExtMan. Largest[KB] 1 .SAPR3 DBABARL NO 429 64 42:65 2 .SAPR3 DBABD NO 1068 320 253:79 3 .SAPR3 DBABL NO 763 256 189:74 4 . s .stop. h . Standard keys: c . Total[KB] Used[%] Free[KB] ExtSize[KB] FreeExt. b . Rows Space[KB] Data[KB:%] 1 . s . Owner Table Part..INDX DATA ONLINE LOCAL AUTO NO 1/1 5120 1. r .cont.EXAMPLE DATA ONLINE LOCAL AUTO NO 1/0 123520 8.cont.SAPR3 DBAERR NO 0 64 0:0 .DRSYS DATA ONLINE LOCAL AUTO NO 1/1 10240 47. but no input possible BR0692I Display menu 260 # no input possible (C) SAP AG 43 . Standard keys: c .refr.refr.stop..50 5376 1038336 2 1038336+:5312:64 :0:0 2 .SAPR3 DBADFL NO 0 64 0:0 5 .. b .help -------------------------------------------------------------o List display without selection BR0660I List display 352 .25 5056 1043456 1 1043456+:5056:0: 0:0 .back.help -------------------------------------------------------------- • Display in form of input menu. h . r .Pos. SegMan.no selection possible -------------------------------------------------------------List of tables for reorganization Pos.

...back. 2 13 ...... 1038336+:5312:64:0:0 Standard keys: c ........ ONLINE 3 ..refr. DATA 2 .50 10 ........ you can also use “quick mode” from the BRGUI or BRTOOLS interface or the command line.Free space in tablespace in KB (free) .--------------------------------------------------------------Information about tablespace DRSYS 1 .. r ... LOCAL 4 .. only stopping when absolutely necessary........ 5376 11 .. but this is only relevant when you have completed your input and started execution to perform some action on the database....Largest free extents (largest) ..help --------------------------------------------------------------- How to Use BR*Tools You can start BR*Tools in the following ways: • Interactively from the BRGUI graphical interface or the BRTOOLS character interface Directly from the command line using the relevant BR*Tools options • For BRSPACE.Extent management (extent) ..Segment space managenent (space) ........... 47. With the option -c|-confirm.cont.....Number of free extents (freext) .. 1038336 12 .. h . 1 8 ..Backup status (backup) ..Used space in tablespace in % (used) ......... All other confirmation prompts and so on are skipped... (C) SAP AG 44 ... see Quick Mode for BRSPACE below.. 10240 9 .. that is in menus and “yes / no” choices (message BR0676I).Maximal extension size in KB (extsize) ......... AUTO 5 . Note There is also an unattended or “batch” mode.... b .......stop. s ....Tablespace status (status) .Total tablespace size in KB (total) ....... NO 6 .... you can specify that the BR*Tool runs without operator input in unattended mode.Number of autoextensible files (autoext) .Tablespace type (type) ......Number of files in tablespace (files) . 1 7 ... For more information.

BRSPACE. If you specify an object name in BRGUI or BRTOOLS. you might get errors if you change the command. see Command Line Mode below. BRARCHIVE. BRRESTORE. or BRCONNECT – directly performs some action on the database. Process Interactive Start You start BRGUI or BRTOOLS from the command line and then choose the menu options required: • • • • • • • • Database Instance Management with BR*Tools Space Management with BR*Tools Segment Management with BR*Tools Backup and Database Copy with BR*Tools Restore and Recovery with BR*Tools Check and Verification with BR*Tools Database Statistics with BR*Tools Additional Functions with BR*Tools When you are ready to execute the functional tool. Note BRSPACE and BRRECOVER differ in that they also have an interactive mode separate from BRGUI or BRTOOLS. For more information. However. You can enter manually enter the command. which themselves gather further input using menus. there is a “quick mode” for BRSPACE. you enter BRSPACE in quick mode. Then BRGUI or BRTOOLS normally calls the correct functional tool to perform the function that you have specified in the menus. you can specify that BR*Tool runs in fully unattended mode. see below. BRRECOVER. so that an error is generated if input is required and has not already been given. BRTOOLS passes control to BRSPACE or BRRECOVER . For more information. at the end a functional tool – BRBACKUP. before starting to perform an action on the database. Whichever start method you use. BRGUI or BRTOOLS normally shows you the command that is to be executed.With the option -c|-confirm force. There are the following reasons for this: (C) SAP AG 45 . In addition. Therefore.

To enable unattended mode without operator input. see: • • -c|-confirm for BRRECOVER -c|-confirm for BRSPACE Caution Be careful with -c force because it forces default selection of all unspecified options. You can force the tool to run in batch mode without any interactive component by entering the option -c force. • Command Line Start You enter the command options required directly from the command line: • • • • • • Command Options for BRBACKUP Command Options for BRARCHIVE Command Options for BRRESTORE Command Options for BRRECOVER Command options for BRSPACE Command Options for BRCONNECT If the command options are correct and complete.• To enable full logging of BRSPACE actions – as soon as BRGUI or BRTOOLS calls BRSPACE. which might lead to unexpected results. as described below. the SAP tool is executed immediately to perform a function on the database. If you do not specify a function. tablespace name SYSTEM). Calling BRSPACE and BRRECOVER from the Command Line BRSPACE and BRRECOVER have an interactive component to collect option input. the appropriate menus are shown for the function you select. you go straight into quick mode. the tool is called with the default function when you start it from the command line: • • Complete Database Recovery for BRRECOVER Show Database Instance Information for BRSPACE Otherwise. Quick Mode for BRSPACE (C) SAP AG 46 . If you call BRSPACE from the command line with a function name (for example. a log is created immediately. since you can specify all necessary input before the function is executed. For more information. extend tablespace) and an object name (for example. even though you are still in interactive mode.

BRSPACE skips the menus in which you normally specify the function. You use quick mode from: • • BRGUI or BRTOOLS menus with the title BRSPACE options for <function> The command line at operating system level For quick mode. In quick mode. and/or the object name. we recommend you to use main menu mode. the object name. the action. They jump directly to the final input menu to let you enter the remaining required parameters and execute the function immediately. in which you only use the menus in BRSPACE to enter the options required to perform a function.You can use quick mode to skip the higher-level menus in BRSPACE. You can also enter additional options in quick mode. including the menu to select the object of your chosen function. Unless you know the object name. The object – for example. a tablespace name if you want to extend a tablespace – varies according to the function that you choose. The following graphic illustrates in outline how quick mode works: (C) SAP AG 47 . you must specify at least the function. Note The alternative to quick mode is main menu mode. and/or the action.

you see a menu displaying the different categories of information class: Show database instance information Show database space information Show database object information (C) SAP AG 48 .Quick Mode – object selected Object Example: tablespace name optional Initial input object selected object not selected B R G U I or B R T O O L S Function Command line call with object name Example: brspace –f tsextend –t system Function input Example: Extend tablespace Object Example: tablespace name Object input B R S P A C E Parameters Example: extent size Final parameter input Execute SQL command In BRSPACE: Full logging Unattended mode Exceptions to quick mode There are the following exceptions to quick mode: • Function dbshow to show database information. If you do not enter the class of the information to be displayed.

You must first select the action before BRSPACE can display the input menu to let you execute the function. BRSPACE displays the requested information. • Alter functions: o o o o o o dbalter dbparam tsalter dfalter tbalter idalter to alter the database instance to alter database parameters to alter tablespaces to alter data files to alter tables to alter indexes With these functions. • Multiple Objects If you select multiple objects in quick mode. If you do not enter an action in quick mode. You can now enter all required options and execute the function immediately. the database parameter) is specified. If the list is not what you require. which is Alter database parameter in this example. Example o The following example shows quick mode from the command line: brspace -f tsextend -t psapprd BRSPACE starts by displaying the input menu for the function Extend tablespace. you should also enter an action to specify what kind of alter function you require. Note (C) SAP AG 49 . The field for the object name is filled with your entry. but not the action: brspace -f dbalter -p audit_trail BRSPACE starts by displaying the function main menu for the function that you entered. o The following example shows a command line entry for an alter function where the object (here. BRSPACE displays a list of objects for confirmation. BRSPACE prompts you to select an action before you can continue.Choose the category and then the class that you require. you can go back and make a new selection.

brspace -V all For more information. Checking BR*Tools Release Information You can check the BR*Tools release information. enter the following at the command line: OS> <brtool> -V all For example. If you choose reset program status. the quick mode is deactivated and you can choose a new object to execute the function again. For more information on the approach to restore and recovery. This section discusses how to perform restore and recovery. see Restore and Recovery. When you contact SAP support to register problems concerning BR*Tools. see -V|-VERSION. Procedure To display release information with the command option. Integration (C) SAP AG 50 .When you have finished executing a function and you choose back after starting BRSPACE in quick mode. because the list would be too long. Result BR*Tools displays the following release information: • • • BR*Tools release BR*Tools patch level BR*Tools patch date Restore and Recovery with BR*Tools You can restore and recover your Oracle database with BR*Tools. it helps to give as much information as possible about the version you are using. For example. The exception to this is for the functions in segment management. where it makes no sense to display all tables or indexes. BRSPACE restores your original object selection. see the relevant command option for the tool that you are using. for more information on how to display release information for BRSPACE.

that is. Scrolling of 20 lines for the list menus. but only if you are an expert. only relevant for charactermode menus Note BRTOOLS only lets you change certain parameters for the backup. using the Oracle default settings Interval of 30 days for the displayed backups to be restored.sap profile manually and then restart BRTOOLS. when prompted by BRRECOVER. You call the restore and recovery function in BRTOOLS and check the displayed parameters.• BRTOOLS calls the SAP tool BRRECOVER. you must change the init<DBSID>. Serial recovery for applying offline redo logs. changing them as required. The recovery is normally attended. You have to have SYSDBA privilege to let BRRECOVER connect to the database. you have to enter parameters as the recovery runs. If you have to make other changes.sap. are as follows: o o Recovery type is complete database recovery. Make sure that you have set the necessary parameters for BRRECOVER in the Initialization Profile init<DBSID>. This me ans that only backups from the last 30 days can be selected by default. which are set in the initialization profile init<DBSID>. The default parameter values. offline redo log) files Disaster recovery Activities 1. This means that you have to log on as ora<sid> (UNIX) or <sid>adm (Windows). You can also perform restore and recovery with SQLPLUS. • • • Features You can perform the following restore and recovery functions with BR*Tools: • • • • • • • Complete database recovery Database point-in-time (PIT) recovery Tablespace point-in-time (PIT) recovery Whole database reset Restore of individual backup files Restore and application of archivelog (that is. o o (C) SAP AG 51 .sap.

sap. BRRECOVER calls SQLPLUS as necessary to apply offline redo log files. You can do one of the following: o Set the required entries now and run the recovery in unattended mode (C) SAP AG 52 . If required. • • Process 1. BRRECOVER performs the recovery. For more information about how to approach a complete database recovery. you change the default values for the restore and recovery parameters in the initialization profile init<DBSID>. you choose Restore and recovery Reset program status to set the defaults used to the values in the initialization profile init<DBSID>. Note This section discusses how to perform a complete database recovery. see Complete Database Recovery. 5. BRRECOVER takes you through the recovery step by step. 3. 4.2. because BRTOOLS uses these when it calls BRRECOVER. You choose Restore and recovery Complete database recovery . there is no corresponding parameter in the initialization profile. in which case the default value from the BRTOOLS program is used.sap. For certain input values. If required. You start the restore or recovery. You check the results in the BRRECOVER logs. displaying submenus as required. Complete Database Recovery with BR*Tools You can use BR*Tools for Oracle to perform a complete database recovery. 2. You start BRGUI or BRTOOLS. BRRECOVER calls BRRESTORE as necessary to perform restore functions. Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>.sap and restart BRTOOLS.

log displays the return code The detail log r<encoded timestamp>. see Showing Logs with BR*Tools.<ext> displays the progress. You open the database. 9. prompting you as necessary. o BRRESTORE logs for the restore functions: The summary log rest<DBSID>. 6. To start the recovery.crv displays the progress. BRRECOVER starts the recovery. For more information about how to view the logs. If you want to run the recovery in unattended mode. You perform the following steps with BRRECOVER. You restore data files. 4. You check the results in the BRRECOVER and BRRESTORE logs: o BRRECOVER logs: The summary log recov<DBSID>. 8.o Wait for BRRECOVER to prompt you during the recovery. Note If you are using attended mode. You check the status of the database files. 11. You select database backups. The detail log v<encoded timestamp>. BRRECOVER guides you through the recovery. you choose Continue. If required. you restore and apply an incremental backup. 10. archivelog – files. you select force in Confirmation mode (confirm).log displays the return code. 7. You restore and apply the online redo log – that is. that is. Database Point-In-Time Recovery with BR*Tools (C) SAP AG 53 . run the recovery in attended mode Recommendation We recommend you to run the recovery in attended mode. 3. 5.

You perform the following steps with BRRECOVER: Note If you are using attended mode. you select force in Confirmation mode (confirm). run the recovery in attended mode Recommendation We recommend you to normally run the recovery in attended mode. (C) SAP AG 54 . 3. BRRECOVER starts the recovery. Note This section discusses how to perform a database PIT recovery. 4. You can do one of the following: o o Set the command line now and run the recovery in unattended mode Wait for BRRECOVER to prompt you during the recovery. • • Process 1. you choose Continue. 2. prompting you as necessary. If you are sure of the required entries – for example. because BRTOOLS uses these when it calls BRRECOVER. BRRECOVER performs the recovery. You choose Restore and recovery Database point-in-time recovery . that is. You start BRGUI or BRTOOLS. see Database Point-In-Time Recovery. If you want to run the recovery in unattended mode. BRRECOVER calls SQLPLUS as necessary to apply offline redo log files. for a routine database copy – you can run the recovery in unattended mode. BRRECOVER guides you through the recovery.sap. BRRECOVER calls BRRESTORE as necessary to perform restore functions. To start the recovery. Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>.You can use BR*Tools for Oracle to perform a database point-in-time (PIT) recovery. For more information on how to approach a database PIT recovery.

You open the database. If required. 6. If you are using flashback database. The detail log v<encoded timestamp>. You restore and apply the offline redo log – that is. You select database backups or flashback. Note This section discusses how to perform a tablespace PIT recovery. For more information on how to approach a tablespace PIT recovery. see Showing Logs with BR*Tools.<ext> displays the progress. see Tablespace Point-in-Time Recovery. o BRRESTORE logsfor the restore functions: The summary log rest<DBSID>. You restore data files. continue with step 12 below. BRRECOVER performs the recovery.dpt displays the progress. you restore and apply an incremental backup. 9. You set a point in time for the recovery. Tablespace Point-In-Time Recovery with BR*Tools You can use BR*Tools for Oracle to perform a tablespace point-in-time (PIT) recovery. archivelog – files 12. For more information on how to view the logs. If required. you restore the control files. 7.log displays the return code The detail log r<encoded timestamp>. 13. archivelog – files and perform the flashback database. You check the status of the database files. 14. You check the results in the BRRECOVER and BRRESTORE logs: o BRRECOVER logs: The summary log recov<DBSID>.log displays the return code. 10. (C) SAP AG 55 .5. 11. You restore the offline redo log – that is. 8.

you select force in Confirmation mode (confirm). BRRECOVER calls the Oracle EXP and IMP tools to export and import the tablespaces that are not to be recovered. you must be able to open the database. if a component upgrade has failed – without affecting the other components in the same database. You can do one of the following: o o Set the command line now and run the recovery in unattended mode Wait for BRRECOVER to prompt you during the recovery. 2. including all other components installed in the same database. BRRECOVER starts the recovery. BRRECOVER calls SQLPLUS as necessary to apply offline redo log files. you choose Continue. You perform the following steps with BRRECOVER. the database is unavailable. 4. 3. only the database administrator (DBA) can access the database. For SAP systems. To start this procedure. You start BRGUI or BRTOOLS. You choose Restore and recovery Tablespace point-in-time recovery . run the recovery in attended mode Recommendation We recommend you to normally run the recovery in attended mode. • • • • • • Process 1. It allows you to restore the tablespaces for a single component – for example. Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>. BRRECOVER calls BRRESTORE as necessary to perform restore functions.Tablespace PIT recovery is especially useful for Multiple Components in One Database (MCOD). BRRECOVER opens the database in RESTRICT mode – that is. Note (C) SAP AG 56 .sap. because BRTOOLS uses these when it calls BRRECOVER. To start the recovery. If you want to run the recovery in unattended mode. BRRECOVER always recovers the SYSTEM and UNDO tablespaces in addition to the tablespaces that you select. that is.

prompting you as necessary.that is. see Whole Database Reset. BRRECOVER guides you through the recovery. You set a point in time and tablespaces for the recovery. If required. You open the database and plug in the previously exported tablespaces. 5. see Showing Logs with BR*Tools. 8. You export the tablespaces that are not required for the recovery. 9. 6. The detail log v<encoded timestamp>. You check the results in the BRRECOVER and BRRESTORE logs: o BRRECOVER logs: The summary log recov<DBSID>. Prerequisites (C) SAP AG 57 .tpt displays the progress.If you are running in attended mode. You check the status of the tablespaces. 13. o BRRESTORE logs for the restore functions: The summary log rest<DBSID>. archivelog .log displays the return code. The detail log r<encoded timestamp>. 7.log displays the return code. Note This section discusses how to perform a whole database reset. BRRECOVER performs the reset.files 12. 10. For more information on how to view the logs. Whole Database Reset with BR*Tools You can use BR*Tools for Oracle to perform a whole database reset. For more information on how to approach a whole database reset. You restore and apply the online redo log . You select database backups. 11. You restore the data files.<ext> displays the progress. you restore and apply an incremental backup.

BRRECOVER guides you through the reset.for example.you can run the reset in unattended mode. you apply an incremental backup. for a routine database copy .• Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>. You select a consistent database backup or a restore point. If you want to run the reset in unattended mode. (C) SAP AG 58 . that is. • • Process 1. you select force in Confirmation mode (confirm). you choose Continue. continue with step 11 below. You restore data files. BRRECOVER starts the reset. If you are using a restore point. You perform the following steps with BRRECOVER. run the reset in attended mode Recommendation We recommend you to normally run the reset in attended mode. because BRTOOLS uses these when it calls BRRECOVER. To start the reset.sap. Note If you are running in attended mode. 9. 4. If required. You check the status of the database files. You start BRGUI or BRTOOLS. 7. 2. 3. BRRECOVER calls SQLPLUS as necessary to apply offline redo log files. You can do one of the following: o o Set the command line now and run the reset in unattended mode Wait for BRRECOVER to prompt you during the reset. You only restore the offline redo log files if you selected a consistent online backup. 6. 8. You choose Restore and recovery Whole database reset . 5. BRRECOVER calls BRRESTORE as necessary to perform restore functions. You restore the control files and the offline redo log files. prompting you as necessary. If you are sure of the required entries .

drs displays the progress. archivelog – files if they were restored in step 7. You might lose data and cause downtime to fix the problem. You check the results in the BRRECOVER and BRRESTORE logs: o BRRECOVER logs: The summary log recov<DBSID>. For more information on how to approach restore of individual backup files. You apply the offline redo log – that is. we recommend that you first try other types of recovery supported by BR*Tools. Note This section discusses how to perform a restore of individual backup files. The detail log v<encoded timestamp>. You restore offline redo log – that is.log displays the return code The detail log r<encoded timestamp>. archivelog – files and flash back to the restore point. 13. BRRECOVER calls BRRESTORE to perform the restore. For more information on how to view the logs. Restore of Individual Backup Files with BR*Tools You can use BR*Tools for Oracle to restore individual backup files. Prerequisites (C) SAP AG 59 .<ext> displays the progress. you might severely damage the database if you use this procedure.10. see Restore of Individual Backup Files. 12. o BRRESTORE logs for the restore functions: The summary log rest<DBSID>. 11. You open the database. Caution Only perform this procedure if you are an expert in Oracle database administration.log displays the return code. see Showing Logs with BR*Tools. Even as an expert. If you are not an expert.

o o • You can choose individual actions independently. You cannot restore files from an rman_util backup. the usual safeguards are not present: o o • There is no database status check. The database is closed for the shortest time possible. You start BRGUI or BRTOOLS. 3. because BRTOOLS uses these when it calls BRRECOVER. You have less guidance than otherwise: BRRECOVER does not always use the BR*Tools logs to guide you. (C) SAP AG 60 .sap. 2.• Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>. Restore individual files from tape Restore individual files from disk Restore individual files from backup utility You cannot restore files from an RMAN backup. You choose Restore and recovery Restore of individual backup files . Since this function is designed for experts. BRRECOVER does not guide you step by step through restore and recovery. • For all procedures. not offline redo log incremental backup and detail logs required files. not by BRBACKUP backup and detail logs required BRARCHIVE. You cannot restore directories from a disk backup. No logs required No logs required No logs required You can only apply incremental Restore and apply BRBACKUP summary backup. the backup medium with the required backup files must obviously be present. You choose the required procedure from the list shown in the above table. You must meet the following prerequisites before starting the restore: Procedure Limitations BRBACKUP logs You can only restore files saved Restore files from BRBACKUP summary by BRBACKUP. Process 1.

2. If you are sure it contains the data that you require.BRRECOVER starts the restore. With these procedures. BRRECOVER displays a list of data files in the selected backup. which uses the following main BRRESTORE parameters: -n|-number for Restore individual files from tape -n2|-number2 for Restore individual files from disk (C) SAP AG 61 . You specify the location of the file: The position on tape for Restore individual files from tape The name of the backup file on disk for Restore individual files from disk The file name and back_id for Restore individual files from backup utility For all these procedure. which is effectively a one-to-one copy of database files. because changes to all data files are stored in one incremental save set. This does not apply to Restore and apply incremental backup. You cannot use these procedures to restore an RMAN backup. You perform the restore. You restore data files or restore and apply incremental backup. except an RMAN backup to disk. you must specify the full path to the file that you want to restore. Processing now depends on which procedure you chose. you can select a backup that terminated with errors. you are effectively performing a copy at operating-system level. If a disk or backup utility is involved in the restore. 1. 2. If you chose Restore files from BRBACKUP backup or Apply incremental backup: 1. 3. you can also specify the destination for the restore. You select the files that you want to restore. 5. You select a single database backup. 4. If you chose one of the remaining procedures: Note You need to know exactly which file to restore and where it is. If you are performing Restore files from BRBACKUP backup.

help -----------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-29 19. r .rif displays the progress.cont.log displays the return code.05. h .Reset program status Standard keys: c . BR0280I Time stamp 2003-01-29 19..-b2|-back2 for Restore individual files from backup utility 6.25 BR0663I Your choice: 'c' BR0259I Program execution will be continued.Restore and apply incremental backup 6 . s .rif displays the progress. You check the results in the BRRECOVER and BRRESTORE logs: o BRRECOVER logs: The summary log recov<DBSID>.back.Restore individual files from disk 4 .05. Example This example shows the contents of the BRRECOVER detail log file for Restore files from BRBACKUP backup.refr.Exit program 7 . o BRRESTORE logs for the restore functions: The summary log rest<DBSID>. BOR655I Choice menu 120 . The detail log v<encoded timestamp>. BR0699I Reading log file /oracle/GC2/sapbackup/backGC2. b .25 (C) SAP AG 62 .Restore individual files from backup utility 5 . For more information on how to view the logs. see Showing Logs with BR*Tools.log ...stop.Restore individual files from tape 3 ..log displays the return code The detail log r<encoded timestamp>.please decide how to proceed -----------------------------------------------------------------Restore of individual backup files 1 = Restore files from BRBACKUP backup 2 .

data1 .back.. r .bdjwcgfm.dbf Standard keys: c .05.archive_log /oracle/GC2/saparch/1_8....0 /oracle/GC2/sapbackup/cntrlGC2.bdjwgwtj.16. h .bdjwgvvh.26..cont.fnf 2003-01-29 16.36 (C) SAP AG 63 ..54 offline 17/17 disk 0 7 . BR0280I Time stamp 2003-01-29 19.DRSYS 3 /oracle/GC2/sapdata1/drsys_1/drsys. 9 .48. Name 1 .help -----------------------------------------------------------------BR0662I Enter your selection: BR0280I Time stamp 2003-01-29 19.fff 2003-01-23 14..dbf 20 .data1 .refr.BR0658I List menu 121 .05..PSAPTESTD 12 /oracle/GC2/sapdata6/testd_2/testd.05.29 BR0659I List menu 122 + please select one or more entries -----------------------------------------------------------------Backup files for restore Pos.bdjvdblz.05.data2 11 .ffd 2003-01-28 17.fft 2003-01-29 17.51 offline 17/17 disk 0 2 ..dbf 19 . b ..55 onl_cons 17/17 tape 0 5 ..please select one entry -----------------------------------------------------------------BRBACKUP database backups for restore Pos. BR0280I Time stamp 2003-01-29 19.48.29 BR0663I Your selection: '5' BR0699I Reading log file /oracle/GC2/sapbackup/bdjwgvvh.stop. s .14 offline 17/17 tape 1 3 .fff 2003-01-29 16. 18 . Tablespace Id.ffd 2003-01-29 17.03 offline 17/17 util_onl 0 .fnt 2003-01-29 16.bdjwgyrq.42 offline 17/17 util_onl 0 4 . Log Start Type Files Device Rc 1 = bdjwhckx.29 onl_cons 17/17 util_onl 0 6 .PSAPTESTI 11 /oracle/GC2/sapdata5/testi_1/testi.bdjwhadu..PSAPTESTD 2 /oracle/GC2/sapdata6/testd_1/testd.data1 10 .archive_log /oracle/GC2/saparch/1_9.30..fnf ..52.

h ....Additional output (output) . [bdjwgvvh..BRBACKUP backup run (backup) ..sap] 2 ....BRRESTORE command line (command) .Fill-up previous restores (fillup) .. b .fnf] 3 .Restore device type (device) ... [no] 3 # Compression mode (compress) . [0] 5 .. [no] 4 # Parallel execution (execute) .stop... [util_file] 5 ... [system/*******] 7 ~ Restore destination (rest_dest) ..cont.. [2.11-12 l E] Standard keys: c ....Query mode (query) ....BRRESTORE profile (profile) ... [-p initGC2.fnf -d util_file -r /oracle/GC2/dbs/initGC2. r ..back..please check/enter input values -----------------------------------------------------------------Additional BRRESTORE options for restore from BRBACKUP backup 1 .... r .help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-29 19... b .sap -b bdjwgvvh.11-12] Standard keys: c ..BR0663I Your selection: '9-11' BR0280I Time stamp 2003-01-29 19.....utl -m 2.... h ..36 BR0657I Input menu 123 ..refr..37 BR0663I Your choice: 'c' BR0259I Program execution will be continued.. [E] 7 ...... s .refr..please check/enter input values ------------------------------------------------------------------BRRESTORE main options for restore from BRBACKUP backup 1 .back...help -------------------------------------------------------------------- (C) SAP AG 64 .utl] 6 # Database user/password (user) ....05. [yes] 2 . [no] 4 .Confirmation mode (confirm) ..05......BACKINT/Mount profile (parfile) ...... s ... BR0280I Time stamp 2003-01-29 19.......stop..Files for restore (mode) .Message language (language) .... [initGC2. [no] 6 .cont..05. [] 8 .37 BR0657I Input menu 124 . [initGC2..

. 's[top]' to cancel the program: BR0280I Time stamp 2003-01-29 19.08.data1 will be overwritten BR0280I Time stamp 2003-01-29 19. BR0280I Time stamp 2003-01-29 19.06.06.40 (0) BR405I Start of file restore: rdjwhkwq..utl -m 2. BR0342I Database instance GC2 is open BR0064I Database instance GC2 will be shut down now .05.06....39 BR0663I Your choice: 'c' BR0259I Program execution will be continued.04 #FILE... BR291I BRRESTORE will be started with options '-p initGC2. 'b[ack]' to go back.05 BR0257I Your reply: 'c' BR0259I Program execution will be continued. 's[top]' to abort: BR0280I Time stamp 2003-01-29 19.04 BR0256I Enter 'c[ont]' to continue.06..05.04 BR0257I Your reply: 'c' BR0259I Program execution will be continued..11-12 l E' BR0280I Time stamp 2003-01-29 19.06 BR0229I Calling backup utility.data1 will be overwritten BR0428W File /oracle/GC2/sapdata6/testd_2/testd.. .04 BR0428W File /oracle/GC2/sapdata6/testd_1/testd..data2 #RESTORED..06. BR0280I Time stamp 2003-01-29 19.data2 will be overwritten BR0428W File /oracle/GC2/sapdata5/testi_1/testi.rsb 2003-01-29 19.sap -b bdjwgvvh. 1043853566 (C) SAP AG 65 .... /oracle/GC2/sapdata6/testd_2/testd..49 BR0670I Enter 'c[ont]' to continue..BR0662I Enter your choice: BR0280I Time stamp 2003-01-29 19..fnf -d util_file -r /oracle/GC2/dbs/initGC2.. =================================================================== BR401I BRRESTORE 6..

1043853591 BR0280I Time stamp 2003-01-29 19.08. you might severely damage the database with this procedure.08. because BRTOOLS uses these when it calls BRRECOVER.08.data1 #RESTORED. For more information about how to approach restore and apply of offline redo log files..08. (C) SAP AG 66 . Caution Only perform this procedure if you are an expert in Oracle database administration. Note This section discusses how to perform a restore and apply of offline redo log files...04 BR0403I BRRESTORE terminated successfully with warnings ================================================================= Restore and Application of Offline Redo Log Files with BR*Tools You can use BR*Tools for Oracle to restore and apply offline redo log files – that is. You might lose data and cause downtime to fix the problem. archivelog files..04 #FILE.sap. /oracle/GC2/sapdata6/testd_1/testd.04 BR0374I 3 of 3 files restored by backup utility BR0230I Backup utility called successfully BR0406I End of file restore: rdjwhkwq. 1043853582 BR0280I Time stamp 2003-01-29 19. Even as an expert.data1 #RESTORED. see Restore and Application of Offline Redo Log Files..08. If you are not an expert.04 BR0280I Time stamp 2003-01-29 19...rsb 2003-01-29 19.BR0280I Time stamp 2003-01-29 19. Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>.04 #FILE. we recommend that you first try other types of recovery supported by BR*Tools. /oracle/GC2/sapdata5/testi_1/testi. BRRESTORE restores offline redo log files and BRRECOVER applies the offline redo log files..

If you chose Restore archivelog files. Process 1. the usual safeguards are not present: o o There is no database status check. BRRECOVER calls SQLPLUS to apply the offline redo log files. you set the required options and choose Continue to start the restore Menu Entry BRRESTORE profile (profile) Instance of archivelog Equivalent BRRESTORE Command Options -p|-profile -a|-archive <DBSID> (C) SAP AG 67 . you can force application of the online redo logs – that is. You start BRGUI or BRTOOLS. You can overwrite existing offline redo log files if required. Open database • • Make sure that all database files are consistent before trying to open the database. You choose the required procedure. 4. You have less guidance than otherwise. BRRECOVER starts the restore or apply. Restore and recovery Restore and application of archivelog 3. You choose files .• Since this function is designed for experts. o o o • You must meet the following prerequisites before starting the restore or apply: Procedure Restore archivelog files o Requirements o Check that there is enough free space in the restore directory The BRARCHIVE summary log exists Apply archivelog Identify the offline redo log sequence number that the files database requires to start the apply. The database is closed for the shortest time possible. since BRRECOVER does not guide you step by step through restore and recovery. For Apply archivelog files. 2. the online redo logs that have been archived but not yet overwritten. You can choose individual actions independently.

All selected offline redo log files must be backed up on the same backup device type. Note 6. (C) SAP AG 68 . 7.Menu Entry thread (instance) Oracle Real Application Cluster (RAC) only First sequence number (first_seq) Last sequence number (last_seq) Equivalent BRRESTORE Command Options -a|-archive <log_no1>-<log_no2> -a|-archive <log_no1>-<log_no2> Restore device type (device) -d|-device BACKINT/Mount profile (parfile) Database user/password (user) Restore second copy (sec_copy) Destination directory (dest_dir) Confirmation mode (confirm) Query mode (query) Compression mode (compress) Additional output (output) Message language (language) -r|-parfile -u|-user -a2|-archive2 -a|-archive <log_no1>-<log_no2> rest_dir -c|-confirm -q|-query -k|-compress -o|-output -l|-language BRRESTORE command line This shows you the BRRESTORE command (command) that is to be executed using the current settings. Restore device type (device) is taken from the device type used for the backup containing the selected offline redo log files. 5.

hours. using the time stamp (that is. minutes. date. You must enter First sequence number (first_seq) and Last sequence number (last_seq). In this case. If you chose Open database. If required. In this case. all the offline redo logs in the sequence you specify are applied. If you chose Apply archivelog files. you set the required options and choose Continue to start the apply: Menu Entry Archivelog directory (archive_dir) Meaning The source directory used by SQLPLUS to apply the redo log files Instance of archivelog Database instance that created the offline redo log files thread (instance) Apply from redo log group (apply_redo) Apply changes recorded in the online redo log group First sequence number The sequence number of the first offline redo log file (first_seq) to apply Last sequence number The sequence number of the last offline redo log file (last_seq) to apply Last system change number (last_scn) End point-in-time (end_pit) Use backup control file (back_ctl) Parallel recovery (degree) SQLPLUS command (command) 11. Restore second copy (sec_copy) lets you use the second copy of the restore if the first is damaged or unavailable. you can also enter Last system change number (last_scn) or End point-in-time (end_pit). You check the results in the BRRECOVER and BRRESTORE logs: (C) SAP AG 69 . 9. only changes in the logs up till the last_scn or end_pit that you specify are applied. 15. 13. and seconds) Option for SQLPLUS RECOVER command Specifies whether the recovery is serial or parallel This shows you the SQLPLUS command that is to be executed using the current settings. 12. 14. Note Specifies that the recovery finishes with an Oracle system change number (SCN) Specifies that the recovery finishes with a normal point in time.8. 10. you open the database.

BR0655I Choice menu 131 .refr..back. For more information about how to view the logs. h .log displays the return code.Open database 4 .please check/enter input values ------------------------------------------------------------------Apply archivelog files to database instance GC2 (C) SAP AG 70 . BR0280I Time stamp 2003-01-29 19.o BRRECOVER logs: The summary log recov<DBSID>.Reset program status Standard keys: c ..please decide how to proceed ------------------------------------------------------------------Restore and application of archivelog files 1 = Restore archivelog files 2 .10.stop. b .55 BR0657I Input menu 134 .Exit program 5 .51 BR0663I Your choice: '2' BR0613I Database instance GC2 is shut down BR0750I Database instance GC2 will be mounted now .log displays the return code The detail log r<encoded timestamp>alf displays the progress. The detail log v<encoded timestamp>.Apply archivelog files 3 ..help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-29 19. o BRRESTORE logs for the restore functions: The summary log rest<DBSID>. s . see Showing Logs with BR*Tools.08. Example This example shows the contents of the BRRECOVER detail log file for Apply archivelog files.cont.. r .rsa displays the progress.

... [10] 6 ~ Last system change number (last_scn) .dbf ...... BR0336I Applying offline redo log file /oracle/GC2/saparch/1_10.cont..dbf ..back...... [recover from '/oracle/GC2/saparch' database] Standard keys: c .........10. [] 4 .....SQLPLUS command (command) .10.......... 's[top]' to abort: BR0280I Time stamp 2003-01-29 19.......Last sequence number (last_seq) . BR0783I Archivelog files with sequence number 9-10 will be applied to database GC2 BR0280I Time stamp 2003-01-29 19. [/oracle/GC2/saparch] 2 # Instance of archivelog thread (instance) . h ...56 BR0663I Your choice: 'c' BR0259I Program execution will be continued.First sequence number (first_seq) ..58 BR0257I Your reply: 'c' BR0259I Program execution will be continued..help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-29 19.....1 ....59 BR0337I Offline redo log file /oracle/GC2/saparch/1_10.... BR0280I Time stamp 2003-01-29 19..refr. s ......58 BR0337I Offline redo log file /oracle/GC2/saparch/1_9..dbf applied successfully =================================================================== (C) SAP AG 71 . r ....stop...Use backup control file (back_ctl) .. b .56 BR0670I Enter 'c[ont]' to continue.Apply from redolog group (apply_redo). 'b[ack]' to go back.58 BR0336I Applying offline redo log file /oracle/GC2/saparch/1_9.10...Archivelog directory (archive_dir) .. [no] 9 ~ Parallel recovery (degree) . [] 7 ~ End point-in-time (end_pit) .. BR0280I Time stamp 2003-01-29 19. [] 10 ..10...... [] 8 .10.dbf applied successfully BR0280I Time stamp 2003-01-29 19. [9] 5 ..10.. [] 3 .....

• This process does not actually restore data files or recover redo log files. It only restores the profiles and BRBACKUP or BRARCHIVE logs from copies that you made during previous backups. Prerequisites • Since this function is designed for experts. You might lose data and cause downtime to fix the problem. it prepares the database for you to perform one of the following guided BR*Tools options: • • Database point-in-time (PIT) recovery Whole database reset Complete database recovery and database PIT recovery are not possible after disaster recovery because the current control file (required for complete database recovery) is missing and the database cannot be opened (required for tablespace PIT recovery). If you are not an expert. Caution Only perform this process if you are an expert in Oracle database administration. Therefore. because it always requires the BRBACKUP Logs or the BRARCHIVE Logs. You use BRRECOVER to restore missing or damaged profiles and log files. You have only lost the profiles and the BRBACKUP or BRARCHIVE logs. (C) SAP AG 72 . Note This section discusses how to perform disaster recovery.Disaster Recovery with BR*Tools You can use BR*Tools for Oracle to recover from a disaster. You use this process if either of the following is true: • You have lost the entire database. you might severely damage the database with this procedure. which might not be available in a disaster. For more information on how to approach disaster recovery. the usual safeguards are not present: o There is no database status check. including the profiles and the BRBACKUP logs or the BRARCHIVE logs. we recommend that you first try other types of recovery supported by BR*Tools. see Disaster Recovery. BRRESTORE is not called by disaster recovery. Even as an expert.

o You have less guidance than otherwise. BRRECOVER calls BACKINT to perform the restore. o • For all procedures. If you choose device type Backup utility for the restore. You choose the required procedure: o o Restore profiles and logs files from BRBACKUP backup Restore profiles and logs files from BRARCHIVE backup BRRECOVER starts the restore and displays the menu Device Type. you note the following: o For a disk backup. If it is required but is unavailable. You choose Restore and recovery Disaster recovery . You start BRGUI or BRTOOLS. The default parameters are taken from the current profile. 3.sap. you can specify the backup directory. BRRECOVER displays the parameters for restoring the profiles or logs. 5. if available. You need to know exactly which file to restore and where it is. You can choose individual actions independently. The BACKINT parameter file must normally exist. 4. you must first try and recreate it before performing disaster recovery. BACKINT performs the restore from the profiles or logs of the latest backup. the backup medium with the required backup files must obviously be present. You are effectively performing a copy at operating-system level. o o o Process 1. note the following: o • • • The BACKINT repository with the latest backup must be available because the tapes are administered using this repository in the backup utility. Initialization Profile init<DBSID>. depending on what kind of device type you specified. since BRRECOVER does not guide you step by step through restore and recovery. 2. depending on the specific implementation that you are using. You choose the device tape where the backups of the profiles or logs are stored. For a disk backup or a utility backup. BRRECOVER restores the profiles and logs to the standard directory. BRRECOVER looks in the sub-directory <DBSID> of the specified (C) SAP AG 73 .

It uses the information there for the restore. the recommendation is No to avoid overwriting it. s . see Showing Logs with BR*Tools. You choose Continue to start restoring the selected profiles or logs.refr. h . the recommendation is Yes to let you restore it.Reset program status Standard keys: c . o 7.drv displays the progress.help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18. Example This example shows the contents of the BRRECOVER detail log file for Restore profiles and log files from BRBACKUP backup.log displays the return code. You check the results in the BRRECOVER logs: o o The summary log recov<DBSID>.cont. You can select several profiles or logs to restore.back. The detail log v<encoded timestamp>. b . o For a utility backup. 9. 8. check Prerequisites above. BRRECOVER warns you that the profiles and logs might be overwritten. r . If required.Exit program 4 . For more information on how to view the logs. BRRECOVER displays the restore menu where you can specify which profiles and logs to restore: o If a log or profile already exists on disk.18.stop.directory to find the summary log for BRBACKUP or BRARCHIVE. If a log or profile does not exist on disk. 6.27 (C) SAP AG 74 . You choose Continue to continue the restore with the displayed parameters.please decide how to proceed ------------------------------------------------------------------Disaster recovery main menu 1 = Restore profiles and log files from BRBACKUP backup 2 . BR0655I Choice menu 136 . you change the recommended values for restoring the profiles and logs.Restore profiles and log files from BRARCHIVE backup 3 . using a local tape.

.please make a selection ------------------------------------------------------------------Device type for restoring profiles and log files from BRBACKUP backup 1 = Local tape 2 ...refr..28 BR0657I Input menu 138 .cont....help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18... BR0280I Time stamp 2003-01-31 18..cont.Cpio input options (cpio_in_flags) . [-iuv -C 65536] Standard keys: c .help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18.18..back..Tape positioning command (tape_pos_cmd) ... BR0280I Time stamp 2003-01-31 18...29 BR0663I Your choice: 'c' (C) SAP AG 75 ...28 BR0663I Your choice: 'c' BR0259I Program execution will be continued. r .... h .....refr. [mt -f $ fsf $] 6 ... [/dev/rmt/1mn] 3 .please check/enter input values ------------------------------------------------------------------Parameters for restoring profiles and log files from local BRBACKUP tape 1 .sap] 2 . s . [mt -f $ rewind] 5 .Remote tape 3 .. b .Backup profile (profile) .stop.Remote disk 5 ...27 BR0656I Choice menu 137 .Tape rewind command (rewind) ...... [/dev/rmt/1m] 4 ...18.Tape drive with no-rewind (tape_address) .. s .18... b .Tape drive with rewind (tape_address_rew) .Backup utility Standard keys: c . h .Local disk 4 .BR0663I Your choice: 'c' BR0259I Program execution will be continued.. [/oracle/GC2/dbs/initGC2. r .18...stop.back..

.44 BR0257I Your reply: 'c' BR0259I Program execution will be continued.. BR0746I File /oracle/GC2/sapreorg/reorgGC2.. h .Oracle profile (init_ora) .BRSPACE summary log (space_log) . [yes] 6 . [no] 10 # Control file copy (control_file) .. [no] 11 # Oracle wallet file (ora_wallet) . 'b[ack]' to go back..42 BR0670I Enter 'c[ont]' to continue....42 BR0663I Your choice: 'c' BR0259I Program execution will be continued.BR*Tools profile (init_sap) .. [no] 3 . s .18..18... if you have not already done so (C) SAP AG 76 . [no] Standard keys: c .... [no] 7 .please check/enter input values ------------------------------------------------------------------Restore of profiles and log files from BRBACKUP backup 1 .BRSPACE structure log (struc_log) ...40 BR0657I Input menu 145 .Oracle spfile (sp_file) .. .Detail log (det_log) ...18..back. [no] 2 ............. [no] 9 . [no] 4 # BACKINT/Mount profile (init_utl) .refr..... r .cont. [no] 5 .log will be restored from /dev/rmt/1mn BR0280I Time stamp 2003-01-31 18. 's[top]' to abort: BR0280I Time stamp 2003-01-31 18..Summary log (sum_log) ..stop........ b ..BR0259I Program execution will be continued.......BRSPACE parameter log (param_log) ....help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18.. [no] 8 .log will be restored from /dev/rmt/1mn BR0746I File /oracle/GC2/sapreorg/structGC2.. BR0210I Please mount BRBACKUP volume....... BR0280I Time stamp 2003-01-31 18.18..

.. reorgGC2.. /oracle/GC2/sapbackup/vdjwrcgu..log BR0668I Warnings or errors occured .1/reorgGC2.19.log #0/26 BR0370I Directory /oracle/GC2/sapbackup/vdjwrcgu created BR0202I Saving /oracle/GC2/sapreorg/reorgGC2. 's[top]' to abort: BR0280I Time stamp 2003-01-31 18.log will be restored from /oracle/GC2/sapbackup/vdjwrcgu.46 BR0226I Rewinding tape volume in device /dev/rmt/1m ..BR0280I Time stamp 2003-01-31 18..you can continue to ignore them or go back to repeat the last action BR0280I Time stamp 2003-01-31 18...log BR0203I to /oracle/GC2/sapbackup/vdjwrcgu/structGC2.. BR0280I Time stamp 2003-01-31 18.18.1/structGC2. 'b[ack]' to go back.structGC2..44 BR0670I Enter 'c[ont]' to continue. BR0370I Directory /oracle/GC2/sapbackup/vdjwrcgu.log .log BR0203I to /oracle/GC2/sapbackup/vdjwrcgu/reorgGC2..log will be overwritten BR0746I File /oracle/GC2/sapreorg/reorgGC2. 'b[ack]' to go back.log BR0202I Saving /oracle/GC2/sapreorg/structGC2. #FILE... BR0428W File /oracle/GC2/sapreorg/reorgGC2. 's[top]' to abort: BR0280I Time stamp 2003-01-31 18.32 BR0670I Enter 'c[ont]' to continue.46 BR0257I Your reply: 'c' BR0259I Program execution will be continued.log.log will be overwritten BR0746I File /oracle/GC2/sapreorg/structGC2..be patient BR0351I Restoring /oracle/GC2/sapbackup/vdjwrcgu.22.35 BR0257I Your reply: 'c' (C) SAP AG 77 .. BR0428W File /oracle/GC2/sapreorg/structGC2. BR0226I Winding tape volume in device /dev/rmt/1m .1/reorg_log+struct_log #RESTORED.1/reorg_log+struct_log BR0355I from /dev/rmt/1mn .log will be restored from /oracle/GC2/sapbackup/vdjwrcgu..22..10 BR0226I Rewinding tape volume in device /dev/rmt/1m .log ..1 created BR0280I Time stamp 2003-01-31 18. BR0285I This function can take several seconds/minutes .18.18.

log BR0355I from /oracle/GC2/sapbackup/vdjwrcgu. /oracle/GC2/sapbackup/vdjwrcgu. where you specify the options with which you call BRSPACE.log #RESTORED.1/reorgGC2..log BR0749I 2 files have been successfully restored ================================================================== Managing Flashback Database with BR*Tools You can use BR*Tools for Oracle to manage and display the flashback database status and restore points...log .BR0259I Program execution will be continued.. Set the required options: Menu Entry BRSPACE profile (profile) Equivalent BRSPACE Command Option -p|-profile Database -u|-user user/password (user) Flashback action (action) -f mfback -a|-action (C) SAP AG 78 . Procedure 1.log . or from the command line: o BRGUI or BRTOOLS: 1.. 2..1/reorgGC2.log #RESTORED.. Restore and Recovery Manage flashback database BRGUI or BRTOOLS displays the menu BRSPACE main options for managing flashback database. Start the procedure using BRGUI or BRTOOLS.... /oracle/GC2/sapbackup/vdjwrcgu. Choose ... #FILE. BR0351I Restoring /oracle/GC2/sapreorg/reorgGC2. #FILE. /oracle/GC2/sapreorg/structGC2.log BR0351I Restoring /oracle/GC2/sapreorg/structGC2. /oracle/GC2/sapreorg/reorgGC2.log BR0355I from /oracle/GC2/sapbackup/vdjwrcgu..1/structGC2..1/structGC2.

continue with step 4 (quick mode). We recommend you to use short names for ease of use. the database must be in archivelog mode and the flash recovery area must already be configured. Choose Continue to start BRSPACE. Choose or confirm the required action: o Switch on flashback database For flashback database. 4. as described in SAP Note 966073. 4. You can specify the required retention period for the flashback data in New retention time in min (retention). 2. BRSPACE writes a detail log. Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. If you have already entered the action. 3. o Command line: Enter at least the following command: brspace -f mfback You can enter more parameters if required. The restore point name is restricted to 30 characters in BR*Tools. o o Switch off flashback database Create restore point This creates a normal or a guaranteed restore point. (C) SAP AG 79 . see BRSPACE -f mfback. BRSPACE starts and you see a message that includes Start of BRSPACE processing.Menu Entry Equivalent BRSPACE Command Option Restore point (point) -f mfback -p|-point Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) -c|-confirm -s|-scroll -l|-language This shows you the BRSPACE -f BRSPACE command mfback command that is to be executed line (command) using the current settings. 3. From now on. For more information.

Follow the prompts to perform your chosen action. o Show flashback status This shows the following information: Entry Meaning Flashback database status (status) On or off Oldest flashback time (oldest_time) Oldest flashback time in the flashback logs Oldest flashback system change number (SCN) Retention period for the flashback data Current size of the flashback data Estimated size of the flashback data Location of flash recovery area Oldest flashback SCN (oldest_scn) Flashback retention time in min (retention) Current flashback size in KB (curr_size) Estimated flashback size in KB (estim_size) Location of recovery area (ra_location) Used space in recovery area in KB Used space in flash recovery area (ra_space) Space limit in recovery area in KB Maximum space in flash recovery (ra_limit) area Reclaimable space in KB (ra_reclaim) Number of files in recovery area (ra_files) o Space available for reuse in flash recovery area Number of files in flash recovery area Show restore points This shows a list of available restore points. You can choose from the displayed list of available restore points.o Drop restore point This deletes a normal or a guaranteed restore point. timestamp and system change number (SCN). 5. whether guaranteed or not. Result (C) SAP AG 80 . and used storage in KB (for guaranteed restore points only).

log displays the return code. see: • • • • • • Complete database recovery Database point-in-time (PIT) recovery Tablespace point-in-time (PIT) recovery Whole database reset Restore of Individual Backup Files with BR*Tools Restore and Application of Offline Redo Log Files with BR*Tools Setting Point In Time and Tablespaces for Recovery You use this procedure to specify the: • Point in time (PIT) when using BRRECOVER to perform one of the following: o o Database PIT recovery Tablespace PIT recovery • Tablespaces to be recovered when using BRRECOVER to perform a tablespace PIT recovery Note You can use this to select tablespaces from a single component if you are running Multiple Components in One Database (MCOD). check the results in the BRSPACE logs.If you set the option Create log file (parameter -l|-log). see Showing Profiles and Logs with BR*Tools.mfb displays the details. Prerequisites • You can specify the PIT as one of the following: (C) SAP AG 81 . • • The summary log space<DBSID>. For more information on how to view the logs with BR*Tools. The detail log s<encoded timestamp>. Procedures for Restore and Recovery with BR*Tools For more information on how and when to use these procedures.

To set the point in time for the recovery. See Example below for the contents of the log file.o A normal point in time. o o • You can specify tablespaces by one of the following: o o SAP owner of the tablespaces Individual tablespace names Note To select tablespaces from a single component if you are running Multiple Components in One Database (MCOD). Procedure 1. minutes. enter one of the following: Menu Entry Equivalent BRRECOVER Command Option (C) SAP AG 82 . date. If you are performing a tablespace PIT recovery. using the time stamp (that is. and seconds) An Oracle system change number (SCN) An Oracle log sequence number (SEQ) Note BRRECOVER translates a normal point in time or an SCN into the corresponding sequence number (SEQ) of the last Oracle log to be applied. enter one of the following: Menu Entry Database instance of archivelog thread (instance) Last archivelog sequence to apply (last_seq) Last system change number to apply (last_scn) End point-in-time for recovery (end_pit) Equivalent BRRECOVER Command Option -j|-ins|-instance -n|-seq|-sequence -g|-scn|-change -n|-pit|-time 2. Each component has a different SAP owner. enter the SAP owner of the tablespaces in the component that you want to recover. hours.

using a tablespace PIT recovery. [] 2 ~ Last archivelog sequence to apply (last_seq) ... h .... BR0657I Input menu 107 . [] 3 ~ Last system change number to apply (last_scn) . Choose Continue to continue processing with the selected PIT........... Prerequisites (C) SAP AG 83 ...stop... v<encoded timestamp>. [] 4 ~ End point-in-time for recovery (end_pit) .....please check/enter input values -----------------------------------------------------------------Options for tablespace point-in-time recovery of database GC2 1 # Database instance of archivelog thread (instance) ..... Example This example shows the contents of the BRRECOVER detail log file for this procedure.back..Menu Entry Database owner for recovery (owner) Tablespaces for recovery (tablespace) Equivalent BRRECOVER Command Option -w|-own|-owner -a|-tsp|-tablespace 3..... For more information on how to view the logs. [] 6 ~ Tablespaces for recovery (tablespace) . [] Standard keys: c .. r . 4.. [] 5 ~ Database owner for recovery (sap_owner) .help ------------------------------------------------------------------ Checking the Status of Database Files ...refr.. s .. Check the results in the BRRECOVER detail log.cont.<ext>. see Showing Logs with BR*Tools. This procedure checks the database for critical errors that might prevent production operation.. b .I You check the database status when using BRRECOVER to perform Complete database recovery..

41 BR0331I Start and mount of database instance GC2 successful BR0118I Tablespaces and data files (C) SAP AG 84 .12. It then checks the availability of the following files: • • • Control files Redo log files Data files BRRECOVER checks whether there are any data files not online.12.12. For more information on how to view the logs. Check the results in the BRRECOVER detail log. 2. closes and again mounts – the database to refresh the views V$DATAFILE and V$RECOVER_FILE. Procedure 1. See Example below for the contents of the log file. BR0614I Database instance GC2 is mounted BR0750I Database instance GC2 will be remounted now BR0280I Time stamp 2003-01-29 19. Check the display and continue with the database recovery. If so..12.31 BR0330I Starting and mounting database instance GC2 . it recommends to set them online. BR0280I Time stamp 2003-01-29 19.25 BR0307I Shutting down database instance GC2 . Example This example shows the contents of the BRRECOVER detail log file for the recovery phase “Check Status of Database Files”.31 BR0308I Shutdown of database instance GC2 successful BR0280I Time stamp 2003-01-29 19.<ext>.. BR0280I Time stamp 2003-01-29 19. BRRECOVER stops the recovery automatically..BRRECOVER remounts – that is. see Showing Logs with BR*Tools. Note If there are no files that need to be recovered.. v<encoded timestamp>.

55.data1 ONLINE 3 10493952 2002-07-31 16.dbf INUSE 1 2097664 2003-01-29 19.it will be recovered BR0760I Data file /oracle/GC2/sapdata5/testi_1/testi...ctl 4579328 2003-01-28 21.data2 not current .ctl 4579328 2003-01-28 21.04.Tablespace Status File Status Id.19 5040603 35651591 FILE NOLINK /oracle/GC2/sapdata2/cntrl/control02..it will be recovered Selecting Database Backups You select BRBACKUP database backups when using BRRECOVER to perform: • • Complete database recovery Database point-in-time (PIT) recovery 85 (C) SAP AG .11..55 5954 35651591 FILE NOLINK EXAMPLE UNKNOWN /oracle/GC2/sapdata2/example_1/example..04.28 5101811 35651591 FILE NOLINK .19 5040603 35651591 FILE NOLINK /oracle/GC2/sapdata3/cntrl/control03.11.. Size Creation time Creation scn Device Type Link DRSYS UNKNOWN /oracle/GC2/sapdata1/drsys_1/drsys.data1 not current . BR0119I Redo log files File Status Group Size First time First scn Device Type Link /oracle/GC2/origlog/redo01m1.it will be restored/recreated and recovered BR0760I Data file /oracle/GC2/sapdata6/testd_1/testd..28 5101811 35651591 FILE NOLINK /oracle/GC2/mirrlog/redo01m2.data1 not current .dbf INUSE 1 2097664 2003-01-29 19..11.57 5973 35651591 FILE NOLINK .it will be restored/recreated and recovered BR0758I Data file /oracle/GC2/sapdata6/stabi_1/stabi.55.19 5040603 35651591 FILE NOLINK BR0755I Checking the status of database files for instance GC2.it will be recovered BR0760I Data file /oracle/GC2/sapdata6/testd_2/testd.data1 not found . BR0120I Control files File Size Reset time Reset scn Device Type Link /oracle/GC2/sapdata1/cntrl/control01..ctl 4579328 2003-01-28 21.data1 not found .. BR0758I Data file /oracle/GC2/sapdata5/stabd_1/stabd.data1 ONLINE 4 126492672 2002-07-31 16.

In this case. Unless you select another backup.• • • Tablespace point-in-time (PIT) recovery Whole database reset Restore of individual backup files Prerequisites • BRRECOVER only displays backups that finished with a return code of 0 or 1. and partial backups. BRRECOVER processes these intelligently. you can only select the following types of database backup: o o o o Complete offline Complete online consistent Incremental offline Incremental online consistent For more information. incremental. where all backups are displayed. (C) SAP AG 86 . For whole database reset. BRRECOVER does not display partial backups for selection. Choose Continue to continue processing with the selected backup. BRRECOVER recommends the most recent successful backup as a default for the recovery. 2. BRRECOVER also displays flashback database and restore points. For restore of individual backup files. For a complete database recovery. If required. it automatically detects overlapping partial backups and uses only the latest available data files. • • • • • • See Example below for the contents of the log file. or a tablespace PIT recovery. Procedure 1. Note For whole database reset. BRRECOVER only displays incremental backups. BRRECOVER also displays backups with errors. it uses this for the recovery. The exception to this is for restore of individual backup files. you can select multiple partial backups. If you are applying an incremental backup. select a backup that is different from the default recommended by BRRECOVER. see Database Backup Types. you can only select one backup. a database PIT recovery. That is. BRRECOVER displays complete.

Example This example shows the contents of the BRRECOVER detail log file for this procedure.bdjwgyrq.05.fft 2003-01-29 17. Database backups for complete database recovery Pos.fff 2003-01-29 16.14 offline full tape 1 3 .For complete or PIT recovery.<ext>.II (C) SAP AG 87 . For example. BRRECOVER roughly checks the availability of offline redo log – that is.29 onl_cons full util_onl 0 Checking the Status of Database Files .42 offline full util_onl 0 4 . see Showing Logs with BR*Tools.bdjwgvvh.fnf 2003-01-29 16. 3.bdjwgwtj. v<encoded timestamp>. Check the results in the BRRECOVER detail log. Log Start Type Mode Device Rc 1 = bdjwhckx. depending on the device type used for the backup: o o o Tape or BACKINT Disk Stage (remote disk) If the files are unavailable.30. This does not apply to complete database recovery and restore individual backup files.16. a tablespace might have been extended during an online backup.26. Such files are not contained in the backup but they might need to be recreated.bdjwhadu.48.55 onl_cons full tape 0 5 . For more information on how to view the logs. You can continue if you are sure that either of the following is true: o o You can find the required offline redo log files The offline redo log files will not be required Note BRRECOVER identifies files that were added during or (only for PIT) after the selected backup.51 offline full disk 0 2 .ffd 2003-01-29 17. BRRECOVER issues a warning. archivelog – files in the BRARCHIVE summary log file.fnt 2003-01-29 16.

• BRRECOVER checks the following files to identify which ones need to be overwritten: o o o Control files Redo log files Data files • BRRECOVER identifies files that need to be later deleted. Procedure 1. Such files need to be later deleted. Check the display and continue with the database recovery. see Showing Logs with BR*Tools.<ext>.You check the database status when using BRRECOVER to perform one of the following: • • Database Point-In-Time Recovery with BR*Tools Whole Database Reset with BR*Tools This procedure checks the availability and status of database files to determine how to handle them during restore and recovery. Prerequisites • BRRECOVER checks whether the control files are available. See Example below for the contents of the log file. For more information on how to view the logs. closes and again mounts – the database to refresh the views V$DATAFILE and V$RECOVER_FILE. v<encoded timestamp>. If the control files are available. BRRECOVER remounts – that is. 2. BRRECOVER writes the results of the status check to the BRRECOVER detail log file. a tablespace might have been extended after the selected backup or PIT.for whole database reset PIT – for database or tablespace PIT Example For example. Example (C) SAP AG 88 . Check the results in the BRRECOVER detail log. It identifies files that were added after the: o o Selected backup .

BR0280I Time stamp 2003-01-29 19.55.58 BR0330I Starting and mounting database instance GC2 .11.19 5040603 35651591 FILE NOLINK (C) SAP AG 89 .ctl ....28 5101811 35651591 FILE NOLINK .. BR0280I Time stamp 2003-01-29 19.28 5101811 35651591 FILE NOLINK /oracle/GC2/mirrlog/redo01m2..57 5973 35651591 FILE NOLINK .data1 RECOVER 3 10493952 2002-07-31 16.19 5040603 35651591 FILE NOLINK /oracle/GC2/sapdata2/cntrl/control02. BR0119I Redo log files File Status Group Size First time First scn Device Type Link /oracle/GC2/origlog/redo01m1.ctl 4579328 2003-01-28 21..08 BR0331I Start and mount of database instance GC2 successful BR0118I Tablespaces and data files Tablespace Status File Status Id.04.55...dbf INUSE 1 2097664 2003-01-29 19.04...dbf INUSE 1 2097664 2003-01-29 19.35.35.11.. Size Creation time Creation scn Device Type Link DRSYS UNKNOWN /oracle/GC2/sapdata1/drsys_1/drsys.ctl BR0203I to /oracle/GC2/sapbackup/vdjwhnnh/control01..ctl 4579328 2003-01-28 21..51 BR0307I Shutting down database instance GC2 .data1 RECOVER 4 126492672 2002-07-31 16. BR0120I Control files File Size Reset time Reset scn Device Type Link /oracle/GC2/sapdata1/cntrl/control01.This example shows the contents of the BRRECOVER detail log file for this procedure.57 BR0308I Shutdown of database instance GC2 successful BR0370I Directory /oracle/GC2/sapbackup/vdjwhnnh created BR0202I Saving /oracle/GC2/sapdata1/cntrl/control01. BR0614I Database instance GC2 is mounted BR0750I Database instance GC2 will be remounted now BR0280I Time stamp 2003-01-29 19..36. BR0280I Time stamp 2003-01-29 19.55 5954 35651591 FILE NOLINK EXAMPLE UNKNOWN /oracle/GC2/sapdata2/example_1/example.35.

19 5040603 35651591 FILE NOLINK BR0755I Checking the status of database files for instance GC2.11. Procedure 1..data1 will be overwritten BR0428W File /oracle/GC2/sapdata4/indx_1/indx. See Example below for the contents of the log file.<ext>. you cannot continue with the recovery.data1 will be overwritten BR0428W File /oracle/GC2/sapdata2/example_1/example. v<encoded timestamp>. After you have selected the tablespaces to recover. see Showing Logs with BR*Tools.. Check the results in the BRRECOVER detail log. BRRECOVER checks if the tablespaces that you selected and the other data tablespaces are separate self-contained groups.36. Check the display and continue with the tablespace recovery. BR0280I Time stamp 2003-01-29 19. Example (C) SAP AG 90 . this procedure identifies the corresponding database files.. This means that it checks whether there are references such as indexes or constraints that point from members of a group to members outside this group. • • BRRECOVER writes the results of the status check to the BRRECOVER detail log file..ctl 4579328 2003-01-28 21. Prerequisites • BRRECOVER checks that all files are online.data1 will be overwritten ./oracle/GC2/sapdata3/cntrl/control03. based on the tablespaces that you selected earlier. BR0428W File /oracle/GC2/sapdata1/drsys_1/drsys.. BRRECOVER identifies which data files need to be recovered. If so.09 BR0668I Warnings or errors occurred . This is normally true if the database is open. For more information on how to view the logs.you can continue to ignore them or go back to repeat the last action Checking the Status of Tablespaces You check the status of tablespaces when using BRRECOVER to perform Tablespace Point-In-Time Recovery. 2..

.refr.55.55.55.cont. h ..data1 ONLINE 3 10493952 2002-07-31 16. BR0342I Database instance GC2 is open in RESTRICT mode BR0118I Tablespaces and data files Tablespace Status File Status Id.. r .Exit program 10 ...28 5217256 35651591 FILE NOLINK /oracle/GC2/mirrlog/redo01m2. Size Creation time Creation scn Device Type Link DRSYS ONLINE /oracle/GC2/sapdata1/drsys_1/drsys.BR0655I Control menu 106 ..Reset program status Standard keys: c .please decide how to proceed -----------------------------------------------------------------Tablespace point-in-time recovery main menu 1 + Set point-in-time and tablespaces for recovery 2 + Select database backup 3 = Check the status of tablespaces 4 * Export tablespaces not being recovered 5 * Restore required data files 6 # Restore and apply incremental backup 7 * Restore and apply archivelog files 8 * Open database and plug in exported tablespaces 9 .dbf INUSE 1 2097664 2003-01-31 11.back.55 5954 35651591 FILE NOLINK EXAMPLE ONLINE /oracle/GC2/sapdata2/example_1/example.dbf INUSE 1 2097664 2003-01-31 11..28 5217256 35651591 FILE NOLINK .stop. s ..help -----------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18...57 5973 35651591 FILE NOLINK .data1 ONLINE 4 126492672 2002-07-31 16.36. BR0119I Redo log files File Status Group Size First time First scn Device Type Link /oracle/GC2/origlog/redo01m1. b .55. (C) SAP AG 91 .35 BR0663I Your choice: 'c' BR0259I Program execution will be continued.

19 5040603 35651591 FILE NOLINK /oracle/GC2/sapdata3/cntrl/control03.PSAPRAWD.11.you can continue to ignore them or go back to repeat the last action BR0280I Time stamp 2003-01-31 18.36 BR0257I Your reply: 'c' BR0259I Program execution will be continued..PSAPTESTD. 'b[ack]' to go back. BR0280I Time stamp 2003-01-31 18.19 5040603 35651591 FILE NOLINK /oracle/GC2/sapdata2/cntrl/control02.INDX.PSAPRAWI.data1 will be overwritten BR0428W File /oracle/GC2/sapdata2/example_1/example.11. PSAPTESTI...36.ctl 4579328 2003-01-28 21..PSAPSTABI.ctl 4579328 2003-01-28 21.36.19 5040603 35651591 FILE NOLINK BR0755I Checking the status of database files for instance GC2...data1 will be overwritten .36. BR0428W File /oracle/GC2/sapdata1/drsys_1/drsys..XDB BR0285I This function can take several seconds/minutes ..ctl 4579328 2003-01-28 21.PSAPTTTTD BR0285I This function can take several seconds/minutes .11.data1 will be overwritten BR0428W File /oracle/GC2/sapdata4/indx_1/indx.37 BR0739I Checking if following tablespaces are self-contained: DRSYS.BR0120I Control files File Size Reset time Reset scn Device Type Link /oracle/GC2/sapdata1/cntrl/control01.35 BR0670I Enter 'c[ont]' to continue. 's[top]' to abort: BR0280I Time stamp 2003-01-31 18.be patient BR0280I Time stamp 2003-01-31 18.52 BR0739I Checking if following tablespaces are self-contained: PSAPSTABD.EXAMPLE.36.USERS.TOOLS. BR0668I Warnings or errors occured .be patient Exporting the Tablespaces Not Being Recovered (C) SAP AG 92 .

Check the results in the BRRECOVER detail log. BR0655I Control menu 106 . BRRECOVER identified which tablespaces it needs to export because they are not involved in the recovery. This means that the recovery does not affect these tablespaces. BRRECOVER sets them to status READ ONLY. see Showing Logs with BR*Tools. • Procedure 1.You export tablespaces that do not need to be recovered when using BRRECOVER to perform Tablespace Point-In-Time Recovery. • Before exporting these tablespaces. BRRECOVER calls EXP or EXPDP (Data Pump) to export only the metadata of these tablespaces. See Example below for the contents of the log file.please decide how to proceed ------------------------------------------------------------------Tablespace point-in-time recovery main menu 1 + Set point-in-time and tablespaces for recovery 2 + Select database backup 3 + Check the status of tablespaces 4 = Export tablespaces not being recovered 5 * Restore required data files 6 # Restore and apply incremental backup 7 * Restore and apply archivelog files (C) SAP AG 93 . During the database status check. BRRECOVER writes the results to the BRRECOVER detail log file. Example This example shows the contents of the BRRECOVER detail log file for this procedure. The tablespace data remains in the data files but is invisible to the database during the recovery. Check the display and continue with the database recovery. v<encoded timestamp>. Note In fact.tpt. Prerequisites • BRRECOVER uses the Oracle EXP tool to export the tablespaces that are not involved in the recovery. For more information on how to view the logs. 2.

Oracle Corporation. b ....stop.06 BR0663I Your choice: 'c' BR0259I Program execution will be continued.1.37.PSAPTTTTD BR0280I Time stamp 2003-01-31 18.37.Production on Fri Jan 31 18:37:14 2003 Copyright (c) 1982. s .PSAPTESTD.0 .07 BR0670I Enter 'c[ont]' to continue.refr.help -----------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18. (C) SAP AG 94 .back.Reset program status Standard keys: c . 2002.PSAPTESTD. BR0342I Database instance GC2 is open in RESTRICT mode BR0767I Following tablespaces will be set READ ONLY: PSAPSTABD.2. 'b[ack]' to go back.. All rights reserved. BR0370I Directory /oracle/GC2/sapbackup/vdjwrdum created BR0278I Command output of '/oracle/GC2/bin/exp': Export: Release 9. BR0768I Tablespace PSAPSTABD set READ ONLY BR0768I Tablespace PSAPSTABI set READ ONLY BR0768I Tablespace PSAPTESTD set READ ONLY BR0768I Tablespace PSAPTTTTD set READ ONLY BR0742I Metadata of the following tablespaces will be exported: PSAPSTABD. 's[top]' to abort: BR0280I Time stamp 2003-01-31 18.cont.0.. r .. 'b[ack]' to go back.Exit program 10 .10 BR0257I Your reply: 'c' BR0259I Program execution will be continued.37. 's[top]' to abort: BR0280I Time stamp 2003-01-31 18.14 BR0257I Your reply: 'c' BR0259I Program execution will be continued.PSAPTTTTD BR0280I Time stamp 2003-01-31 18.37.PSAPSTABI.10 BR0670I Enter 'c[ont]' to continue.8 * Open database and plug in exported tablespaces 9 .PSAPSTABI. h .37.

. BR0744I EXP called successfully for database instance GC2 (C) SAP AG 95 ..0 ..0 Production With the Partitioning option JServer Release 9. exporting cluster definitions ... . exporting cluster definitions . For tablespace PSAPSTABD .. exporting triggers .. . . exporting table definitions .. .Username: Connected to: Oracle9i Enterprise Edition Release 9..2.Production Export done in WE8DEC character set and UTF8 NCHAR character set Note: table data (rows) will not be exported About to export transportable tablespace metadata. exporting table DBABD . . . exporting referential integrity constraints .. end transportable tablespace metadata export Export terminated successfully without warnings..2.. .0.... exporting table DBABL . exporting table SDBAH_2 . . exporting table definitions . exporting table SDBAH_1 For tablespace PSAPTTTTD . exporting table definitions . .0. exporting cluster definitions .1. exporting table DBAML . exporting table definitions For tablespace PSAPTESTD . . exporting table SDBAH For tablespace PSAPSTABI . exporting cluster definitions .1.

the offline redo log files. you also restore the offline redo log files.if required for whole database reset . but only if you selected an online consistent backup. a database PIT recovery only restores them if they: • • Are missing Do not match the selected backup This procedure calls BRRESTORE to restore the control files and . Note Whereas a whole database reset always restores the control files.archive_logs] -c|-confirm (C) SAP AG 96 . Prerequisites You can repeat this phase if a BRRESTORE call has failed. Procedure 1. Set the required options: Menu Entry BRRESTORE profile (profile) Equivalent BRRESTORE Command Option -p|-profile BRBACKUP run (backup) -b|-backup|b1|backup1 Restore device type (device) BACKINT/Mount profile (parfile) Files for restore (mode) Confirmation mode (confirm) -d|-device -r|-parfile -m|-mode 0[. See Example below for the contents of the log file.Restoring Control Files You restore the control files when using BRRECOVER to perform: • • Database point-in-time (PIT) recovery Whole database reset For a whole database reset.

see Showing Logs with BR*Tools. The detail log r<encoded timestamp>. Example The control file restore runs in a similar way to the example shown in Restoring Data Files. Check the results in the BRRESTORE logs: o o The summary log rest<DBSID>. 6. Restoring Data Files You use this procedure when using BRRECOVER to perform: • Complete database recovery (C) SAP AG 97 . the keyword archive_logs is used. is used. Note -l|-language This shows you the BRRESTORE command that is to be executed using the current settings. 0.Menu Entry Query mode (query) Compression mode (compress) Equivalent BRRESTORE Command Option -q|-query -k|-compress Additional output (output) -o|-output Message language (language) BRRESTORE command line (command) 2. 5. The files for restore varies: o o For the control files restore. To start the restore with the selected options.rsb displays the progress.log displays the return code. a dummy file ID. For the restore of offline redo log files from an online consistent backup (only relevant for whole database reset. 4. Files for restore (mode) refers to the Oracle file ID or the keyword archive_logs. 3. Restore device type (device) is taken from the device type used for the selected backup. For more information on how to view the logs. choose Continue. as described above).

• • • • Database point-in-time (PIT) recovery Tablespace point-in-time (PIT) recovery Whole database reset Restore of individual backup files This procedure calls BRRESTORE to restore files as follows: Type of Recovery Complete database recovery Database PIT recovery and whole database reset Tablespace PIT recovery What is Restored Data files that BRRECOVER identified as missing in Checking the Status of Database Files All data files Data files of the selected tablespaces plus the data files for the system and undo tablespaces • For Restore files from BRBACKUP backup: Selected data files Restore individual backup files • For Apply incremental backup: Incremental backup save set Prerequisites • • BRRECOVER repeats this phase as required to restore all required files. See Example below for the contents of the log file. Set the required options: Menu Entry BRRESTORE profile (profile) BRBACKUP run (backup) Equivalent BRRESTORE Command Option -p|-profile -b|-backup|b1|backup1 Fill-up previous restores -f|-fillup (fillup) Restore device type -d|-device (C) SAP AG 98 . BRRECOVER avoids duplicate restores by logging which files it has already restored. Procedure 1.

Menu Entry (device) Equivalent BRRESTORE Command Option BACKINT/Mount profile -r|-parfile (parfile) Database user/password -u|-user (user) Restore destination (rest_dest) Only for restore individual backup files. option Restore files from BRBACKUP backup: -m|-mode = <rest_dest> B1-4 o Complete database recovery: -m|-mode <file_ID1>-<file_ID2> o Database PIT recovery or whole database reset: -m|-mode all o Tablespace PIT recovery: -m|-mode <tablespace_list> Files for restore (mode) o Restore individual backup files: Restore files from BRBACKUP backup: -m|-mode <file_ID1>-<file_ID2> Apply incremental backup: -m|-mode incr Confirmation mode (confirm) Query mode (query) Compression mode (compress) Parallel execution (execute) Additional output -c|-confirm -q|-query -k|-compress -e|-execute -o|-output (C) SAP AG 99 .

the files for restore can vary.. or a keyword such as incr or all.log displays the return code... For more information on how to view the logs.Restore device type (device) .. 2.rsb displays the progress. 5...sap] 2 . BRRESTORE main options for restore of database files 1 .. However. The detail log r<encoded timestamp>...Menu Entry (output) Message language (language) Equivalent BRRESTORE Command Option -l|-language BRRESTORE command This shows you the BRRESTORE command that is line (command) to be executed using the current settings. [system/*******] 7 . see Showing Logs with BR*Tools... 4.Files for restore (mode) .... [initGC2.... [9-10] (C) SAP AG 100 . Check the results in the BRRESTORE logs: o o The summary log rest<DBSID>. Note 3...BRBACKUP backup run (backup) .. choose Continue. as described in the table above at the start of this procedure. [bdjwhckx.. [dbs/initGC2.ffd] 3 . Files for restore (mode) refers to the Oracle file ID.. The files for restore can vary.... To start the restore with the selected options..Database user/password (user) .BRRESTORE profile (profile) . as described in the table above at the start of this procedure.... [no] 4 .... [disk] 5 # BACKINT/Mount profile (parfile) .utl] 6 . Restore device type (device) is taken from the device type used for the selected backup.Fill-up previous restores (fillup) . 6. Example This example shows the contents of the BRRECOVER detail log file for this procedure when executed as part of a complete database recovery: Note This example shows files 9 and 10 to be restored... a tablespace. 7....

..stop. h ... b ....43 BR0657I Input menu 112 # please check/enter input values -----------------------------------------------------------------Additional BRRESTORE options for restore of database files 1 ..rsb 2003-01-29 19. r ..12....sap -b bdjwhckx.ffd -d disk -m 9-10 -c force -k no -e 0 -l E] Standard keys: c . r ..Additional output (output) .40 (0) BR0405I Start of file restore: rdjwhlma.Message language (language) .12.continuing processing with default reply 'cont' BR0280I Time stamp 2003-01-29 19.BRRESTORE command line (command) .cont. [no] 3 ..Standard keys: c ...help -----------------------------------------------------------------BR0280I Time stamp 2003-01-29 19.. [force] 2 ... [no] 4 .back.Compression mode (compress) .. s ..12....refr.ffd -d disk -m 9-10 -c force -k no -e 0 -l E' ================================================================== BR0401I BRRESTORE 6..12.43 BR0134I Unattended mode with 'force' active .12.Query mode (query) .44 BR0457I Probably the database must be recovered due to partial restore BR0280I Time stamp 2003-01-29 19.Parallel execution (execute) . s .. [E] 7 .. [0] 5 .43 BR0134I Unattended mode with 'force' active ..44 BR0407I Restore of database: GC2 BR0408I BRRESTORE action ID: rdjwhlma BR0409I BRRESTORE function ID: rsb BR0449I Restore mode: PARTIAL BR0411I Database files for restore: (C) SAP AG 101 ..stop. h .sap -b bdjwhckx.....cont..back....help -----------------------------------------------------------------BR0280I Time stamp 2003-01-29 19... [no] 6 .Confirmation mode (confirm) .continuing processing with default reply 'cont' BR0291I BRRESTORE will be started with options '-p initGC2. b .refr. [-p initGC2.

.rsb 2003-01-29 19.64%.data1 #2/11 BR0280I Time stamp 2003-01-29 19.data1 /oracle/GC2/sapdata6/stabi_1/stabi. /sapmnt/uw1030/b/backup/bdjwhckx/stabd.12..data1 .no operator confirmation allowed BR0351I Restoring /oracle/GC2/sapdata5/stabd_1/stabd.data1 #2/5 BR0280I Time stamp 2003-01-29 19.12..51 BR0416I 2 files found to restore.. /oracle/GC2/sapdata5/stabd_1/stabd.data1 #RESTORED. estimated end time: 19:12 BR0001I *********************************_________________ BR0351I Restoring /oracle/GC2/sapdata6/stabi_1/stabi.008 MB of 12...016 MB of 12..016 MB done BR0204I Percentage done: 100. /oracle/GC2/sapdata6/stabi_1/stabi.30. total size 12...12.data1 BR0355I from /sapmnt/uw1030/b/backup/bdjwhckx/stabi.12.016 MB BR0424I Files will not be decompressed BR0421I Restore device type: disk BR0420I Files will be restored from directory: /sapmnt/uw1030/b/backup/bdjwhckx BR0134I Unattended mode with 'force' active .. /sapmnt/uw1030/b/backup/bdjwhckx/stabi.data1 BR0355I from /sapmnt/uw1030/b/backup/bdjwhckx/stabd.12..ffd 2003-01-29 17.016 MB done BR0204I Percentage done: 66.data1 #RESTORED..8. #FILE.46 BR0418I 1 of 2 files restored .46 BR0402I BRRESTORE terminated successfully ================================================================== BR0292I Execution of BRRESTORE terminated with return code 0 Restoring and Applying an Incremental Backup (C) SAP AG 102 ./oracle/GC2/sapdata5/stabd_1/stabd.data1 BR0419I Files will be restored from backup: bdjwhckx.46 BR0280I Time stamp 2003-01-29 19. #FILE.46 BR0418I 2 of 2 files restored . estimated end time: 19:12 BR0001I ************************************************** BR0406I End of file restore: rdjwhlma.data1 .00%.

Prerequisites • • BRRECOVER lets you repeat this phase if there is an error. If so. BRRECOVER checks whether there are any data files not online. it recommends to set them online.You use this procedure when using BRRECOVER to perform: • • • • • Complete database recovery Database point-in-time (PIT) recovery Tablespace point-in-time (PIT) recovery Whole database reset Restore of Individual Backup Files with BR*Tools This procedure calls BRRESTORE to restore and apply incremental backups only if you specified this when you selected a database backup. Set the required options: Equivalent BRRESTORE Menu Entry Command Option BRRESTORE profile (profile) -p|-profile BRBACKUP run (backup) -b|-backup|b1|backup1 Restore device type (device) BACKINT/Mount profile (parfile) Database user/password (user) Files for restore (mode) Confirmation mode (confirm) Query mode (query) -d|-device -r|-parfile -u|-user -m|-mode incr -c|-confirm -q|-query Additional output (output) -o|-output (C) SAP AG 103 . Procedure 1.

This procedure restores and applies offline redo log files as follows: • (C) SAP AG 104 . Restore device type (device) is taken from the device type used for the selected backup. 3. that is. 4. The detail log r<encoded timestamp>. Prerequisites • BRRESTORE restores the offline redo log files in ascending order of application. see Showing Logs with BR*Tools.log displays the return code. This means that the first logs to be restored are those that are needed to start the apply phase. Check the results in the BRRESTORE logs: The summary log rest<DBSID>.rsb displays the progress.Equivalent BRRESTORE Menu Entry Command Option Message language (language) BRRESTORE command line (command) 2. choose Continue. Note -l|-language This shows you the BRRESTORE command that is to be executed using the current settings. For more information on how to view the logs. 1. archivelog files. To start the apply and restore with the selected options. 2. Restoring and Applying Offline Redo Log Files You use this procedure when using BRRECOVER to perform: • • • • Complete database recovery Database point-in-time (PIT) recovery Tablespace point-in-time (PIT) recovery Whole database reset – if you selected an online backup This procedure uses BRRESTORE to restore and SQLPLUS to apply offline redo log files.

Status Apply From Disk Tape Util Rman Stage 1 . files originally backed up with util cannot be restored and applied in the same group as files backed up with rman.14 in_arch yes arch 5 . For example. all offline redo log files that were restored in Restoring Control Files are applied in one group. If you have entered a point in time (PIT) or an Oracle system change number (SCN) to specify the end point of the recovery. and V$RECOVERY_STATUS.17 in_redo yes redo • • • Note Some files might be present on multiple media sources. o o • If you perform this procedure as part of a PIT recovery. V$RECOVER_FILE.11 in_arch yes arch 2 . only the offline redo log files required to reach the specified point are applied. If so. In this example. BRRECOVER checks whether there are any data files not online. which is generally small. All the files in a group must be from the same source. closes and again mounts – the database to refresh the views V$DATAFILE.o o Up to 100 files are processed as a single group.15 redo_arch yes redo 6 . BRRECOVER first remounts – that is. (C) SAP AG 105 . For whole database reset. For example. as in the following example: Example Archivelog files to apply for complete recovery Pos. it would use the disk version of the file. BRRECOVER translates this to the equivalent log sequence number (SEQ). a file might be present on disk and on tape. it recommends to set them online. Seq. they are processed in parallel with two concurrent processing threads.16 redo_arch yes redo 7 . BRRECOVER first displays a list of the redo log files to apply. If there are two or more groups of files.13 in_arch yes arch 4 . BRRECOVER normally uses the most accessible version of the file.12 in_arch yes arch 3 . unless you specify otherwise.

• If the first copy of the redo log files is missing. You can also change the source for sequences of offline redo log files. choose one of the following: o o Change the command line for restore near the end of this procedure Perform Restoring and Applying Offline Redo Log Files . 4.Expert Mode instead of this procedure. • See Example below for the contents of the log file. For a tablespace PIT recovery. To do this. 3. If a restore is necessary – that is. If required. If required. change the default options for the sources that BRRECOVER uses when it restores or applies the offline redo log files: Menu Entry First sequence number (first_seq) Details of the Offline Redo Log File Group to be Changed The sequence number of the first offline redo log file for which you want to change the source Last sequence number The sequence number of the last offline redo log file (last_seq) for which you want to change the source New source for applying (source) The new source of the offline redo log files 2. If a restore is necessary. set the required options: Menu Entry BRRESTORE profile (profile) Profile for cpio (prof_cpio) Equivalent BRRESTORE Command Options -p|-profile -p|-profile (C) SAP AG 106 . Procedure 1. Choose Continue. if not all required offline redo log files are on disk – BRRECOVER displays the restore menu. the tablespaces not involved in the recovery. BRRECOVER sets OFFLINE the data files of the exported tablespaces – that is. you can use the second copy. you can specify a different source for each missing offline redo log file that is listed with multiple sources. It identified these during the procedure Selecting a Database Backup. if available. • BRRECOVER recreates files that were added to the database during or (only for PIT) after the selected backup.

if required. If the restore menu is displayed. If required. choose Continue.Menu Entry Profile for dd (prof_dd) Profile for rman (prof_rman) Profile for rman_dd (prof_rman_dd) Profile for rman_set (prof_rman_set) Equivalent BRRESTORE Command Options -p|-profile -p|-profile -p|-profile -p|-profile BACKINT/Mount profile (parfile) -r|-parfile Database user/password (user) Destination directory (dest_dir) Confirmation mode (confirm) Additional output (output) Message language (language) -u|-user -a|-archive = <rest_dir> -c|-confirm -o|-output -l|-language 5. Parallel recovery (degree). Unless you are an expert. (C) SAP AG 107 . Recommendation 8. 6. change the default options for applying offline redo log files: Equivalent BRRECOVER Menu Entry Command Options First sequence number (first_seq) First offline redo log to apply Last offline redo log to apply Yes or no -e|-degree Last sequence number (last_seq) Use backup control file (back_ctl) Parallel recovery (degree) 7. we recommend that you only change the last entry. BRRECOVER displays the menu for applying offline redo log files to the database instance.

If a restore is necessary. choose Continue to start the restore. Unless you are an expert. if required. you can choose unattended mode. Set the required options to apply a group of offline redo log files: Menu Entry Apply unattended (unattend) Details of the Offline Redo Log File Group to be Applied Log group applied in attended or unattended mode First sequence number First offline redo log to apply (first_seq) Last sequence number Last offline redo log to apply (last_seq) SQLPLUS command (command) 15. (C) SAP AG 108 . Otherwise. Recommendation o Equivalent BRRESTORE Command Options for Restore of an Offline Redo Log Group -c|-confirm This shows you the BRRESTORE command that is to be executed using the current settings. BRRECOVER prompts you again for each group. set the required options for restoring an offline redo log group: Menu Entry Restore unattended (unattend) BRRESTORE command line (command) 12. If the above restore menu is displayed. Apply unattended (unattend). o 13. BRRESTORE restores the offline redo log files. we recommend that you only change the first entry. If necessary. We recommend that only experts change the BRRESTORE command line. Choose Continue.9. 14. 10. If you are restoring large numbers of offline redo log files. Recommendation o This shows you the SQLPLUS command that is to be executed using the current settings. 11.

Note 18. If there are two or more groups of offline redo log files to process. Example This example shows the contents of the BRRECOVER detail log file for this procedure. BRRESTORE and BRRECOVER work in parallel to restore and apply the files.. if you are processing many groups of offline redo log files.rsa displays the progress for restoring the offline redo log files.. 25.. BRRECOVER prompts you again for each group. o The detail log r<encoded timestamp>.First sequence number (first_seq) . No restore is required in this example because all the offline redo log files are on disk. If you process in attended mode. The detail log v<encoded timestamp>. Therefore. 17. [11] 2 . Otherwise. BRRECOVER applies the offline redo log files.o If you are applying large numbers of offline redo log files. Then you can switch to unattended mode to finish processing automatically. 19. 22.<ext> displays the progress for applying the offline redo log files. o For more information on how to view the logs.. see Showing Logs with BR*Tools. 24. we recommend that you process the first few groups in attended mode to check that processing is correct. Note 21. Check the results in the BRRESTORE and BRRECOVER logs. BR0280I Time stamp 2003-01-29 19. you see the above menus with the BRRESTORE or BRRECOVER command line before each group of offline redo log files is processed. [17] (C) SAP AG 109 .Last sequence number (last_seq) . you can choose unattended mode. 23.13. 16. If successful.39 BR0657I Input menu 117 # please check/enter input values ------------------------------------------------------------------Apply archivelog files to database instance GC2 1 . 20. BRRECOVER displays the message Media recovery completed.

40 BR0337I Offline redo log file /oracle/GC2/saparch/1_11.40 BR0337I Offline redo log file /oracle/GC2/saparch/1_13.13.3 # Use backup control file (back_ctl) .dbf ....39 BR0336I Applying offline redo log file /oracle/GC2/saparch/1_11.13. [no] 4 ~ Parallel recovery (degree) .dbf applied successfully BR0280I Time stamp 2003-01-29 19. BR0280I Time stamp 2003-01-29 19..39 BR0134I Unattended mode with 'force' active .dbf .refr. b .stop.13.dbf applied successfully BR0280I Time stamp 2003-01-29 19..13.13.13. BR0336I Applying offline redo log file /oracle/GC2/saparch/1_13.dbf .dbf ..40 BR0784I Media recovery completed Performing Flashback Database (C) SAP AG 110 .40 BR0337I Offline redo log file /oracle/GC2/saparch/1_12. r .13.dbf applied successfully BR0280I Time stamp 2003-01-29 19. BR0336I Applying offline redo log file /oracle/GC2/saparch/1_14.continuing processing with default reply 'cont' BR0781I All archivelog files to be applied are on disk ..... s . BR0336I Applying offline redo log file /oracle/GC2/saparch/1_12.back.dbf applied successfully BR0280I Time stamp 2003-01-29 19.. h . [] Standard keys: c .help ------------------------------------------------------------------BR0280I Time stamp 2003-01-29 19.40 BR0337I Offline redo log file /oracle/GC2/saparch/1_14..no restore required BR0783I Archivelog files with sequence number 11-14 will be applied to database GC2 BR0280I Time stamp 2003-01-29 19...cont...

In this example.12 in_arch yes arch 3 . Seq.14 in_arch yes arch 5 .11 in_arch yes arch 2 . If so. and V$RECOVERY_STATUS.You use this procedure when using BRRECOVER to perform flashback database during: • • Database point-in-time (PIT) recovery Whole database reset Prerequisites • BRRECOVER first remounts – that is. Procedure 1. unless you specify otherwise. For example. as in the following example: Example Archivelog files to apply for complete recovery Pos. BRRECOVER checks whether there are any data files not online. Status Apply From Disk Tape Util Rman Stage 1 . BRRECOVER normally uses the most accessible version of the file.15 redo_arch yes redo 6 . If required.13 in_arch yes arch 4 . change the default options for Oracle to automatically apply the offline redo log files: Menu Entry First sequence number (first_seq) Meaning First offline redo log to apply (C) SAP AG 111 . BRRECOVER displays a list of the redo log files to be automatically applied by Oracle during the flashback database. V$RECOVER_FILE. closes and again mounts – the database to refresh the views V$DATAFILE.17 in_redo yes redo • • Note Some files might be present on multiple media sources.16 redo_arch yes redo 7 . it would use the disk version of the file. a file might be present on disk and on tape. it recommends to set them online.

5. alter the Database flashback target for the flashback: Menu Entry Database flashback target (target) Equivalent BRRECOVER Command Options -o|-rpt|-point -u|-user -a|-archive = <rest_dir> -c|-confirm -o|-output -l|-language The SQL command that is to be executed using the Database flashback current settings. set the required options: Menu Entry BRRESTORE profile (profile) Profile for cpio (prof_cpio) Profile for dd (prof_dd) Profile for rman (prof_rman) Profile for rman_dd (prof_rman_dd) Profile for rman_set (prof_rman_set) Equivalent BRRESTORE Command Options -p|-profile -p|-profile -p|-profile -p|-profile -p|-profile -p|-profile BACKINT/Mount profile (parfile) -r|-parfile Database user/password (user) Destination directory (dest_dir) Confirmation mode (confirm) Additional output (output) Message language (language) 3. (C) SAP AG 112 . For more information. If required. you can change the restore point.Menu Entry Last sequence number (last_seq) Meaning Last offline redo log to apply 2. Choose Continue. 4. see your Oracle command (command) SQL documentation. If a restore is necessary. For whole database reset.

see Showing Logs with BR*Tools. For more information on how to view the logs. Opening the Database You use this procedure when using BRRECOVER to perform: • • • • • Complete database recovery Database point-in-time (PIT) recovery Tablespace point-in-time (PIT) recovery Whole database reset Restore and application of offline redo log files This procedure opens the database. recommends you to switch them online Checks data files and warns you if they are not online o • BRRECOVER deletes files that were added after the selected backup (for whole database reset) or the PIT (for database or tablespace PIT). 8. it also plugs in the exported tablespaces. The resetlogs parameter to open the database is relevant for the following types of recovery: o o o • Database PIT Tablespace PIT Whole database reset if the selected backup was online (C) SAP AG 113 . This does not apply to complete database recovery. Prerequisites • BRRECOVER: o Checks tablespaces and. 7. if offline. It identified these during the database status check or selection of database backups.rsa displays the progress for restoring the offline redo log files. For database point-in-time recovery. For tablespace PIT recovery.6. you can change the timestamp. BRRECOVER performs flashback database. Choose Continue. Check the results in the BRRESTORE and BRRECOVER logs. The detail log r<encoded timestamp>.

For a tablespace PIT recovery. BRRECOVER then checks the tablespaces and data files. BRRECOVER deletes files that are no longer used by the database. the redo log files. it updates the control files to reflect a new incarnation of the database. we recommend you to accept the setting that BRRECOVER proposes. 2. Recommendation Unless you are an expert. BRRECOVER reinstates the tablespaces that were exported because they were not required for the recovery. depending on the type of recovery: Database point-in-time recovery completed. BRRECOVER displays a message like the following. In addition. BRRECOVER reinstates the tables that were exported as described at the end of Prerequisites above. BRRECOVER opens the database. BRRECOVER warns you that no more logs can be applied after the database has been opened. it imports the metadata of these tablespaces). Select the required option for Reset logs option (reset_logs). For a PIT recovery and whole database reset. If the resetlogs option is set. (C) SAP AG 114 . BRRECOVER does the following after it has reopened the database: o o It temporarily drops the affected tablespaces. Choose Yes to continue opening the database. Resetlogs • For tablespace PIT recovery.o Restore and application of offline redo log files Note reformats the online redo log files and resets their sequence number to 1. It sets the affected tablespaces to READ-WRITE status. It calls the Oracle IMP tool to import the affected tablespaces (to be precise. Normally you can ignore this warning. For a PIT recovery or a whole database reset from an online consistent backup. BRRECOVER recreates the missing temporary database files. To do this. If successful. and the control files. o Procedure 1.

r . v<encoded timestamp>.35 BR0308I Shutdown of database instance GC2 successful BR0280I Time stamp 2003-01-29 19..35 BR0304I Starting and opening database instance GC2 . s .44.cont.refr. b .back.<ext>. BR0280I Time stamp 2003-01-29 19.44.44.. BR0614I Database instance GC2 is mounted BR0064I Database instance GC2 will be shut down now BR0280I Time stamp 2003-01-29 19. Check the results in the BRRECOVER detail log. For more information on how to view the logs. [alter database open resetlogs] Standard keys: c .continuing processing with default reply 'cont' BR0786I Database instance GC2 will be opened now with option 'resetlogs' BR0787I No more archivelog files can be applied after database has been opened BR0675I Do you want to perform this action? BR0126I Unattended mode active . [resetlogs] 2 * Open database command (command).44. h . see Showing Logs with BR*Tools.28 BR0307I Shutting down database instance GC2 .continuing processing with default reply 'yes' BR0280I Time stamp 2003-01-29 19.3.44. using a database PIT recovery... Example This example shows the contents of the BRRECOVER detail log file for this procedure.44. BR0280I Time stamp 2003-01-29 19.35 BR0657I Input menu 135 # please check/enter input values ------------------------------------------------------------------Options for opening database instance GC2 1 ~ Reset logs option (reset_logs) .55 BR0305I Start and open of database instance GC2 successful (C) SAP AG 115 .35 BR0134I Unattended mode with 'force' active .stop.help ------------------------------------------------------------------BR0280I Time stamp 2003-01-29 19.

Size Creation time Creation scn Device Type Link DRSYS ONLINE /oracle/GC2/sapdata1/drsys_1/drsys..00. (C) SAP AG 116 .00. when the backup was performed with BRBACKUP.data1 was recreated BR0118I Tablespaces and data files Tablespace Status File Status Id.57 BR0789I Temporary database file /oracle/GC2/sapdata3/temp_1/temp. the subdirectories in sapdata<n> directories are automatically created.ctl 4579328 2003-01-29 19.ctl 4579328 2003-01-29 19.45 5101776 35651591 FILE NOLINK /oracle/GC2/sapdata3/cntrl/control03.. • BRRESTORE can run unattended when option -c force is set.data1 ONLINE 4 126492672 2002-07-31 16.. when necessary. You can also restore the offline redo log files that were backed up with BRARCHIVE. The option -c only suppresses the first confirmation prompts for mounting a volume... In the process.55. BR0120I Control files File Size Reset time Reset scn Device Type Link /oracle/GC2/sapdata1/cntrl/control01.ctl 4579328 2003-01-29 19. Any non-database files and directories you saved can also be restored..data1 ONLINE 3 10493952 2002-07-31 16.dbf INUSE 1 2097664 0000-00-00 00.57 5973 35651591 FILE NOLINK .45 5101776 35651591 FILE NOLINK /oracle/GC2/sapdata2/cntrl/control02.55.00 0 35651591 FILE NOLINK /oracle/GC2/mirrlog/redo01m2. BR0119I Redo log files File Status Group Size First time First scn Device Type Link /oracle/GC2/origlog/redo01m1.44..BR0280I Time stamp 2003-01-29 19.45 5101776 35651591 FILE NOLINK BR0716I Database point-in-time recovery completed BRRESTORE This SAP tool enables you to restore an entire database backup or parts of it.44.44.55 5954 35651591 FILE NOLINK EXAMPLE ONLINE /oracle/GC2/sapdata2/example_1/example. This operation can be performed at the same time as the restore of the corresponding backup.00 0 35651591 FILE NOLINK .44.dbf INUSE 1 2097664 0000-00-00 00..

use the option -m full. database files and non-database files are restored separately from each other. -b2 or -n. BRRESTORE also requires several parameters to be configured in the initialization profile init<DBSID>.see Recovery with SQLPLUS For more information. However. BRRESTORE can be started with option -a in parallel to BRRESTORE with option -b or -n. several tape devices must be available. You can manually specify a different directory as well. • • • To restore a complete backup (reset the database). non-database files or directories). Only one of the options -a.sap. as recommended. See Effects of the Command Options. However.• BRRESTORE uses the BRBACKUP logs and the summary log from BRARCHIVE to decide where to restore the requested file. One or more incomplete BRRESTORE runs can be completed with the option -f. The key word all can be combined with other options in an <object list> (for example. It does not recover the database. (C) SAP AG 117 . if they were backed up in separate backup runs. -k. In both cases. BRRESTORE automatically determines the files to be restored. This is the standard setting with exec_parallel. and the number of parallel copy processes must correspond to the number of tape devices. -b last is selected. BRRESTORE can also restore archived redo log files in parallel if they are located on several volumes. and -r can be preset using the appropriate BRRESTORE profile parameters. -b. start the recovery afterwards using one of the following: • • BRRECOVER The SQLPLUS tool from Oracle . A list of the command options can be found in the Command Options for BRRESTORE. -m. To do this. BRRESTORE can restore a database in parallel. see: • • Restoring Files Examples of BRRESTORE Runs Restoring Files BRRESTORE can be called directly from the operating system command level. If you do not select any of these options. • Integration BRRESTORE only restores the selected backup. • The options -d. -n2 can be set.

The control file can only be addressed directly by using file ID 0. Database data files can be defined with either a full or generic path. When you start the restore of online redo log files or the control file. Single files from the backed up directory can also be restored. the mirror copies of these files are automatically recreated. for example. Archived offline redo log files can be addressed using their log sequence numbers. To address all the online redo log files. • • • • • • Completion of BRRESTORE Runs If a BRRESTORE restore is incomplete. Database files Database files abnormal termination reload remaining files brrestore –m all brrestore –m all -f rcumxbqa.rsb (C) SAP AG 118 . due to a termination of the BRRESTORE program you can complete the remainder of the files in another BRRESTORE run with the option -f|-fillup. sapdata<n> directory). Online redo log files can only be addressed directly by using the redo log group numbers with an additional leading zero (0<n>). A generic path must contain the directory SAPDATA_HOME and a generic specification (for example. All the file IDs used in a specified interval <file_ID1>-<file_ID2> must be known in the database. specify file ID 00.• Non-database files and directories must be defined with their complete path.

If you want to complete a terminated BRRESTORE run, start BBRESTORE with the option -f|-fillup and specify the log name of the BRRESTORE run to be completed. If you want to complete several runs, specify all log names with the option -f. You can also use option -f last to complete the last BRRESTORE run, or option -f <days> to complete all BRRESTORE runs started in the last <day> days. For more information, see -f|-fillup. See also: Completion of BRBACKUP Backups

Examples of BRRESTORE Runs

brrestore -b last -m all

Restore all tablespaces without the control file and online redo log files from the last successful backup
• brrestore -b bcnmhluz.aft -m full

Restores all the files from backup bcnmhluz.aft, including the control file and the online redo log files Restores the mirror copies of the control file and the online redo log files
• brrestore -m /usr/sap/C11/SYS/profile

Restores the SAP profiles
• brrestore -m /oracle/C11/sapdata1=/oracle/C11/sapdata5

Restores all the database data files that were originally stored in the subdirectories of /oracle/C11/sapdata1 in directory
/oracle/C11/sapdata5 • brrestore -b last -m 1-10,01-04,0

Restores all the database data files with Oracle file IDs from 1 through 10, the four online redo log files, and the control file starting from the last successful backup Restores the mirror copies of the control file and the online redo log files
• brrestore -m 0

Restores the control file. Restore the mirror copies of the control file
• brrestore -b last -m /oracle/C11/sapdata2/ddicd_5/ddicd.data5

Restores a database data file starting from the last successful backup
• brrestore -a 200-220

(C) SAP AG

119

Restores the archived redo log files with the log sequence numbers from 200 through 220 into the archiving directory
• brrestore -a 40-70=/oracle/C11/sapbackup 7190=/oracle/C11/sapreorg

Restores the archived redo log files with the log sequence numbers from 40 through 70 in directory sapbackup and those with the log sequence numbers from 71 through 90 in directory /oracle/C11/sapreorg
• brrestore -a 40-69,70-100=/oracle/C11/sapbackup

Restores the archived redo log files with the log sequence numbers from 40 through 69 in the archiving directory, and those with the log sequence numbers from 70 through 100 in directory sapbackup
• brrestore -n det_log

Restores a detail log to the local working directory

Command Options for BRRESTORE
This section describes the command options for BRRESTORE. If you start BRRESTORE without command options, the values in the Initialization Profile init<DBSID>.sap are used. Unless otherwise specified in the initialization profile init<DBSID>.sap, BRRESTORE restores the files of all tablespaces from the last successful backup of the database. If you use BRRESTORE with command options (see below), these override the corresponding values in the initialization profile. To use the options, you can specify either the letter indicated or the complete word. Syntax
brrestore [-a|-archive|-a1|-archive1 [<DBSID>,]<log_no>[=<rest_dest>]| [<DBSID>,]<log_no1>-<log_no2>[=<rest_dest>]| [<DBSID>,]<log_no_list>[==<rest_dest>]] [-a2|-archive2 [<DBSID>,]<log_no>[=<rest_dest>]| [<DBSID>,]<log_no1>-<log_no2>[=<rest_dest>]| [<DBSID>,]<log_no_list>[==<rest_dest>]] [-b|-backup|-b1|-backup1 <log name>|last] [-b2|-backup2 <util_backup_id>|#NULL [-c|-confirm [force]] [-d|-device tape_disk|pipe|tape_auto|pipe_auto|tape_box| pipe_box|util_file|util_vol|stage|rman_util|rman_disk| rman_stage|rman] [-e|-execute <number>] [-f|-fillup <log_name1>[,<log_name2>,..]| <yyyy-mm-dd hh.mi.ss>|<no. of days>|last] [-h|-help [version]] [-i|-interval <days>] [-k|-compress no|yes|hardware] [-l|-language E|D] [-m|-mode all|all_data|full|incr|incr_all|incr_only| incr_full|<tablespace>[=<rest_dest>]|

(C) SAP AG

120

<file_ID>[=<rest_dest>]|<file_ID1>-<file_ID2>[=<rest_dest>] |<generic_path>[=<rest_dest>]|<object list>| archive_logs|partial|non_db[==<rest_dest>]] [-n|-number <file_pos>|init_ora|spfile|init_sap|space_log| det_log|sum_log|init_all|all_log|control_file[=<rest_dest>]] [-n2|-number2<back_file>=<rest_dest>] [-o|-output dist|time[,time|dist]] [-p|-profile <profile>] [-q|-query [check|nolog]] [-r|-parfile <parameter_file>] [-u|-user [<user>[/<password>]]|/] [-w|-verify [use_dbv|only_conf|use_rmv]] [-V|-VERSION [ALL]]

See also: -a|-archive|-a1|-archive1 -a2|-archive2 -b|-backup|-b1|-backup1 -b2|-backup2 -c|-confirm -d|-device -e|-execute -h|-help -i|-interval -k|-compress -l|-language -m|-mode -n|-number -n2|-number2 -o|-output -p|-profile -q|-query -r|-parfile -u|-user -w|-verify -V|-VERSION

(C) SAP AG

121

BRRESTORE checks the BRARCHIVE summary log to see which volume contains the required archived redo log files (in this case. If you do not specify a directory. Possible values: • • <DBSID>: database instance ID. only required for Oracle Parallel Server (OPS) <log_no>: log sequence number to specify the requested first copy of the offline redo log files <log_no1>-<log_no2>: • log sequence number interval to specify the requested first copies of the offline redo log files • <rest_dest>: the restore directory where the archived redo log files are to be restored. If you use this option.-a|-archive|-a1|-archive1 This BRRESTORE command option restores offline redo log files from the first copy. you can restore archived redo log files from several volumes simultaneously. • <log_no_list>: Under certain circumstances. Syntax -a|-archive|-a1|-archive1 [<DBSID>.]<log_no1>-<log_no2>[=<rest_dest>]| [<DBSID>. You can also use this option when you restore archived redo log files from a disk. the second copy of the offline redo log files). Separate the individual names with commas. Mount the requested volume in the backup device and enter cont to confirm that you want to start the restore. Mount the requested volume in the backup device and enter cont to confirm that you want to start the restore. Do not use blanks. (C) SAP AG 122 . If you use this option. the first copy of the offline redo log files). BRRESTORE checks the BRARCHIVE summary log to see which volume contains the required archived redo log files (in this case. See Restoring Files.]<log_no>[=<rest_dest>]| [<DBSID>. the archiving directory (<SAPDATA_HOME>/oraarch) is selected.]<log_no_list>[<rest_dest>] Default value: no restore of archived redo log files. -a2|-archive2 This BRRESTORE command option restores offline redo log files from the second copy. in parallel. If you specify == this redirects all restored offline redo log files. you can combine any specifications for the log sequence intervals.

• <rest_dir>. The requested objects are then restored from that database backup. • last: the last successful database backup is used to restore the requested objects -b2|-backup2 This BRRESTORE command option restores individual files.]<log_no_list> [==<rest_dest>] Default value: no restore of archived redo log files. only required for Oracle Parallel Server (OPS) log sequence number to specify the requested second copy of the offline redo log files <log_no1>-<log_no2>: <log_no>: • log sequence number interval to specify the requested second copies of the offline redo log files see -a|-archive|a1|archive1. using the full path. Syntax -b2|-backup2 <util_backup_id>|#NULL Possible values: • • <util_backup_id>: #NULL: backup ID of backup with an external tool restore from the last BACKINT backup (C) SAP AG 123 . calling backup tools via the BACKINT interface. <log_no_list>: -b|-backup|b1|backup1 This BRRESTORE command option restores database files saved by BRBACKUP.You cannot use this option to restore archived redo log files from a disk. With this option you can reload backups that were executed with an external backup tool via the interface BACKINT. Use option -m to define the files to be restored. Syntax -a2|-archive2 [<DBSID>.<ext> from a BRBACKUP backup.] <log_no1>-<log_no2>[=<rest_dest>]| [<DBSID>. • • <DBSID>: database instance ID.]<log_no>[=<rest_dest>]| [<DBSID>. Syntax -b|-backup|-b1|-backup1 <log name>|last Default value: last successful backup of the database (last) • <log name>: name of the detail log file b<encoded timestamp>.

All other BRRESTORE confirmation messages must be responded to. confirmation messages that are output when the volume (for example. Syntax -c|-confirm [force] Default value: confirmation messages issued and user entry expected Possible value: force: all confirmation messages are suppressed. -d|-device This BRRESTORE command option defines the restore device type. In this case. tape device). BRRESTORE assumes that the correct volume has been mounted in the backup device (for example.See also: External Backup Programs -c|-confirm This BRRESTORE command option restores in unattended mode. tape) is mounted are suppressed. or when performing similar actions. You can use this option when you regularly make database copies to have a current test system available. Syntax -d|-device tape|disk|pipe|tape_auto|pipe_auto|tape_box tape_box|pipe_box|util_file|util_vol|stage|rman_util| rman_disk|rman_stage|rman Default value: tape Possible values: • • • • disk: tape: pipe: local disk local tape device tape device of a remote system (UNIX only) remote disk 124 stage: (C) SAP AG . Follow the BRRESTORE confirmation messages in this case. Caution Do not use -c force when recovering a database. Depending on which backup you want to restore from. you can use this option to specify the backup media that was used. See Structure-Retaining Database Copy. If you specify the option -c.

.<log_name2>. This means that you can only reduce the number of parallel copy processes by setting this option. • tape_box or pipe_box: defines jukeboxes or autoloader tape devices that can be addressed locally or remotely • use this option when you performed the backup file by file. the maximum number of copy processes used corresponds to the number used for the backup.sap: backup_dev_type.]: one or more named BRRESTORE logs (C) SAP AG 125 . Syntax -f|-fillup <log_name1>[. of days lost>|last Default value: last Possible values: • <log_name>[.<log_name2>. If a parameter file is required.]|<yyy-mm-dd hh-mi-ss>|<no. util_vol: util_file: • • as for util_file but for volume by volume backups rman_util|rman_disk|rman_stage|rman: restores with Oracle Recover Manager (RMAN) and an external backup tool. When restoring.. Syntax -e|-execute <number of copy processes> Default value: 0 See -e|-execute. This is only useful when you use a tape device with automatic tape changing. -f|-fillup This BRRESTORE command option completes the restore run using the specified files. or rman_stage when restoring data files. See RMAN Backup with an External Backup Library..• tape_auto or pipe_auto: prompts for changing the tape will be suppressed.. See also: Parameters in init<DBSID>. You can use rman as a replacement for the parameters rman_util. specify its name in profile parameter util_par_file or with the option -r. rman_disk. -e|-execute This BRRESTORE command option executes the restore in parallel. using external backup programs...

you might be able to later use them for certain purposes (such as a fill-up). of days lost>: last: all restores started since the specified date and time all restores in a defined number of preceding days the last restore run See also: Completion of BRRESTORE Runs -g|-abort This BRRESTORE command option aborts restore runs. BRRESTORE can use this command option (C) SAP AG 126 .rab Windows: <saparch>###BOT_TEXT###lt;coded timestamp>. especially if the abort was soft. -i|-interval This BRRESTORE command option lets you override recov_interval from the initialization profile init<DBSID>.rab The aborted restores are marked as faulty.• • • <yyy-mm-dd hh-mi-ss>: <no. Syntax -h|-help [version] Default value: no help See -h|-help. -h|-help This BRRESTORE command option provides help information. To abort BRRESTORE. you open a separate command window to enter the command shown below. However.sap. Syntax brrestore -g|-abort stop|term|kill Default value: none Possible values: • • • stop: term: kill: causes a soft abort causes a normal abort causes a hard abort The abort generates a short log file in the relevant log file directory: • • UNIX: <saparch>/<coded timestamp>.

enter the following command brrestore -m full -i 100 -k|-compress This BRRESTORE command option sets compression mode. BRRESTORE might not find the required backup. Syntax -l|-language E|D Default value: E Possible values: • D: German (C) SAP AG 127 . If this value is too small.to search for the last successful database backup or backup of the offline redo log files. Syntax -i|-interval <days> Default value: 30 days Example To restore a full backup done in the last 100 days. Syntax -k |-compress no|yes|hardware Default value: no (no compression) Possible values: • yes: if you performed the backup with software compression and compress = yes is not set in the initialization profile. hardware: hardware. an appropriate warning is issued. However. BRRESTORE always decompresses the files that were saved with software compression. • BRRESTORE does not distinguish internally between no and Equivalent parameter in init<DBSID>. If the value for decompression does not agree with the compression type from the backup being used when you start BRRESTORE. you should use this option.sap: compress -l|-language This BRRESTORE command option sets the message language.

control files. <file_ID1>-<file_ID2>: <generic_path>: • • the files specified by the file ID interval the complete path to restore the required database file. directories. <n> is the redo log group number. nondatabase file. See Restoring Incremental Backups with Structural Changes in RMAN-Relevant Profile Parameters. including any non-database files. online redo log files (complete offline backup) and offline redo log files (consistent online backup). See Restoring Incremental Backups with Structural Changes in RMAN-Relevant Profile Parameters. but not the control files and online redo log the files in all tablespaces that are not pure index tablespaces files • • all_data: full: a complete backup.• E: English -m|-mode This BRRESTORE command option defines the files to be restored. • incr: • incr_only: all files that were in the database at the time of the last full backup. In this case. The corresponding mirror copies of the control files and online redo log files are recreated. Online redo log files have the file ID 0<n>. the path must contain at least the SAPDATA_HOME directory and an additional generic specification 128 (C) SAP AG . control. Control files have the file ID 0. See RMAN Restore of Incremental Backups. To address all the online redo log files. incr_all: • • like incr plus all redo log. Specify a generic path to restore all the database data files whose name starts with that path. Syntax -m|-modeall|all_data|full|incr|incr_only|incr_full| incr_all| <tablespace>[=<rest_dest>]|<file_ID>[=<rest_dest>] |<file_ID1>-file_ID2>[=<rest_dest>]|<generic_path>[=<rest_dest>]| <object list>|archive_logs]|partial|non_db[==<rest_dest>] Default value: all Possible values: • all: the files in all tablespaces. use file ID 00. or directory. an incremental backup with Oracle Recovery Manager (RMAN). non-database files and directories. incr_full: files that have been added to the database since the last full backup. Temporary files are identified by negative numbers. if any the files of this tablespace • • <tablespace>: <file_ID>: data file with the specified Oracle file ID.

Possible values: • • <file_pos>: specifies the position of the file on the tape init_ora|spfile: restores the profiles init<DBSID>. Syntax -n|-number <file_pos>|init_ora|spfile|init_sap| space_log| det_log|sum_log|init_all|all_log| control_file[=<rest_dest>] Default value: none.ora and spfile are restored. or combine the key words all with an object list. These files are in position 2. • init_sap: (C) SAP AG 129 . the original directory from the backup log is selected. If no directory is specified. This file is in position 3. sapdata<n>) in the path. restores the initialization profile init<DBSID>. Do not use blanks to separate the objects. of a consistent BRBACKUP online • <object list>: • archive_logs: the offline redo log files backup (backup_type=online_cons). partial: non_db: • • all files from a partial backup without explicitly specifying them all non-database files and directories from a backup without explicitly specifying them Parameters in init<DBSID>. -n|-number This BRRESTORE command option enables you to restore a file directly from a tape volume without having to specify the name of the backup log or the log sequence number. you can also restore one or more file(s) from this directory by additionally specifying one or more file names: <directory_name>:<file_name1>[:<file_name2>. If you specify == this redirects all restored files. When possible. a list of tablespaces or files.sap. The individual objects are separated by commas.] • <rest_dest>: the restore directory to which the requested files is to be restored.. If the generic path is a directory. always restore database files and nondatabase files in separate runs.sap: backup_mode..(for example. See also new_db_home.

log.sap in one run • sum_log: • init_all: • all_log: restores reorg<DBSID>. This file is in the second-to-last position.• space_log: restores the main log space<DBSID>. • det_log: restores the detail BRBACKUP or BRARCHIVE log.log. and init<DBSID>. • <rest_dest>: specifies the restore directory into which the requested files are restored. restores init<DBSID>. the structure log struc<DBSID>. param<DBSID>. and the parameter change log param<DBSID>. This file is in the last position. the files are restored to the current directory where BRRESTORE was started. spfile. detail and summary BRARCHIVE or BRBACKUP logs in one run. Syntax -o|-output dist|time[.log. restores the summary BRBACKUP/BRARCHIVE log. If no directory is specified. See -o|-output.log.log.ora. • control_file: restores the control file saved after a backup of offline redo log files with RMAN -n2|-number2 This BRRESTORE command option lets you restore a disk backup file to a specific restore destination. (C) SAP AG 130 . struc<DBSID>. -p|-profile This BRRESTORE command option defines the profile name.log. Syntax -n2|-number2 <back_file>=<rest_dest> Default: none -o|-output This BRRESTORE command option prints additional information to the log file.time|dist] Default value: the BRRESTORE detail log is written normally. See BRRESTORE Detail Log. These files are in the third-to-last position.

It defines the user name and password used by BRRESTORE to log on to the database system. restore is not started.sap See -p|-profile.Syntax -p|-profile <profile> Default value: init<DBSID>. does not create or update detail and summary logs for the function • nolog: Example brrestore -u / -q nolog -r|-parfile This BRRESTORE command option defines the BACKINT or mount parameter file. Syntax -u|-user [<user>[/<password>]|/] (C) SAP AG 131 . In this case. -q|-query This BRRESTORE command option sets the query mode. Syntax -r|-parfile <parameter_file> Default value: no parameter file See -r|-parfile. Possible values: • check: checks whether the proper volumes have really been mounted in the backup devices. Syntax -q|-query [check|nolog] Default value: the restore process is started. -u|-user This BRRESTORE command option defines user name and password for a restore with RMAN. The restore is not started. You can find out which volumes (tapes) must be mounted for the restore process and which additional resources the program needs.

If you enter -u / the Oracle OPS$ mechanism is used. files are read from backup media but not stored on disk. In either case.250 and check them for readability: brrestore -a 112-250 -w (C) SAP AG 132 . • Note These measures are taken to protect the DBA password. -w|-verify This BRRESTORE command option verifies a backup of database files (BRBACKUP) or offline redo log files (BRARCHIVE). Syntax -w|-verify [use_dbv|only_conf|use_rmv] Default value: no verification Possible values: • use_dbv: restores files to compress_dir. You can enter the user name and the password separately (only enter the user name or the option -u <user>). a normal restore is not performed. not to verify the data. use_rmv: • restores and then verifies the successfully backed-up files using RMAN Example This is an example of how to restore the last backup. • only_conf: BRBACKUP calls the external backup utility only to confirm that the backup is known. 112. an interactive query of the user name and the password is performed by the SAP utility. the password is not displayed during entry and does not appear in the process list.Default value: system/<default_password> Possible values: • If you only enter -u. BRRESTORE then prompts entry of the password. verifies them with DBVERIFY and then deletes them Without use_dbv. followed by a check of the Oracle block structure using DBVERIFY: brrestore -b last -w use_dbv This is an example of how to restore the archived offline redo log files nos. In this case.

No restore was started. The logs are stored in the sapbackup directory.<ext> The first characters indicate the encoded time the restore was performed (action ID). • rsf: • qur: (C) SAP AG 133 . see: • • • Names of the BRRESTORE Detail Logs BRRESTORE Detail Log BRRESTORE Summary Log Names of the BRRESTORE Detail Logs Every detail log contains a name with the following format: r<encoded timestamp>.See also: Backup Verify -V|-VERSION This BRRESTORE command option displays detailed information on the program modules and patches. Possible function IDs: • • rsb: rsa: restore from a BRBACKUP backup with option -b|-backup|-b2 restore the offline redo log files specified by the log sequence numbers with the option -a|-archive|-a1|-a2 restore a file characterized by its position on the backup volume with the option -n|-number|-n2 the BRRESTORE option -q or -q check was used to display which volumes are to be used for restore or to make sure that those volumes were actually mounted. Syntax -V|VERSION [ALL] Possible value: ALL: displays patch information for all BR*Tools BRRESTORE Logs For more information. The extension (function ID) indicates the type of the restore.

See Log Supplements and o|-output. and so on #FILE: #NDBF: #DIR: • • • • • • full path and name of the restored file full path and name of the restored non-database file full name of the restored directory full path and name of the restored archived redo log file varies depending on which backup medium was used to restore #ARCHIVE: #RESTORED: the file: o Restore from tape #RESTORED: name of the file on tape. volume name or file position as it was saved on the tape o Restore from disk #RESTORED: complete name of the file on disk. BRRESTORE Summary Log (C) SAP AG 134 .• rab: BRRESTORE run was aborted using brrestore -g|-abort BRRESTORE Detail Log The detail log file contains the following information about the actions that were performed during the restore process • The relevant parameters of initialization profile init<DBSID>. as it was saved. which volumes were mounted. The information about the distribution of files on the volumes (if you use -o dist) refers to the time when the files were saved. The details of the restore times (-o time) refer to the restore process. and the symbolic volume name and file position o Restore using an external backup program backup ID returned by the external backup program when the file was backed up #RESTORED: Log Supplements Using the option -o dist|time to start BRRESTORE causes the detail log to be supplemented.sap that were set during the BRRESTORE run Restore flow so that you can precisely monitor which backup was used to restore the files.

You can display a brief entry for each restore in the summary log rest<DBSID>. • Features You can use BRRECOVER to perform the following: • Complete database recovery (C) SAP AG 135 . Integration You can use BRRECOVER from: • • The command line BRTOOLS with character-based menus or a GUI Prerequisites • Make sure that the initialization profile init<DBSID>. time) specifying the end of the restore Return code Total count of database files Number of restored database files Number of restored non-database files Value of restore_mode Value of backup_dev_type Internal flags for the BRRESTORE command options BRRESTORE version BRRECOVER The SAP tool BRRECOVER for Oracle databases is used as a database administration tool to help you recover your database.sap is configured properly.log. Familiarize yourself with the BRRECOVER command options. time) specifying the start of the restore Timestamp (date. The entries in the file provide the following information about each restore using BRRESTORE: • • • • • • • • • • • • Action ID (encoded timestamp of the log name) Function ID (extension of the log name) Timestamp (date.

sap. these override the corresponding values in the initialization profile init<DBSID>.• • • • • • Database point-in-time (PIT) recovery Tablespace point-in-time (PIT) recovery Whole database reset Restore of individual backup files Restore and application of offline redo log files Disaster recovery For more information on the approach to restore and recovery. To use the options. If you use BRRECOVER with command options. BRRECOVER writes the following logs: • • BRRECOVER detail log BRRECOVER summary log Command Options for BRRECOVER This section describes the command options for the BRRECOVER tool.sap Syntax brrecover [-a|-tsp|-tablespace <tsp_name>|<tsp_name_list>] [-b|-backup [<log_name>|last]] [-c|-confirm [force]] [-d|-device tape|tape_auto|tape_box|pipe|pipe_auto|pipe_box|disk| stage|util|util_file|util_vol|rman_util|rman_disk|rman_stage|rman] [-e|-degree <number>] [-g|-scn|-change <scn>] [-h|-help [version]] [-i|-interval <days>] [-j|-ins|-instance <inst_name>] [-l|-language E|D] [-m|-pit|-time <yyy-mm-dd hh-mi-ss>] [-n|-seq|-sequence <seq_nr>]] [-n1|-seq1|-sequence1 <seq_nr>]] [-p|-profile <profile>] [-r|-parfile <parfile>] [-s|-scroll <lines>] [-t|-type complete|dbpit|tspit|reset|restore|apply|disaster] [-u|-user [<user>[/<password>]]|/] (C) SAP AG 136 . The syntax of a BRRECOVER command is: Example brrecover -t complete -p initGC2. see Restore and Recovery. you can specify either letter indicated or the complete word.

[-w|-own|-owner <own_name>|<own_name_list>] [-V|-VERSION [ALL]] See also: -a|-tsp|-tablespace -b|-backup -c|-confirm -d|-device -e|-degree -g|-scn|-change -h|-help -i|-interval -j|-inst|-instance -l|-language -m|-pit|-time -n|-seq|-sequence -n1|-seq1|-sequence1 -p|-profile -r|-parfile -s|-scroll -t|-type -u|-user -w|-own|-owner -V|-VERSION -a|-tsp|-tablespace This BRRECOVER command specifies the tablespaces to be recovered in a tablespace point-in-time (PIT) recovery. Syntax -a|-tsp|-tablespace <tsp_name>|<tsp_name_list> Default value: none (C) SAP AG 137 .

At other prompts. Syntax -c|-confirm [force] Default value: attended mode. -b|-backup This BRRECOVER command option specifies a BRBACKUP run from which to restore the database files.<function_id> restores the files from the last successful database backup • last: -c|-confirm This BRRECOVER command option specifies whether the recovery is attended or unattended.Example -tsp psapstabd. (C) SAP AG 138 . Caution Do not use the option -c force when recovering a production database. Possible value: force: when you specify the option -c force. Syntax -b|-backup [<log_name>|last] Default value: last Possible values: • <log_name>: restores database files from the BRBACKUP backup with the log name entered in <log_name> as b<encoded_timestamp>. BRRECOVER only stops at menus and yes/no queries. and carefully check the default choices and input values suggested by BRRECOVER. follow the BRRECOVER prompts and menus. You can use this option when you regularly make database copies for an up-to-date test system. BRRECOVER automatically selects default choices and accepts default input values in menus. all confirmation messages are suppressed. In addition. You need to respond to the prompts and menus generated by BRRECOVER. or for similar actions where you are certain of the outcome. You also have to check the default choices and input values suggested by BRRECOVER. In unattended mode. it continues processing with the default value. In this case.psapstabi BRRECOVER recovers only the tablespace psapstabd and psapstabi for a tablespace PIT recovery.

(C) SAP AG 139 . • • • • disk: local disk. stage: restore from remote disk. The drivers for the data transfer (cpio. Syntax -d|-device tape|tape_auto|tape_box|pipe|pipe_auto|pipe_box|disk|stage| util_file|util|util_vol|rman_util|rman_disk|rman_stage|rman Default: tape BRRECOVER supports the following backup media: • • • • • tape: local tape device. • • • • • tape_box or pipe_box: jukeboxes or autoloader tape devices that can be addressed locally or remotely. dd) are defined in the parameters tape_address or tape_address_arch. You have to use disk for disaster recovery if backups were done with rman_disk.-d|-device This BRRECOVER command option defines the restore device type. This is only useful when you use a tape device with automatic tape changing (tape changing device). the drivers for rewinding are defined in the parameters tape_address_rew or tape_address_rew_arch and the drivers for mounting and dismounting the tapes are defined in the parameters tape_address_ctl or tape_address_ctl_arch. pipe: tape device of a remote system tape_auto or pipe_auto: suppresses prompts for changing the tape.

util_vol: as for util_file but for volume by volume backups rman_util|rman_disk|rman_stage|rman: for a backup with the Oracle Recover Manager (RMAN). rman_disk. or rman_stage for restore of database files and offline redo log files. util_file|util: for a recover created by external backup programs for file-by-file backup. See also: backup_dev_type -e|-degree This BRRECOVER command option instructs SQLPLUS to apply offline redo log files in parallel mode. You have to use util for disaster recovery if backups were done with rman_util. You can specify rman instead of rman_util.• • • • • • • • • • • • • • • • You have to use stage for disaster recovery if backups were done with rman_stage. you must specify the name of the file in the profile parameter util_par_file or with the option -r. If a parameter file of this type is required. If you use this option. you might have to create a file containing the parameters required for that type of recover. Syntax -e|-degree <number> Default value: Oracle default (C) SAP AG 140 .

Syntax -g|-scn|-change <scn> Default value: none Example brrecover -scn 10401368920 BRRECOVER recovers the database to system change number 10401368920. (C) SAP AG 141 . -g|-scn|-change This BRRECOVER command specifies the last Oracle system change number (SCN)for a point-in-time (PIT) recovery. Syntax -i|-interval <days> Default: 30 Example brrecover -i 60 BRRECOVER searches for backups in the last 60 days. -h|-help This BRRECOVER command option provides help information and command line options about the version of BRRECOVER specified. Syntax -h|-help [version] Default value: no help -i|-interval This BRRECOVER command option specifies the interval in which BRRECOVER searches for backups.Possible value: <number>: specifies the number of Oracle recovery processes or threads running in parallel This command corresponds to the parameter recov_degree in init<DBSID>.sap.

ss> Default value: none Example brrecover -pit 2007-11-09 16. Possible values: • • D: E: German English -m|-pit|-time This BRRECOVER option specifies the point in time to which BRRECOVER recovers the database or tablespaces for a point-in-time (PIT) recovery. -j|-ins|-instance This BRRECOVER command option specifies the instance name of the Oracle Real Application Cluster (RAC). which the options -sequence and -sequence1 refer to. Syntax -j|-ins|instance <inst_name> Default: none -l|-language This BRRECOVER command option sets the message language. the value specified with this option applies.mi. Syntax -l|-language E|D Default value: E Note The default becomes invalid if you specify another value by setting the environment variable BR_LANG (language variable).sap.This command corresponds to the parameter recov_interval in init<DBSID>. Syntax -m|-pit|-time <yyyy-mo-dd hh.04 (C) SAP AG 142 .27. If you set option -l.

Syntax -o|-rpt|-point <restore_point>|last Default value: last restore point (C) SAP AG 143 . -n|-seq|-sequence This BRRECOVER command specifies the sequence number of the last redo log file for a point-in-time (PIT) recovery.This command recovers the database to the state it was in on 9th November 2007 at 16.27. -n|-seq1|-sequence1 This BRRECOVER command specifies the sequence number of the first redo log file for applying offline redo log files using the command option -t apply. Syntax -n|-seq1|-sequence1 <seq_nr> Default value: none Example brrecover -seq1 18487 BRRECOVER recovers the database from the redo log file with the sequence number 18487.04. -o|-rpt|-point This BRRECOVER command specifies the restore point for the database reset with flashback database. Syntax -n|-seq|-sequence <seq_nr> Default value: none Example brrecover -seq 19094 BRRECOVER recovers the database to the redo log file with the sequence number 19094.

Syntax -s|-scroll <lines> Default value: 20 This command option corresponds to the parameter scroll_lines in init<DBSID>. This option is not valid for BRGUI. -t|-type This BRRECOVER command specifies the type of recovery.sap -r|-parfile This BRRECOVER command option defines the BACKINT or mount parameter file. Syntax -p|-profile <profile> Default value: init<DBSID>.sap.Possible values: • • <restore_point>: last: specifies name of restore point uses last restore point -p|-profile This BRRECOVER command option defines the profile name. Syntax -r|-parfile <parameter_file> Default value: no parameter file -s|-scroll This BRRECOVER command option specifies the number of lines for scrolling in list menus. Syntax -t|-type complete|dbpit|tspit|reset|restore|apply|disaster Default value: complete Possible values: • complete: complete database recovery (C) SAP AG 144 .

Syntax -u|-user [<user>[/<password>]|/] Default value: system/<default_password> If you enter -u / the Oracle OPS$ mechanism is used. The user must have SYSDBA privileges. -u|-user This BRRECOVER command option defines the user name and password with which BRRECOVER connects to the database.• • • • • • dbpit: tspit: reset: database point-in-time recovery tablespace point-in-time recovery whole database reset restore of individual backup files restore: apply: restore and apply offline redo log files (that is. -V|-VERSION This BRRECOVER command option displays patch information for BRRECOVER. Syntax -V|-VERSION [ALL] ALL: displays patch information for all BR*Tools -w|-own|-owner This BRRECOVER command specifies the SAP owner for a tablespace point-in-time (PIT) recovery.sap. archivelogs) disaster recovery disaster: This command corresponds to the parameter recov_type in init<DBSID>. Syntax -w|-own|-owner <own_name>|<own_name_list> Default value: none BRRECOVER Logs (C) SAP AG 145 .

<ext> The logs are stored in the sapbackup directory.For more information. see: • • BRRECOVER Detail Log BRRECOVER Summary Log BRRECOVER Detail Log The detail log file contains full information about what happened during the recovery. The file displays information about the: • Relevant parameters from the initialization profile init<DBSID>.sap that were set during the BRRECOVER run Recovery type Menus that were displayed during the recovery and the options that you chose BRRECOVER commands used to perform each phase of the restore and recovery. and redo log files Names of the database files to be restored or recovered • • • • • • Structure BRRECOVER detail logs have names of the following form: v<encoded timestamp>. data files. control files. • Function ID The suffix <ext> indicates the restore type: o o o crv dpt tpt : complete database recovery : database point-in-time recovery : tablespace point-in-time recovery (C) SAP AG 146 . and the results Remounting of the database Status of the tablespaces. The name consists of: • Action ID This consists of the fixed character v and the <encoded time> that the recovery was performed.

12.no operator confirmation allowed BR0280I Time stamp 2003-01-29 19.sap recov_type complete recov_copy_dir /oracle/GC2/sapbackup recov_interval 100 scroll_lines 20 backup_dev_type tape system_info oragc2/oragc2 uw1030 SunOS 5.ora sapdata_home /oracle/GC2 sap_profile /oracle/GC2/dbs/initGC2.12.25 BR0655I Control menu 101 # please decide how to proceed (C) SAP AG 147 .8 Generic_108528-15 sun4u make_info sun OCI_901 Jan 29 2003 command_line brrecover -t complete -c force BR0280I Time stamp 2003-01-29 19.12.crv 2003-01-29 19.o o o o drs : whole database reset restore of individual backup files restore and application of offline redo log files disaster recovery rif: alf: drv: Example This is an example of the start of a BRRECOVER detail log for complete database recovery: BR0701I BRRECOVER 6.25 BR0101I Parameters Name Value oracle_sid GC2 oracle_home /oracle/GC2 oracle_profile /oracle/GC2/dbs/initGC2.40 (0) BR0705I Start of database recovery: vdjwhllh.25 BR0707I Recovery of database: GC2 BR0708I BRRECOVER action ID: vdjwhllh BR0709I BRRECOVER function ID: crv BR0710I Recovery type: complete BR0134I Unattended mode with 'force' active .

12.41 BR0331I Start and mount of database instance GC2 successful BRRECOVER Summary Log Each recovery run has an entry in the summary log recov<DBSID>..25 BR0307I Shutting down database instance GC2 .stop.help -----------------------------------------------------------------BR0280I Time stamp 2003-01-29 19.31 BR0308I Shutdown of database instance GC2 successful BR0280I Time stamp 2003-01-29 19.continuing processing with default reply '1' BR0614I Database instance GC2 is mounted BR0750I Database instance GC2 will be remounted now BR0280I Time stamp 2003-01-29 19.31 BR0330I Starting and mounting database instance GC2 .cont. Structure The entries in the file provide the following information about each recovery using BRRECOVER: • Action ID (encoded timestamp of the detail log name) (C) SAP AG 148 .12.Exit program 8 .back.25 BR0134I Unattended mode with 'force' active .12.. h . r . s .refr.Reset program status Standard keys: c .. BR0280I Time stamp 2003-01-29 19.-----------------------------------------------------------------Complete database recovery main menu 1 = Check the status of database files 2 * Select database backup 3 * Restore data files 4 * Restore and apply incremental backup 5 * Restore and apply archivelog files 6 * Open database and post-processing 7 .12.log.12.. b . BR0280I Time stamp 2003-01-29 19.

• • • • • • Function ID (extension of the detail log name) Timestamp (date. BRARCHIVE. and BRTOOLS. BRRESTORE. BRRECOVER. BRCONNECT. For more information. Command Options for BRTOOLS (C) SAP AG 149 . time) specifying the start of the restore Timestamp (date. time) specifying the end of the restore Return code Value of recov_type BRRECOVER version BRTOOLS You can use BRTOOLS as a tool: To display the menus for the BR*Tools user interface using a character-based interface That is started internally by BRBACKUP. Parallel backup to a remote host (backup_dev_file = pipe). BRARCHIVE. BRTOOLS is the program that displays the character-based menus from which the other BR programs are called. see -c|-confirm. BRARCHIVE. It works together with BRGUI to generate a graphical user interface. and BRRESTORE has the following features: • • Backup verification Saved files are compared with their originals For more information. Features BRTOOLS as an internal tool started by BRBACKUP. BRBACKUP. and BRRESTORE Note Distinguish between the following: BR*Tools is the program package containing BRSPACE. The option -c force This denies the commands that are started (such as cpio) access to the console. see -w|-verify.

To use the options. these override the corresponding values in the initialization profile init<DBSID>.This section describes the command options for BRTOOLS.sap. it continues processing with the default value. you can specify either the letter indicated or the complete word. BRTOOLS only stops at menus and yes/no queries. If you use BRTOOLS with command options. At other prompts. In unattended mode. Syntax -c|-confirm (C) SAP AG 150 . This is the schematic command syntax: Syntax brtools [<options>] This is the full command syntax: Syntax brtools [-c|-confirm] [-h|-help [version]] [-i|-interval] [-l|-language E|D] [-p|-profile <profile>] [-s|-scroll <lines>] [-u|-user [<user>[/<password>]]|/] [-w|-show <days>] [-V|-VERSION [ALL]] See also: -c|-confirm -h|-help -i|-interval -l|-language -p|-profile -s|-scroll -u|-user -w|-show -V|-VERSION -c|-confirm This BRTOOLS command option specifies whether processing is attended or unattended.

It is used to select backups for delete and verification. You also have to check the default choices and input values suggested by BRSPACE. It is also passed to BRRECOVER.Default value: attended mode. If you set option -l. the value specified with this option applies. You need to respond to the prompts and menus generated by BRSPACE. -l|-language This BRTOOLS command option sets the language for messages. Syntax -i|-interval <days> Default value: 30 This option corresponds to the init<DBSID>. Possible values: • D: German 151 (C) SAP AG . -h|-help This BRTOOLS command option provides help information and command line options about the version of BRTOOLS specified. Syntax -l|-language E|D Default value: E Note The default becomes invalid if you specify another value by setting the environment variable BR_LANG (language variable). Syntax -h|-help [version] Default value: no help Possible value: version: displays detailed information on versions of the program modules -i|-interval This BRTOOLS option sets the recovery interval.sap parameter recov_interval.

the password is not displayed during entry and does not appear in the process list. If you enter -u / the Oracle OPS$ mechanism is used.• E: English -p|-profile This BRTOOLS command option defines the profile name. In this case. These measures are taken to protect the DBA password. If this file is not in the standard directory. -u|-user This BRTOOLS command option defines the user name and password for RMAN to connect to the database. Syntax -s|-scroll <lines> Default value: 20 This option corresponds to the parameter scroll_lines in init<DBSID>. Syntax -p|-profile <profile> Default value: init<DBSID>.sap. an interactive query of the user name and the password is performed by the SAP tool.sap This profile is normally contained in the standard directory <ORACLE_HOME>/dbs (UNIX) or <ORACLE_HOME>\database (Windows). specify the complete path. This option is not valid for BRGUI. If you want to use a different profile. You can enter the user name and the password separately (only enter the user name or the option -u <user>). The tool then prompts entry of the password. specify the name of the profile file here. Syntax -u [<user>[/<password>]|/] Default value: system/<default_password> If you only enter -u . (C) SAP AG 152 . -s|-scroll This BRTOOLS command specifies the number of lines for scrolling in list menus.

there are exceptions to this.sap. Syntax -w|-show <days> Default: 30 Possible values: • • • 0: shows all available log files 1: shows log files created today >1: shows log files created in the previous specified number of days This command corresponds to the parameter show_period in init<DBSID>. this section describes how to recover the Oracle database system using SQLPLUS functions. Therefore. We recommend you to always discuss your recovery plan with (C) SAP AG 153 . -V|-VERSION This BRTOOLS command option displays patch information of BRTOOLS. The information here helps you with database recovery after an error in one of the following database components: • • • Data files Online redo log files Control files Caution An incorrectly performed recovery might lead to irreparable loss of data in your database. Syntax -V|-VERSION [ALL] ALL: displays patch information for all BR*Tools Database Recovery with SQLPLUS Although BR*Tools can in most cases be used to recover a failed database.-w|-show This BRTOOLS command option specifies the time period for which BRTOOLS displays log files.

you must find out the exact type of error so that you take the appropriate action to correct the error.an experienced database administrator. your SAP consultant. see Recovery after Statement Errors Process errors. see Recovery after Media Errors (C) SAP AG 154 . see Recovery after User Errors Statement errors. see Recovery after Process Errors Instance errors. Therefore. Depending on the type of error. a recovery can either be performed automatically or must be performed by the user or database administrator. or an Oracle specialist before you start a recovery. see Recovery after an Instance Error Media errors. SAP Application Server Oracle Database Process error Instance error Media error • Defective • Defective or inconsistent Errors can generally be divided into the following categories: • • • • • User errors. Types of Database Errors There are a number of errors that affect the operations of an Oracle database or can cause the database to crash.

which of the online redo log groups is the current one. the name of the trace file contains the operating process number and the Oracle process number. see the Oracle documentation. The directories where the ALERT and trace files are stored are defined by the and The naming conventions for the trace files depend on the operating system. important system events and significant error messages are continually collected for the entire system. Trace files of the background processes: <SAPDATA_HOME>/saptrace/background/<process>_<number>.ora parameters background_dump_destination user_dump_destination.More Information Error Analysis Error Analysis Information on all types of database problems can be found in the trace and ALERT files. For more information. A trace file can contain the following information: • • • • • • Date and timestamp Version number Process information Error messages Calling stack trace Dumps from the System Global Area (SGA) and the Program Global Area (PGA).trc init. where the actions in the database are recorded. ALERT file: <SAPDATA_HOME>/saptrace/background/alert_<DBSID>.log • Trace files are created by the individual background and user processes of the database system. (C) SAP AG 155 . for example. The ALERT file can inform you. Trace files thus offer more detailed information for error analysis than the ALERT file. Under UNIX. Structure • In the ALERT file.trc Trace files of the user processes: <SAPDATA_HOME>/saptrace/usertrace/<process>.

You cannot recover an object by recovering the database either. and a message is usually written to the system log. If such an error occurs. If you can continue working with that version of the object (ideally. Recovery after Process Errors (C) SAP AG 156 . You can generally correct such a user error if you can meet the following requirements: • You exported the object using the SAP tool R3trans. A statement error can also occur if an extensive operation entirely fills up the rollback segment. The recovery of a lost object requires an incomplete recovery up to the moment the user error occurred (point in time recovery). The reason for this is that the SAP database tables are often shared systemwide. • In general. Furthermore. either by mistake or due to lack of knowledge. as this risks overwriting the work of other users. An object from the ABAP Dictionary or the ABAP Repository is involved. an ABAP dump is issued. the object has not been changed recently). the database system cancels the incorrect statement and issues an error message. Any changes made to the database from that moment on are lost. The database administrator does not have to intervene in order to execute a recovery after a statement error. for example. the transaction is completely canceled in the database (rollback). you cannot use the Oracle Export/Import tools to recover a lost SAP object. taking into account possible database inconsistencies. The reason for such an error is generally incorrect programming.Recovery after User Errors A user error occurs when a user deletes or falsifies data (for example. The program containing the error is terminated. thus backing it up. A user cannot import the ATAB (central control table) to recover an individual SAP table. The ABAP Dictionary and the correction system both perform version backups of these objects within the SAP system. Recovery after Statement Errors A statement error occurs when an error in executing a database statement occurs in a running program. You can use this copy to restore the condition of the object at the time of the export. then you can restore it. deletes a table or program that is required for further system operation).

A process error occurs when a user process is canceled. The Oracle instance is not normally affected by the termination. The Oracle process monitor (PMON) responds by canceling the database changes made by current transactions rollback and releasing the resources that were used by the process. Work with the database system can then continue normally. The database administrator does not have to intervene to perform a recovery after a process error.

Recovery after an Instance Error

An instance error occurs when the Oracle database instance (System Global Area (SGA) and the corresponding background processes) can no longer run. An instance error can result from a hardware problem (such as a power failure) or a software error (for example, the crash of the operating system or of an Oracle background process). An instance error generally results in an immediate abnormal termination of the entire instance. Even if the database system remains active, the data in the SGA is lost in any case, and the instance can no longer be shut down in the conventional way with shutdown normal or shutdown immediate. Since only an abnormal termination is usually possible, using shutdown abort, the instance must be recovered. Only transactions completed normally with “COMMIT” can be processed; all others are rolled back. If you are working with a standard configuration, the system monitor (SMON) of the database system automatically carries performs the recovery of the instance when you restart the instance (instance recovery). It uses the entries in the appropriate redo log files to do so. You do not need to intervene during the recovery, provided no database files were changed. At least one copy of the control file, all data files, and at least one online redo log file in each online redo log group must exist. Before you restart the database system, find out which background process was canceled and why. Check the ALERT and trace files.
Recovery Procedure

If you want to perform a recovery after an instance error, shut down the instance (if it is still active) with the command shutdown abort. Analyze and correct the problem. Restart the database with the command startup. When you restart the database, the system monitor performs an automatic instance recovery, as described above.

Recovery after Media Errors

(C) SAP AG

157

A media error occurs when a read or write error takes place in a database file due to a physical defect on the disk drive where the file is located. The most frequent physical defect is a head crash, which usually renders all the files on a disk unusable. In most cases, the database must be recovered after a media error. The recovery strategy depends on the type of damage in the database. You must therefore analyze the error and understand how it was caused before you can continue with the recovery. Caution If you are not sure how to perform a recovery, be sure to contact your SAP consultant or an Oracle specialist. Do not attempt a recovery if you are not confident. An incorrectly performed recovery can lead to irretrievable loss of data in your database. The damage you risk is much more costly than the time you spend on a carefully planned, properly executed recovery of your database. In addition to the ALERT and trace files, SAP recommends analyzing the database using Complete Recovery Check the Status of Database Files in BRRECOVER. If defects in the data files of the database are involved, BRRECOVER can often perform the database recovery automatically. See Restore and Recovery with BR*Tools. This section provides an overview of the recovery process using Oracle SQLPLUS. The sections below contain examples of the command line operations with SQLPLUS. If you have followed the SAP recommendations regarding the installation and operation of the database system, you should generally succeed in carrying out a complete recovery after a media error. If, however, in an extreme case your backups of the database and your redo log backups have been damaged too, you might only be able to perform an incomplete recovery. The procedures required for the following errors are listed in the following:
• •

Loss of one or all copies of the control file Loss of an online or offline redo log file or even an entire online redo log group Loss of a system, temporary, user, or index tablespace Error in the archiving process for online redo log files using ARCH

• •

These errors are usually media-related (for example, if the archiving directory for the offline redo log files is lost or full). More Information See also: (C) SAP AG 158

• • • • • • • • • • • •

Recovering from One Control File Missing Recovering from Control Files Missing Recovering from Current Online Redo Log Missing Recovering from One Inactive Online Redo Log Missing Recovering from User Tablespace Missing Recovering from SYSTEM Tablespace Missing Recovering from Index Tablespace Missing Recovering from Errors During the Archiving of Online Redo Logs Performing an Incomplete Recovery Finishing an Incomplete Recovery Automating the Recovery Updating the Control File

Recovering from One Control File Missing

You use this procedure if a copy of the control file cannot be read or written to. Database activities continue normally until the next update of the control file – that is, until the next checkpoint or redo log file switch – and the database then crashes. In this case you do not need to perform an explicit recovery of the database. If a copy of the control file exists, the system can perform a recovery automatically. Procedure You have the following main recovery options after one of the control files is lost:

Replace the missing control file Find out why the control file was lost. For example, you cannot replace the file when the disk is not available. Check the ALERT and trace files of the database system to analyze the error. The error messages will indicate which control file is missing, and may also indicate how it was lost. Replace the missing control file as follows: 1. Shut down the database and exit SQLPLUS. 2. Copy an existing control file to the desired storage location at operating system level (see parameter control_files in the init.ora profile).

(C) SAP AG

159

ora). When this happens – during the next checkpoint or redo log file switch. the appropriate redo log files must exist. Delete the missing file from parameter control_files in profile init. Prerequisites A complete recovery of the database is possible provided one of the following conditions is true: • A current backup copy of the control file. that is.ora (default: <ORACLE_HOME>/dbs/init<DBSID>. For more information. To update the database. • If all the control files (even the backups) are lost. the control files are mirrored in three or more directories. This solution is only acceptable if you have at least two copies of the control file. 1. The database should always have at least two control files. Procedure Recovery Using the Backed-Up Control File This procedure assumes that you are able to restore the control file from your last database backup. enabling you to create the control file again. The normal database activities continue until the next update of the control file. Recovering from All Control Files Missing You use this procedure if you have lost all copies of the control file. see Mirroring the Control File. No other actions are required for recovery. Shut down the database and exit SQLPLUS.3. a copy with the current structure of the database. (C) SAP AG 160 . In the SAP system. 3. 2. you must first reconstruct the control file before you can start the recovery process. exists. original and mirror. A current log of the files in the database exists. Start SQLPLUS and start up the database. Start SQLPLUS and start up the database. even when one control file has been deleted. at the latest – the database system crashes. This procedure is much more complicated and not always successful. This guarantees that at least one mirror copy of the file still exists. • Modify the database system Check the ALERT and trace files to find out which control file was lost.

Use the ALERT and trace files to analyze the error. offline redo log files are usually backed up by the BRARCHIVE program) in the local backup directory (default value: <SAPDATA_HOME>/oraarch).ora profile. see the relevant parts of this documentation and your Oracle documentation. Back up the online redo log files of all instances (if they exist in readable form) so that you can repeat the recovery process if an error occurs. Enter the following SQLPLUS commands to mount the local instance: connect / as sysdba startup mount 5. If the data files of the database were set to status OFFLINE during the shutdown. You do not need to restore undamaged files from the backup. For more information on recovery after the loss of redo log or data files. 4. 2. change the status of the files in the control file to ONLINE. search for “offline” in the ALERT file or check the v$datafile view: select * from v$datafile (C) SAP AG 161 . 3. Check whether other damage has occurred to the database: Find out whether all data files and redo log files are readable. If further files were damaged. 6. you also have to restore all the offline redo log files of all instances that have been backed up since the last backup (for SAP databases. update the control file. but the control file should have the exact information about the number of files and – indirectly – the number of tablespaces in the database. restore the backup copies of these files. See Updating the Control File. by changing path or group names: alter database rename file '<file name>' to '<file name>'. To find OFFLINE files. Proceed as follows for recovery: 1. If you have to restore data files. Place the backup copies of the control file in the directories or on the raw devices specified in the control_files parameter in the init. shut down all instances with the following SQLPLUS command: shutdown abort ABORT is generally necessary because the control files are no longer available to include a checkpoint during the shutdown.It is helpful that the saved control file reflects the current structure of the database. The paths for the data and log files and the status of the log sequence numbers are not important. If you were not able to load backed-up files to their original directories or had to change file name. If the database system is still operating.

see Finishing an Incomplete Recovery. The resetlogs option initializes the existing online redo log files. only use this option after an incomplete recovery. you can reopen the database by using one of the following SQLPLUS commands: alter database open resetlogs. enter the full path name for the redo log files required for recovery. When all redo log files are processed.To change the status of a data file in the control file. a full recovery is still possible by reconstructing the control file. Database Recovery Using a New Control File If you do not have a valid copy of the control file. alter database open noresetlogs. Therefore. Do not use this option after a complete recovery. the BRBACKUP log. 11. The database system resumes operations with the log sequence number following the number of the last current online redo log file. The backup is necessary to back up the control file and to guarantee a recovery of the database if further database problems occur. Proceed as follows during recovery: 1. After the message recovery canceled. The noresetlogs option causes the online redo log files to be used in their current form. To do this. If you are prompted to do so. If the database is still active. For more information. 7. (C) SAP AG 162 . See Updating the Control File. for example. including the active online redo log file. shut down all instances with the following SQLPLUS command: shutdown abort ABORT is generally necessary because the control files are no longer available to include a checkpoint during the shutdown. 10. use the following command: alter database datafile '<file name>' online. Start recovery with the following SQLPLUS command: recover database until cancel using backup controlfile. A complete recovery is required to use this option. you need a current log of all the database files. Perform a complete backup of the database. end the recovery process with the command cancel. 8. 9.

Note A recovery is required whenever the control file was generated with resetlogs or when a data file was restored. Create the control file (for syntax information. If you have to recover data files. Back up the online redo log files of all instances (if they exist in readable form) so that you can repeat the recovery process if an error occurs. Start the recovery: recover database [until cancel] [using backup controlfile]. You do not need to restore undamaged files from the backup. Enter the following SQLPLUS commands to demount the database: connect / as sysdba startup nomount 5.2. 8. If you select until cancel. 7. Enter all the redo log files of all instances. Otherwise always use noresetlogs. refer to your Oracle documentation): create controlfile database <name> logfile '<online redo log groups>' noresetlogs|resetlogs maxlogfiles 10 maxlogmembers <your value> datafile '<names of all data files>' maxdatafiles 1022 archivelog. Recovery is also recommended for security reasons in other cases. 3. noresetlogs/resetlogs: only select resetlogs when an online redo log group was lost in addition to the control file. Use the ALERT and trace files to analyze the error. and find out whether all data files and online redo log files exist in readable form. also restore all the offline redo log files of all instances that have been backed up since the backup of these data files in the backup directory. 6. 4. restore the backup copies of these files. you can interactively decide how many files of the existing redo log files you want to apply during the recovery. Mount the database: alter database mount. If other files were damaged. You must select the option using backup controlfile when you used the resetlogs option to create the control file. Make sure no further damage has occurred in the database. Path names: the path names of the online redo log files and data files can be found in the last detail log from BRBACKUP. Start up the database with this SQL command: (C) SAP AG 163 . including the current ones.

Use alter database open resetlogs if you created the control file with resetlogs or when you performed an incomplete recovery. as supported by Oracle (and have also not been using hardware-based mirroring). For this reason. o Use alter database open if you created the control file with noresetlogs and have performed no recovery or a complete recovery (without until cancel). we strongly recommend once again that you make use of the Oracle options for mirroring the online redo log files. Otherwise you can only recover the database to the point of the missing redo log entries (that is. and therefore have at least one copy of each online redo log file (SAP default: two copies of the online redo log files). errors only in the other members). the risk of losing online redo log entries is significantly higher. o o 9. at least one member of the current group can be written to. you can use these later to perform a complete recovery of the database. the error should be corrected as soon as possible.of current online redo log files (that is. • (C) SAP AG 164 . no other files have been damaged. an incomplete recovery with loss of data). If you have not been mirroring the online redo log files. Prerequisites You must meet the following requirements: • You used the Oracle option for mirroring the online redo log files (or have hardware-based mirroring). Apart from the one member of the current online redo log group. Use alter database open noresetlogs if you created the control file with noresetlogs and performed a complete recovery despite the use of the until cancel option. If the mirrored online redo log files are available. You must check all sources of information for possible LGWR errors.or the entire group .alter database open [noresetlogs/resetlogs]. Use the entries in the ALERT file and in the LGWR trace file to analyze the error situation. After the recovery. Recovering from Current Online Redo Log Missing A member of the group . perform a complete backup to save the newly created control file and to make sure that a recovery of the database in the event of failure is possible. To be able to perform a full recovery. the redo log files in which the database changes are currently being recorded) is lost. Even if an error allows the instance to continue running (for example. Use mirroring to guard against complete loss of the online redo log files. only the entries from the current online redo log file are necessary.

due to the damaged group. None of the members in this inactive online redo log group can be read or written to. see the documentation on your Oracle database system or Performing Incomplete Recovery. providing the missing redo log file was fully backed up and the backup can be read for media recovery. For more information. If the files have been destroyed. Shut down the database with this SQLPLUS command: shutdown abort ABORT is needed because the database system cannot perform a proper shutdown. Procedure 1. For more information. The system automatically performs an instance recovery. or index tablespaces). Experienced users can correct this error without shutting down the database. see the Oracle documentation. use the SQLPLUS command shutdown abort to shut it down. and you can then use the group again. Start the database with the SQLPLUS command startup. restore the missing files and the missing active redo log and follow the recovery procedure for the category of the missing file (control file or files of the system. you can only perform an incomplete partial recovery. (C) SAP AG 165 . The recovery procedure is different when the database pauses because a redo log switch to an online redo log file was unsuccessful. incorrect access rights). Recovering from One Inactive Online Redo Log Missing If only one member of an inactive online redo log group has been lost.If further files have been damaged. 2. 3. If the problem is temporary (for example. you only need to correct it. the group can not be used again. If the database system is still active. Replace the missing online redo log files with a mirrored copy. Note If all members of the current redo log group have been lost. Determine the reason why the current online redo log files were lost by examining the ALERT and trace files. 4. you can use the recovery procedure described in Recovering from Current Online Redo Log Missing. Procedure 1. No data is lost. however. user.

o As individual files: alter database drop logfile member '<file name>' [. If you were running the database in ARCHIVELOG mode. If you do not. it is essential that you now perform a backup of the entire database.'<file name>']. A user tablespace does not contain data from the Oracle Data Dictionary. the offline redo log chain has a gap. Recovering from User Tablespace Missing You use this recovery procedure if: • • One or more data files are missing from a tablespace. 8.2. and the archiving of the online redo log group was not complete at the moment the problem occurred. If you were running the database in ARCHIVELOG mode and archiving of the damaged online redo log group was not complete. you have to temporarily switch to NOARCHIVELOG mode before deleting the defective group. Create the new online redo log files (to replace the damaged ones. and check the ALERT and trace files for the reason why the redo log files were lost. Find out which file is missing.'<file name>'] to group <group number>. 6. (C) SAP AG 166 . 7. 3. or temporary segments. Delete the damaged online redo log files in one of the following ways: o As a group: alter database drop logfile group <group number>. active rollback segments. 5. If the database was set to NOARCHIVELOG mode during these actions. Mount the database with these SQLPLUS commands: connect / as sysdba startup mount 4. change it back to ARCHIVELOG mode: alter database archivelog. because otherwise the system does not let you delete the files: alter database noarchivelog. which you just deleted): alter database add logfile '<file name>'[. which means that – in the event of another media error – only an incomplete recovery is possible.

Error information is also written to the database ALERT and trace files. and you need to recover more than one tablespace. The loss of a user tablespace often has similar consequences for the SAP system as the loss of the SYSTEM tablespace. This information appears at the start of the detail log of the BRBACKUP backup that you are using. Caution If only one user tablespace is lost. Tables are used so intensively in the SAP system that it is generally impossible to set the affected tablespace to OFFLINE without terminating the activities of many users. and this procedure is therefore only recommended for experienced database administrators. note that user tablespaces are used intensively in the SAP system. 3. If it is running.• Oracle issues error messages when a user attempts to access the involved tablespace. Prerequisites • If you use an SAP database. However. you shut down the SAP system before starting the recovery procedure. Inspect the ALERT and trace files to determine the cause of the problem. shut down the database system with this SQLPLUS command: shutdown abort You have to shut down the database with ABORT because the missing files cannot be closed. For more information on recovery options with an open database. This procedure describes the recovery procedure when the database is closed. Use the log files from the SAP tools BRBACKUP and BRARCHIVE to find the volumes that contain the following files: o o Last backup of the lost tablespace files Offline redo log files of all instances backed up since the last backup It is important to identify the location of the lost files. you can perform a manual tablespace recovery without shutting down the database. A complete recovery of the database is possible if you have a backup copy of the corresponding tablespace files and of all redo log files written since the backup. because the effects of the loss of this one tablespace are very complex. • Procedure 1. The problem is often that an entire disk has crashed. see the Oracle documentation. (C) SAP AG 167 . 2.

start up the database system with this SQLPLUS command: (C) SAP AG 168 . You also have to restore the backed-up redo logs of all instances that are required for the recovery. For information on recover tablespace and recover datafile. If the data files of the database were set to status OFFLINE when the error occurred. change the status of the files in the control file to ONLINE. See Updating the Control File. datafile We do not discuss here the alternatives . 8. The system processes online redo logs automatically. use BRRESTORE. When prompted to do so. search for “offline” in the ALERT file or check the v$datafile view: select * from v$datafile Change the status of a data file in the control file with this SQLPLUS command: alter database datafile '<file name>' online. see the Oracle documentation. Mount the database with these SQLPLUS commands: connect / as sysdba startup mount 6.recover tablespace and recover .4. If you were not able to restore backed-up files to their original directories or if you had to change file names. To do this. Start the recovery with this SQLPLUS command: recover database. 9. update the control file. Use the following command to change a path: alter database rename file '<file name>' to '<file name>'. To find the relevant files. Therefore. When the message recovery complete is displayed. enter the paths of the offline redo log files that you need to apply. The recover database command only performs the actions necessary to recover the damaged files.since SAP recommends shutting down the database when an error occurs. 5. 7. it does not take much longer than the recover tablespace and recover datafile commands. Restore only the damaged or lost files. See Updating the Control File. You can minimize the time required for recovery by only restoring the missing or damaged files.

you can use BRRECOVER to correct media errors affecting the data files of a user tablespace. Backups of the affected files exist. see Complete Database Recovery with BR*Tools. Restore the backups of the damaged or lost files and the backed up offline redo log files of all instances. 5. Mount the database with this SQLPLUS command: connect / as sysdba startup mount (C) SAP AG 169 . see the Oracle documentation. Note In most cases. shut it down with this SQLPLUS command: shutdown abort ABORT is required because the loss of individual files from the tablespace means that the changes from SGA can no longer be recorded. If a backup of the missing files and all redo log entries are available. and the database cannot be closed properly as a result. All offline redo log files that have been written since the last backup are available uninterrupted. Prerequisites Since the SYSTEM tablespace is affected. the recovery must take place with the database closed. Examine the ALERT and trace files to determine the cause of the problem.alter database open. Procedure 1. Use the log files created by the SAP tools BRBACKUP and BRARCHIVE to find the volumes containing the following files: o o Last backup of the SYSTEM tablespace Offline redo log files of all instances backed up since the last backup 4. using BRRESTORE. If the database system is still active. 2. For more information. For more information. a complete recovery is possible. The control files and all online redo log files are undamaged. 3. Recovering from SYSTEM Tablespace Missing One or more files of the SYSTEM tablespace has been damaged or lost due to a media error.

Shut down the database with this SQLPLUS command: shutdown immediate If this fails. change the names and paths of the files in the control file. BRRECOVER can be used to correct media errors affecting the data files of a user tablespace. Mount the database with these SQLPLUS commands: connect / as sysdba startup mount 4. you can use the recovery procedure for a user tablespace. If required. Procedure 1. 7. see Complete Database Recovery with BR*Tools. using the information in the ALERT and trace files. The procedure below describes an additional recovery option for SAP databases. Set the data files to OFFLINE: (C) SAP AG 170 . The system applies the online redo log files automatically. Therefore. Oracle treats an index tablespace just like a user tablespace. open the database again with this SQLPLUS command : alter database open. See Updating the Control File. Start the recovery with the following SQLPLUS command: recover database. Find out which data file is affected by the media error. 3.6. Recovering from Index Tablespace Missing Generally. For more information. the required offline redo log files are either processed automatically or you have to enter their paths and names. When the message recovery complete is displayed. See Automating the Recovery and read the corresponding Oracle documentation. 10. 9. Depending on the recovery mode (autorecovery on/off). If necessary. use: shutdown abort 2. 8. automate the recovery using the autorecovery option. Note In most cases.

For more information.sql from subdirectory of sapreorg with this SQLPLUS command: SQL> @ddl The recovery of the index tablespace is complete. 5. Recovering from Errors During the Archiving of Online Redo Logs You use this procedure if there are errors during the archiving of the online redo logs. If the background process ARCH for archiving redo logs fails. Recreate the indexes with script ddl. Drop the affected tablespace. Open the database: alter database open. This mode causes the database system to save an online redo log file – that is.alter database datafile '<complete file name>' offline. you can use BRRECOVER to correct media errors affecting the data files of a user tablespace. the archive process ARCH is initiated and produces the corresponding offline redo log files in the archiving directory – before the database changes recorded in the redo log files are overwritten during a log file switch. see Complete Database Recovery with BR*Tools. This problem is due to the following: • • The background process ARCH was not started The archiving directory is full (“archiver stuck”) or is not available (C) SAP AG 171 . 7. Use the corresponding BRSPACE function to create the DDL statements for the affected indexes: brspace -f tbreorg -s <tablespace_name> -d only_ind 8. For SAP systems with production Oracle databases. 6. Recreate the affected tablespace: brspace -f tscreate -t <tablespace_name> -d index 10. including contents: brspace -f tsdrop -t <tablespace_name> -f 9. Make sure that the index tablespaces do not contain any tables. Note In most cases. the database mode is set to ARCHIVELOG. the system shuts down until the error is corrected. You can check this using the Oracle tables DBA_SEGMENTS and DBA_TABLES.

Make sure the ARCH archiving process was started by entering these SQLPLUS commands: archive log list If the ARCH process was not started or is not currently active – the line is displayed – start it by entering these SQLPLUS commands: Automatic archival DISABLED connect / as sysdba archive log start Also check the parameters in the init. For more information. The database must remain active when you stop and restart the ARCH process. <new path> Find out about the default settings of the background process ARCH in the init. Note that the path is automatically reset to the predefined value in profile init. Note the following special naming conventions for this directory: Oracle can interpret the last part of the specified path as a file prefix. To do this.ora the next time you start up the database. specifying a new target directory. it must not physically exist in the directory. choose one of the two following alternatives: o Enter a new target directory for the online redo log archiving. enter these SQLPLUS commands: archive log stop archive log start '<new path>' is the name of the “directory” that will be used for archiving.Procedure 1. You probably have to cancel the background process ARCH and restart it. Make sure the archiving process is started automatically during the next database startup. see Setting Up Archiving. o Use BRARCHIVE to archive and delete the offline redo log files. Make sure that BRARCHIVE is able to back up the offline redo log files. 2.ora file. For more information. If the disk or archive directory for the offline redo log files is full or is not available. Performing an Incomplete Recovery (C) SAP AG 172 . Therefore.ora file that control the archiving process. see Setting Up Archiving. This frees space in the archive directory.

If one of the following problem constellations occurs. You do not have a backup copy of the required redo log entries. • • All members of the current online redo log group have been lost. you cannot restore your database completely: • All copies of the control file have been lost and you do not have any of the following files either: o o Current backup copy of the control file Log of the files in the database In such cases. it is essential that you indicate this by adding the following to your command: using backup controlfile The following section only describes the incomplete recovery after the loss of an offline redo log file. However. The loss of all the members in an online redo log group is highly unlikely. Procedure Loss of an Offline Redo Log File (C) SAP AG 173 . but one of the redo log files (offline redo log files or online redo log group) required for recovery is missing. One or more database files has been damaged and requires recovery. For more information on incomplete recovery. but instead an older copy. because the database can only be recovered in an older version.An incomplete recovery means that some data cannot be recovered after a database error. since the mirrored copies should be stored on different disks. this problem should not occur. The offline redo logs should also be regularly backed up twice to tape using BRARCHIVE. Caution If you do not use the current control file for a recovery. see the Oracle documentation. An incomplete recovery causes data to be irretrievably lost. When you follow the SAP recommendations. You can significantly reduce this risk by using a continual backup procedure for your database. Always follow the configuration and backup procedures that we recommend. this depends on the exact situation and cannot be explained in detail here. contact your SAP consultant or an Oracle specialist. as well as the corresponding redo log files. You should always have at least three generations of backups for every data file in the database. • A tablespace has been lost and you have no backup copy of the tablespace. It might be possible to perform a complete recovery anyway.

If you do not use the current control file. 4. update the control file. If you were not able to load backed-up files to their original directories or had to change file name. the recovery terminates with the last available redo log file in the sequence. If the database system is still active. shut it down with these SQLPLUS commands: connect / as sysdba shutdown abort ABORT is required in most cases. the required offline redo log files are processed automatically (with autorecovery on) until the file for the next log sequence number cannot be found. or (with autorecovery off) the recovery is stopped with cancel. The option until cancel means that the online redo logs are reset when opened or not. Mount the database with these SQLPLUS commands: connect / as sysdba startup mount 6. and one of the offline redo log files is no longer readable. enter the command: recover database until cancel using backup controlfile. (C) SAP AG 174 . 1. See Updating the Control File. Restore all the available backups of all data files and the offline redo log files of all instances. 2. 3.A media error has occurred in the data file area of the database. You might be able to automate the recovery. After an incomplete recovery. Depending on the recovery mode. because the loss of individual data files means that changes in the SGA can no longer be copied to disk. by changing path or group names: alter database rename file '<file name>' to '<file name>'. use a copy of the control file that reflects the structure of the database at the end of the recovery if possible. using BRRESTORE. Start the recovery with this SQLPLUS command: recover database until cancel. 5. Therefore. 8. 7. For this reason. Use the ALERT and trace files to analyze the error. depending on whether parameter resetlogs or noresetlogs is used. the structure of the database may no longer be identical to that fixed in the current control file.

Finishing an Incomplete Recovery This section describes the measures you need to take after an incomplete recovery in the following cases: • Case 1 Restore of a complete offline backup and subsequently opening the database. Only use this option when you did not use the option using backup controlfile and (unusually) all the online redo log files. or after a recovery with the option using backup controlfile. See also Finishing an Incomplete Recovery.. Use one of the following SQLPLUS commands: • • recover database until time 'dd-mm-yyyy:hh:mm:ss'. or you have to enter their paths and names.. noresetlogs: resetlogs: o The options resetlogs and noresetlogs are only possible after a recover database until. Depending on the recovery mode (manual or automatic). Point-in-Time Recovery You can also select a point-in-time recovery. the required redo log files are processed automatically.9. without performing a complete recovery of the database • Case 2 (C) SAP AG 175 . See also Finishing an Incomplete Recovery. Note Decide which setting of resetlogs you want to use: o initializes the existing online redo log files and resets the current log sequence number to 1 does not initialize the online redo log files. open the database again with this SQLPLUS command: alter database open resetlogs. In contrast to the incomplete recovery with until cancel. which you can perform either manually or automatically. recover database until change <scm>. Once the message recovery complete or recovery canceled is displayed. When the specified point in time is reached. this recovery is terminated at a specific time or specified system change number. including the current ones. the recovery is terminated. were processed during the recovery.

<volume name2>. because offline redo logs with these log sequence numbers have already been saved. The summary BRARCHIVE log arch<DBSID>.log still contains entries for successful backup runs of these offline redo log files and. • Situation B The current log sequence number was reset during a incomplete recovery.. o o To a smaller value in case 1 To the value 1 in case 2 BRARCHIVE does not find the newly written offline redo log files after the restore. as a result. during the next backup. proceed as follows: • Situation A Using the detail BRBACKUP log. Based on the information on the volume pool in initialization profile init<DBSID>. BRARCHIVE does not detect the new offline redo log files as files requiring backup. • Situation B Make sure the old offline redo log files in the backup directory are renamed. which starts with (C) SAP AG 176 .log. because neither item is current in the database.Restore of a complete online or offline backup and subsequent point-in-time recovery of the database (with ALTER DATABASE OPEN RESETLOGS) Prerequisites There are the following possible problem situations: • Situation A The information about the last backups and volumes used in database tables SDBAH and SDBAD has been lost.. you can determine which volume to use for the next backup. Find the line Current log sequence (message BR0116I). Explicitly name this volume when you start the next backup: brbackup -v <volume name1>. BRBACKUP prompts you to mount volumes (based on the automatic volume management) that are logically free.sap (parameter backup_volumes). you can find out which volume was the last one used. Procedure Depending on the situation and case. Then change the log sequence number in the last line of the summary BRARCHIVE log arch<DBSID>. • Case 1 The current log sequence number can be seen in the detail BRBACKUP log of the backup you used to restore the data.. but are physically locked. As a result.

Note that new lines have been added. In this case. BRARCHIVE automatically recognizes the resetting of log sequence numbers if the database is opened when BRARCHIVE is started.55 Current log sequence number: 30 Change the entry to: #ARCHIVE. 86 /oracle/C11/saparch/C11arch_86 1995-04-18 15. the actions described in situation B are not necessary. to the value: <(determined current log sequence number) - Example #ARCHIVE.55 After the backup. Procedure Enter the appropriate SQLPLUS command before you enter the recover command.55. Note In general (as after all recovery operations). which starts with #ARCHIVE.55 After the backup. to zero (0). If you used it for recovery. 86 /oracle/C11/saparch/C11arch_86 1995-04-18 15. BRRECOVER automatically performs this action .55 Change the entry to: #ARCHIVE. 1>. • Case 2 Change the log sequence number in the last line of the summary BRARCHIVE log arch<DBSID>. Automating the Recovery You can control whether you want to perform a manual (autorecovery off) or an automatic recovery (autorecovery on). Example #ARCHIVE. Note that new lines have been added.#ARCHIVE. reset the changes in this line. reset the changes in this line. (C) SAP AG 177 .55.log.55. 0 /oracle/C11/saparch/C11arch_86 1995-04-18 15. delete from the disk offline redo log files that were restored from tape to disk after the recovery.55. 29 /oracle/C11/saparch/C11arch_86 1995-04-18 15.

You can also explicitly enter the name of the redo log files by entering: o o o cancel auto to interrupt or cancel the recovery to continue the recovery in automatic mode from this point to change the log source from <log source> Updating the Control File In the following cases. If a disk error has occurred. you can override the source specified in archive_log_dest by entering the following command: set logsource = <log source> This means the files are now expected in the directory identified under logsource. (C) SAP AG 178 . in a new directory or under new names.• set autorecovery on The required offline redo log files are automatically applied without requiring any user entry. which means that required offline redo log files must first be restored under the appropriate names. log_archive_dest In the process.ora parameters log_archive_dest and log_archive_format. Choose RETURN to accept this value. The names and paths of the offline redo log files are derived from the init. • set autorecovery off The applying of the individual redo log files must be initiated by the user (default value). You can update these specifications. For more information. which control the recovery process. The status (ONLINE or OFFLINE) of one or several data files must be changed for the recovery to be continued. for example. you have to update the path of the affected files in the control file. see Setting Up Archiving. you will have to update the control file before you restore data: • The saved data files are to be restored on another hard disk. • The control file records the name or the path and the status of each data file in the database. Oracle automatically suggests a file derived from (or logsource) and log_archive_format. After you have restored the tablespaces. If the files cannot be imported under log_archive_dest. it might be necessary to restore the tablespaces in question on another disk. with Oracle commands.

you might have to reset the files that belong to this tablespace to ONLINE again. You can also specify a list of file names. when the database crashes or was stopped with shutdown abort and a recovery is necessary... (C) SAP AG 179 .]. alter tablespace <tablespace name> rename datafile '<file name1>' [. Setting Files to ONLINE If the data files of a tablespace are OFFLINE... • You can also change the paths of the data files of a tablespace when the database is running.Procedure Changing the Path Specifications SAP recommends using the first of the following methods to rename files. enter these SQLPLUS commands: connect / as sysdba startup mount alter database datafile '<complete file name>' online. • Mount the database with these SQLPLUS commands: connect / as sysdba startup mount To update the path of data files in the control file. The target file must exist and the name of the source file must agree with that in the control file. However. to rename all the files at once. enter this SQLPLUS command: alter database rename file '<file name>' to '<file name>'. note that problems during renaming are easier to diagnose if you rename the files individually. Set the corresponding tablespace to OFFLINE before renaming with these SQLPLUS commands: alter tablespace <tablespace name> offline. '<file name2>'.. You have to enter this command separately for each tablespace in which you have to change the file information.. To do this.] to '<file name1>' [. '<file name2>'. The target file must exist and the name of the corresponding source files must agree with those in the control file.