SAP NetWeaver ’04 Database Administration

SAP

®

Database Guide: Oracle

Document Version 1.00 – April, 2004

SAP AG Neurottstraße 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.com

© Copyright 2004 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation. IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere , Netfinity®, Tivoli®, Informix and Informix® Dynamic Server trademarks of IBM Corp. in USA and/or other countries. ORACLE is a registered trademark of ORACLE Corporation. UNIX®, X/Open®, OSF/1®, and Motif ® are registered trademarks of the Open Group. LINUX is a registered trademark of Linus Torvalds and others. Citrix®, the Citrix logo, ICA®, Program Neighborhood ®, MetaFrame®, WinFrame , VideoFrame , MultiWin and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C , World Wide Web Consortium, Massachusetts Institute of Technology.
® ® ® ® ® TM ®

JAVA® is a registered trademark of Sun Microsystems, Inc. J2EE™ is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One. MaxDB™ is a trademark of MySQL AB, Sweden SAP, SAP Logo, R/2, R/3, SAP NetWeaver, mySAP, mySAP.com, xApps, xApp, mySAP Business Suite, 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.

are

Disclaimer Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way.

Documentation in the SAP Service Marketplace You can find this documentation at:
http://service.sap.com/xxxxxxxx

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

Icons
Icon Meaning Caution Example Note Recommendation Syntax

EXAMPLE TEXT

Example text

Example text

<Example text>

EXAMPLE TEXT

SAP Database Guide: Oracle (BC-DB-ORA-DBA)

Contents
SAP Database Guide: Oracle (BC-DB-ORA-DBA) ........................16
1 New Features.....................................................................................17
1.1 New Features in SAP Release 6.40 ..................................................... 18 1.2 New Features in SAP Release 6.30 ..................................................... 19 1.3 New Features in SAP Release 6.20 ..................................................... 20 1.4 New Features in SAP Release 6.10 ..................................................... 22

2 Getting Started with Oracle and the SAP System..........................23
2.1 Computing Center Management System ........................................... 24 2.2 Specification of SAP Tables in the ABAP Dictionary........................ 25 2.3 Oracle Database Storage Parameters in the ABAP Dictionary ........ 26 2.4 Support on SAP Service Marketplace ................................................ 28 2.5 GoingLive and Early Watch ................................................................. 29 2.6 Oracle Databases on Raw Devices ..................................................... 33
2.6.1 Raw Devices and BR*Tools........................................................................................33 2.6.2 Raw Devices with BRBACKUP and BRRESTORE ....................................................34

2.7 Limitations of the Oracle Database System....................................... 36 2.8 Database System Configuration ......................................................... 37
2.8.1 Setting Up Archiving ...................................................................................................38 2.8.2 Mirroring the Control File ............................................................................................40 2.8.3 Mirroring the Online Redo Log Files ...........................................................................41 2.8.4 Organizing Disk Storage.............................................................................................41 2.8.5 Database Parameters .................................................................................................42 2.8.6 SAP Naming Conventions for Tablespaces and Data Files .......................................44 2.8.7 Environment Variables (UNIX)....................................................................................47 2.8.8 Environment Variables (Windows)..............................................................................48 2.8.9 Directory Structure (UNIX)..........................................................................................50 2.8.10 Directory Structure (Windows)..................................................................................54 2.8.11 Users and Roles .......................................................................................................58

3 Approach to Oracle DBA ..................................................................60
3.1 Instance Management.......................................................................... 61 3.2 Space Management.............................................................................. 65
3.2.1 Managing Tablespaces...............................................................................................65 3.2.2 Managing Data Files ...................................................................................................68

3.3 Segment Management ......................................................................... 70
3.3.1 Reorganization............................................................................................................72 3.3.2 Export/Import ..............................................................................................................75 3.3.3 Reorganization Case Study ........................................................................................76 3.3.4 Reorganization with the Redefinition Package ...........................................................78

3.4 Database Backup ................................................................................. 80
3.4.1 Backup Overview ........................................................................................................81 3.4.1.1 Why Back Up the Database? ................................................................................82 3.4.1.2 What Needs Backing Up? .....................................................................................83

4

April 2004

SAP Database Guide: Oracle (BC-DB-ORA-DBA)

3.4.1.3 Database Backup Types .......................................................................................86 Online and Offline Backup ..............................................................................................87 Consistent Online Backup ..............................................................................................88 Complete Backup ...........................................................................................................89 Incremental Backup ........................................................................................................90 3.4.1.4 Backup Cycles.......................................................................................................91 3.4.1.5 Backup Approach with Daily Complete Backups ..................................................92 3.4.1.6 Backup Approach for Very Large Database with Partial Backups........................93 3.4.1.7 Backup Approach with One-Day Retention Period ...............................................94 3.4.2 Backup Media .............................................................................................................95 3.4.2.1 Volume Management ............................................................................................96 Volume Initialization........................................................................................................97 Volume Label Check.......................................................................................................99 Volume Expiration Period .............................................................................................100 Used Volumes ..............................................................................................................102 Scratch Volume ............................................................................................................103 Selecting Volumes Manually ........................................................................................103 Selecting Volumes with External Tools ........................................................................104 Selecting Volumes Automatically .................................................................................105 3.4.3 Hardware Compression ............................................................................................106 3.4.4 Software Compression..............................................................................................107 3.4.5 Backup Methods .......................................................................................................109 3.4.5.1 Backup to Multiple Disks .....................................................................................109 3.4.5.2 Backup to a Remote Disk....................................................................................110 3.4.5.3 Backup to a Remote Tape Device ......................................................................112 3.4.5.4 Two-Phase Backup .............................................................................................113 3.4.5.5 Structure-Retaining Database Copy ...................................................................115 3.4.5.6 Parallel Backup ...................................................................................................117 3.4.5.7 Unattended Backup.............................................................................................118 3.4.5.8 BRBACKUP and BRARCHIVE Backups in One Run .........................................120 3.4.5.9 Backup Verify ......................................................................................................122 3.4.6 Advanced Backup and Recovery..............................................................................124 3.4.6.1 Backup of Large Oracle Databases ....................................................................124 Backup Devices for Large Databases ..........................................................................125 Backup of Large Databases to Tape with BRBACKUP................................................126 External Backup Programs for Large Databases .........................................................127 Parallel Backup of Large Databases to Disk with BRBACKUP....................................127 Optimization of File Distribution....................................................................................128 Optimization with a Logical Volume Manager ..............................................................129 Partial Backups.............................................................................................................131 Tablespace Backups ....................................................................................................131 Backup Example for a Large Database........................................................................132 Speeding Up the Backup ..............................................................................................133 3.4.6.2 Standby Database...............................................................................................133 Standby Database Configuration..................................................................................135 Standby Database: BRARCHIVE Backup of Offline Redo Log Files ...........................137 Standby Database: BRBACKUP Backup of Database Files ........................................138 Standby Database: Restore and Recovery ..................................................................139 Standby Database: Remote Database Connect Requirements ...................................141

April 2004

5

SAP Database Guide: Oracle (BC-DB-ORA-DBA)

3.4.6.3 Split Mirror Backup ..............................................................................................142 Split Mirror Online Backup ............................................................................................144 Split Mirror Offline Backup ............................................................................................146 Split Mirror Backup: Software Configuration.................................................................147 3.4.6.4 Backup with Automatic Tape Changers..............................................................150 Mount and Dismount Commands .................................................................................150 Autoloader Backup Example ........................................................................................152 3.4.6.5 Veritas Quick I/O Feature....................................................................................153 3.4.6.6 External Backup Programs .................................................................................154

3.5 Restore and Recovery ....................................................................... 156
3.5.1 Complete Database Recovery..................................................................................159 3.5.2 Database Point-In-Time Recovery............................................................................162 3.5.3 Tablespace Point-in-Time Recovery.........................................................................165 3.5.4 Whole Database Reset.............................................................................................169 3.5.5 Restore of Individual Backup Files ...........................................................................171 3.5.6 Restore and Application of Offline Redo Log Files...................................................174 3.5.7 Disaster Recovery.....................................................................................................175

3.6 Database System Check.................................................................... 178 3.7 Update Statistics ................................................................................ 179

4 BR*Tools for Oracle DBA ...............................................................181
4.1 Getting Started with BR*Tools .......................................................... 184
4.1.1 Configuration of BR*Tools ........................................................................................184 4.1.1.1 Configuring the Scroll Line Count for BR*Tools..................................................184 4.1.1.2 Configuring the UNIX Command at for BR*Tools Batch Functions ....................185 4.1.1.3 Setting the Option To Log Displayed Information for BRSPACE........................186 4.1.1.4 Effects of Autoextend and Resize on BR*Tools..................................................186 4.1.2 Starting BR*Tools .....................................................................................................187 4.1.3 BR*Tools User Interface ...........................................................................................189 4.1.4 How to Use BR*Tools ...............................................................................................195 4.1.5 Checking BR*Tools Release Information .................................................................199

4.2 BR*Tools in Action............................................................................. 201
4.2.1 Instance Management with BR*Tools.......................................................................201 4.2.1.1 Starting Up the Database with BR*Tools ............................................................202 4.2.1.2 Shutting Down the Database with BR*Tools.......................................................204 4.2.1.3 Altering the Database Instance with BR*Tools ...................................................206 4.2.1.4 Altering Database Parameters with BR*Tools ....................................................208 4.2.1.5 Showing Instance Status with BR*Tools.............................................................211 4.2.1.6 Showing Database Parameters with BR*Tools...................................................213 4.2.2 Space Management with BR*Tools ..........................................................................216 4.2.2.1 Extending a Tablespace with BR*Tools..............................................................217 4.2.2.2 Creating a Tablespace with BR*Tools ................................................................219 4.2.2.3 Dropping a Tablespace with BR*Tools ...............................................................222 4.2.2.4 Altering a Tablespace with BR*Tools..................................................................224 4.2.2.5 Altering a Data File with BR*Tools ......................................................................227 4.2.2.6 Moving a Data File with BR*Tools.......................................................................229 4.2.2.7 Showing Tablespaces with BR*Tools .................................................................232 4.2.2.8 Showing Data Files with BR*Tools......................................................................234 4.2.2.9 Showing Redo Log Files with BR*Tools .............................................................237 4.2.2.10 Showing Control Files with BR*Tools................................................................239 4.2.2.11 Showing Disk Volumes with BR*Tools..............................................................241

6

April 2004

SAP Database Guide: Oracle (BC-DB-ORA-DBA)

4.2.3 Segment Management with BR*Tools......................................................................243 4.2.3.1 Reorganizing Tables with BR*Tools....................................................................245 4.2.3.2 Rebuilding Indexes with BR*Tools ......................................................................248 4.2.3.3 Exporting Tables with BR*Tools..........................................................................250 4.2.3.4 Importing Tables with BR*Tools..........................................................................253 4.2.3.5 Altering Tables with BR*Tools.............................................................................256 4.2.3.6 Altering Indexes with BR*Tools...........................................................................258 4.2.3.7 Showing Tables with BR*Tools ...........................................................................261 4.2.3.8 Showing Indexes with BR*Tools .........................................................................264 4.2.3.9 Showing Table Partitions with BR*Tools.............................................................267 4.2.3.10 Showing Index Partitions with BR*Tools...........................................................269 4.2.3.11 Showing Segments with BR*Tools....................................................................272 4.2.3.12 Showing Segment Extents with BR*Tools ........................................................274 4.2.3.13 Showing Free Extents with BR*Tools ...............................................................277 4.2.4 Backup and Database Copy with BR*Tools .............................................................279 4.2.4.1 Backing Up the Database with BR*Tools............................................................281 4.2.4.2 Backing Up the Offline Redo Log Files with BR*Tools .......................................282 4.2.4.3 Copying the Database with BR* Tools ................................................................284 4.2.4.4 Non-Database Backup with BR*Tools ................................................................285 4.2.4.5 Verifying a Database Backup with BR*Tools ......................................................286 4.2.4.6 Verifying an Offline Redo Log Backup with BR*Tools ........................................287 4.2.4.7 Additional Functions for Backup and Database Copy with BR*Tools.................288 Updating Compression Rates with BR*Tools ...............................................................288 Preparing RMAN Backups with BR*Tools ....................................................................289 Deleting Database Disk Backups with BR*Tools .........................................................290 Deleting Offline Redo Log Backups on Disk with BR*Tools.........................................291 Controlling of BRARCHIVE Run with BR*Tools ...........................................................292 Initializing BRBACKUP Tape Volumes with BR*Tools .................................................293 Initializing BRARCHIVE Tape Volumes with BR*Tools................................................294 4.2.5 Restore and Recovery with BR*Tools ......................................................................295 4.2.5.1 Complete Database Recovery with BR*Tools ....................................................296 4.2.5.2 Database Point-In-Time Recovery with BR*Tools ..............................................297 4.2.5.3 Tablespace Point-In-Time Recovery with BR*Tools ...........................................299 4.2.5.4 Whole Database Reset with BR*Tools ...............................................................300 4.2.5.5 Restore of Individual Backup Files with BR*Tools ..............................................301 4.2.5.6 Restore and Application of Offline Redo Log Files with BR*Tools .....................307 4.2.5.7 Disaster Recovery with BR*Tools .......................................................................312 4.2.5.8 Procedures for Restore and Recovery with BR*Tools ........................................317 Setting Point In Time and Tablespaces for Recovery ..................................................317 Checking the Status of Database Files – I ...................................................................319 Selecting Database Backups........................................................................................321 Checking the Status of Database Files – II ..................................................................322 Checking the Status of Tablespaces ............................................................................324 Exporting the Tablespaces Not Being Recovered........................................................327 Restoring Control Files .................................................................................................330 Restoring Data Files .....................................................................................................331 Restoring and Applying an Incremental Backup ..........................................................335 Restoring and Applying Offline Redo Log Files............................................................336 Opening the Database..................................................................................................341

April 2004

7

SAP Database Guide: Oracle (BC-DB-ORA-DBA)

4.2.6 Check and Verification with BR*Tools ......................................................................344 4.2.6.1 Checking the Database System with BR*Tools ..................................................345 4.2.6.2 Validating the Database Structure with BR*Tools...............................................346 4.2.6.3 Verifying Database Blocks with BR*Tools ..........................................................347 4.2.7 Database Statistics with BR*Tools ...........................................................................348 4.2.7.1 Updating Database Statistics with BR*Tools ......................................................349 4.2.7.2 Collecting Missing Statistics with BR*Tools ........................................................350 4.2.7.3 Deleting Harmful Statistics with BR*Tools ..........................................................351 4.2.8 Additional Functions with BR*Tools..........................................................................352 4.2.8.1 Showing Logs and Profiles with BR*Tools..........................................................353 4.2.8.2 Cleaning Up DBA Logs and Tables with BR*Tools.............................................354 4.2.8.3 Adapting Next Extents with BR*Tools .................................................................355 4.2.8.4 Changing the Password of the SAP User with BR*Tools ...................................356 4.2.8.5 Creating or Changing Synonyms for DBA Tables...............................................357

4.3 BR*Tools in Detail .............................................................................. 359
4.3.1 BRBACKUP ..............................................................................................................359 4.3.1.1 Backing up Database Files .................................................................................359 4.3.1.2 Backing Up Non-Database Files and Directories................................................360 4.3.1.3 Completion of BRBACKUP Backups ..................................................................360 4.3.1.4 Hardware Compression for BRBACKUP ............................................................361 4.3.1.5 Command Options for BRBACKUP ....................................................................362 -a|-archive .....................................................................................................................363 -b|-backup .....................................................................................................................364 -bd|-backup_delete .......................................................................................................364 -c|-confirm .....................................................................................................................364 -db|-delete_backup .......................................................................................................365 -d|-device ......................................................................................................................366 -e|-execute ....................................................................................................................367 -f|-fillup ..........................................................................................................................367 -h|-help..........................................................................................................................367 -i|-initialize .....................................................................................................................368 -k|-compress .................................................................................................................368 -l|-language ...................................................................................................................369 -m|-mode.......................................................................................................................369 -n|-number ....................................................................................................................370 -o|-output.......................................................................................................................371 -p|-profile.......................................................................................................................371 -q|-query........................................................................................................................371 -r|-parfile........................................................................................................................372 -s|-saveset ....................................................................................................................372 -t|-type...........................................................................................................................373 -u|-user..........................................................................................................................374 -v|-volume .....................................................................................................................374 -w|-verify .......................................................................................................................375 -V|-VERSION ................................................................................................................375 4.3.1.6 BRBACKUP Logs................................................................................................375 Names of the BRBACKUP Detail Logs ........................................................................376 BRBACKUP Detail Log.................................................................................................377 BRBACKUP Summary Log ..........................................................................................378

8

April 2004

SAP Database Guide: Oracle (BC-DB-ORA-DBA)

4.3.1.7 Profile Parameters and BRBACKUP Command Options ...................................378 4.3.2 BRARCHIVE .............................................................................................................382 4.3.2.1 Hardware Compression for BRARCHIVE ...........................................................382 4.3.2.2 Logging for BRARCHIVE ....................................................................................383 4.3.2.3 Command Options for BRARCHIVE ...................................................................383 -a|-archive .....................................................................................................................384 -b|-backup .....................................................................................................................385 -c|-confirm .....................................................................................................................385 -d|-device ......................................................................................................................385 -f|-fill ..............................................................................................................................386 -h|-help..........................................................................................................................387 -i|-initialize .....................................................................................................................387 -k|-compress .................................................................................................................387 -l|-language ...................................................................................................................387 -m|-modify .....................................................................................................................387 -n|-number ....................................................................................................................388 -o|-output.......................................................................................................................388 -p|-profile.......................................................................................................................388 -q|-query........................................................................................................................388 -r|-parfile........................................................................................................................389 -s|-sc|-ds|-dc|-sd|-scd|-ss|-ssd|-cs|-cds ........................................................................389 -u|-user..........................................................................................................................390 -v|-volume .....................................................................................................................390 -w|-verify .......................................................................................................................390 -V|-VERSION ................................................................................................................390 4.3.2.4 BRARCHIVE Logs...............................................................................................391 Names of the BRARCHIVE Detail Logs .......................................................................391 BRARCHIVE Detail Log................................................................................................392 BRARCHIVE Summary Log .........................................................................................392 4.3.2.5 Grouping Offline Redo Log Files.........................................................................394 4.3.3 BRRESTORE............................................................................................................395 4.3.3.1 Restoring Files ....................................................................................................395 4.3.3.2 Completion of BRRESTORE Runs .....................................................................396 4.3.3.3 Examples of BRRESTORE Runs........................................................................397 4.3.3.4 Command Options for BRRESTORE..................................................................397 -a|-archive|-a1|-archive1 ...............................................................................................399 -a2|-archive2 .................................................................................................................399 -b|-backup|b1|backup1 .................................................................................................400 -b2|-backup2 .................................................................................................................400 -c|-confirm .....................................................................................................................400 -d|-device ......................................................................................................................400 -e|-execute ....................................................................................................................401 -f|-fillup ..........................................................................................................................401 -h|-help..........................................................................................................................402 -k|-compress .................................................................................................................402 -l|-language ...................................................................................................................402 -m|-mode.......................................................................................................................402 -n|-number ....................................................................................................................403 -n2|-number2 ................................................................................................................404

April 2004

9

SAP Database Guide: Oracle (BC-DB-ORA-DBA)

-o|-output.......................................................................................................................404 -p|-profile.......................................................................................................................404 -q|-query........................................................................................................................404 -r|-parfile........................................................................................................................405 -u|-user..........................................................................................................................405 -w|-verify .......................................................................................................................405 -V|-VERSION ................................................................................................................405 4.3.3.5 BRRESTORE Logs .............................................................................................406 Names of the BRRESTORE Detail Logs......................................................................406 BRRESTORE Detail Log ..............................................................................................406 BRRESTORE Summary Log ........................................................................................407 4.3.4 BRRECOVER ...........................................................................................................407 4.3.4.1 Command Options for BRRECOVER .................................................................408 -b|-backup .....................................................................................................................409 -c|-confirm .....................................................................................................................410 -d|-device ......................................................................................................................410 -e|-degree .....................................................................................................................411 -h|-help..........................................................................................................................411 -i|-interval ......................................................................................................................411 -l|-language ...................................................................................................................411 -own|-owner ..................................................................................................................412 -p|-profile.......................................................................................................................412 -pit|-time ........................................................................................................................412 -r|-parfile........................................................................................................................412 -s|-scroll ........................................................................................................................412 -scn|-change .................................................................................................................412 -seq|-sequence .............................................................................................................413 -seq1|-sequence1 .........................................................................................................413 -t|-type...........................................................................................................................413 -tsp|-tablespace ............................................................................................................413 -u|-user..........................................................................................................................414 -V|-VERSION ................................................................................................................414 4.3.4.2 BRRECOVER Logs.............................................................................................414 BRRECOVER Detail Log..............................................................................................414 BRRECOVER Summary Log .......................................................................................416 4.3.5 BRSPACE.................................................................................................................417 4.3.5.1 Command options for BRSPACE........................................................................418 -c|-confirm .....................................................................................................................419 -f|-function .....................................................................................................................419 -f dbstart .....................................................................................................................420 -f dbshut .....................................................................................................................421 -f dbalter .....................................................................................................................422 -f dbparam..................................................................................................................422 -f dbshow....................................................................................................................423 -f tsextend ..................................................................................................................425 -f tscreate ...................................................................................................................426 -f tsdrop ......................................................................................................................428 -f tsalter ......................................................................................................................429 -f dfalter ......................................................................................................................429

10

April 2004

SAP Database Guide: Oracle (BC-DB-ORA-DBA)

-f dfmove ....................................................................................................................430 -f tbreorg.....................................................................................................................431 -f idrebuild ..................................................................................................................432 -f tbexport ...................................................................................................................433 -f tbimport ...................................................................................................................435 -f tbalter ......................................................................................................................436 -f idalter ......................................................................................................................437 -h|-help..........................................................................................................................438 -l|-language ...................................................................................................................439 -p|-profile.......................................................................................................................439 -s|-scroll ........................................................................................................................439 -u|-user..........................................................................................................................439 -V|-VERSION ................................................................................................................440 4.3.5.2 BRSPACE Logs ..................................................................................................440 BRSPACE Detail Log ...................................................................................................440 BRSPACE Summary Log .............................................................................................442 BRSPACE Structure Change Log ................................................................................443 BRSPACE Parameter Change Log ..............................................................................447 4.3.6 BRCONNECT ...........................................................................................................449 4.3.6.1 Database System Check with BRCONNECT .....................................................451 BRCONNECT Default Conditions for Database Administration...................................453 BRCONNECT Default Conditions for Database Operations ........................................458 4.3.6.2 Adapt Next Extents with BRCONNECT ..............................................................460 Internal Rules for Determining Next Extent Size ..........................................................461 4.3.6.3 Update Statistics with BRCONNECT ..................................................................462 -force with Update Statistics .........................................................................................463 Deletion of Damaging Statistics....................................................................................464 Verification of Table and Index Structure .....................................................................464 Internal Rules for Update Statistics ..............................................................................465 Update Statistics for InfoCube Tables ..........................................................................466 4.3.6.4 Changing Database User Passwords with BRCONNECT..................................468 4.3.6.5 Clean Up Old Logs and Trace Files with BRCONNECT.....................................469 4.3.6.6 Additional BRCONNECT Functions ....................................................................469 4.3.6.7 Command Options for BRCONNECT .................................................................470 -c|-confirm .....................................................................................................................471 -f|-function .....................................................................................................................471 -f check.......................................................................................................................472 -f chpass.....................................................................................................................473 -f cleanup ...................................................................................................................473 -f crsyn........................................................................................................................475 -f dbshut .....................................................................................................................475 -f next .........................................................................................................................475 -f stats.........................................................................................................................477 -h|-help..........................................................................................................................481 -l|-language ...................................................................................................................482 -o|-output.......................................................................................................................482 -p|-profile.......................................................................................................................482 -q|-query........................................................................................................................483 -s|-sapsid ......................................................................................................................483

April 2004

11

.............................................................501 12 April 2004 ...........................7...........................501 dd_in_flags .................................................................sap..................................................................................................................................................................................................................................7 BRTOOLS....................................................486 -h|-help....................................................................................497 cleanup_exp_dump ..............................................................................................3...............................................496 cleanup_brconnect_log..................................................................................................497 cleanup_xdb_log........................................................................495 cleanup_brbackup_log....497 cleanup_ora_trace ...........................6...........484 BRCONNECT Summary Log .............................................................................................484 4................................................................................................483 -V|-VERSION ................................................................................................................................................................................................................................................................................................496 cleanup_disk_archive .........................488 4.......................................................499 copy_out_cmd ......................................................................................................... and Return Codes for BR*Tools..........................................................................................................................................................................................................................................................................................................487 -V|-VERSION ...............................................................................................................487 -u|-user............................................................................................................................485 4......................................................................................................................SAP Database Guide: Oracle (BC-DB-ORA-DBA) -u|-user.......501 dd_flags ............495 cleanup_brarchive_log........................................................498 compress_dir ..............................................496 cleanup_db_log ................................................................................3.....................499 copy_in_cmd.............................................................................................487 -s|-scroll ....................497 compress ...................................8 BRCONNECT Logs.....................................................................................................................................................................................................................................................................................................487 -p|-profile........................................................500 cpio_disk_flags ...................................................................................................497 cleanup_owner ...............................................................................................498 compress_cmd .........496 cleanup_check_msg ...................................................................................................................................3..486 -l|-language ..................................................................................489 archive_function.................................................................................................................................................................................. Messages............................................................................................................................................................................3.....................................................................................................................................................................................................................................493 backup_type ........................................................................................................487 -w|-show.........496 cleanup_brrestore_log ............490 backup_mode ..................................................488 archive_copy_dir...........................497 cleanup_brspace_log...............488 4.......................................................1 Initialization Profile init<DBSID>......................................................495 check_owner...................500 cpio_flags....................................................................489 archive_stage_dir ..485 4.500 cpio_in_flags...................................................................................................................8............................................490 backup_dev_type...................................496 cleanup_disk_backup ...........492 backup_root_dir ................................................................484 BRCONNECT Detail Log.........................................................................................................494 check_exclude ...................................................................................................................8 Profiles.......................................................................484 Names of the BRCONNECT Detail Logs ......................................................................................... Logs...................................3............................................................................1 Command Options for BRTOOLS...................................................

...........................................................................................................................................508 recov_degree.....................................................................................................................516 split_cmd..504 new_db_home .........................................................................................................................................................................................................................................................................................................................................................508 rebuild_index .......................................................................................................................................508 recov_copy_dir ...............................................................................................................................................................................................................513 rman_kbytes ......................................503 mount_cmd ...............................................................................................................511 rewind ..........................................................................................................507 orig_db_home................................................................................................................................................................................................503 exp_table .....................................................515 saveset_members .................................................................506 next_owner ...............................................................508 recov_interval ................507 parallel_instances ..........................510 resync_cmd ............................................................................................................................................513 rman_duplex .....................................................................................................................................................................505 next_max_size......................................515 rman_setsize ...........................................506 next_special..........................................................................................................................................................................................................................................................502 exec_parallel...........SAP Database Guide: Oracle (BC-DB-ORA-DBA) disk_copy_cmd ........................................................................................509 remote_user.............................................................................................................................................................................514 rman_proxy.......................................................515 scroll_lines ...501 dismount_cmd ............................................................................................505 next_exclude....................................................................................................................................................................................................502 exp_dump_dir ..................................................511 rewind_offline......................................................................................................................516 space_copy_dir......................................................................................................503 expir_period ....514 rman_pool...........................................................................................................................................................................................................................................514 rman_readrate ............................517 April 2004 13 ........................................................................................................................................................513 rman_filesperset .................................................................................515 rman_send..............................................................................................................................................................................................................................................................508 recov_type .................................................514 rman_parms.....................................................................................................................................................................................................................................................................................................................504 mount_par_file ..................................................................................................................................................................................................................................................513 rman_maxopenfiles ......................................................................................................................509 remote_host.................................................................506 next_table .........512 rman_channels ........................................................................................................................................................................................................................................507 primary_db........................................................................................................................................................................................................................505 next_limit_count...................503 imp_table ...................................517 split_options..........................................................................................512 rman_diskratio .....................509 reorg_table.......................................................................516 show_period .....................................................................................................510 restore_mode..............................................

............................518 stats_bucket_count.............................8..............1 Types of Database Errors.........519 stats_exclude.....................................................................520 stats_method .........................527 util_par_file ...............................................528 4......................................................................................................518 stats_change_threshold.................................................................517 stage_db_home ..........................................525 tape_pos_cmd .....................................................3...................................................................1....3.....................................................................523 tape_address_ctl ............................................................................... and BRCONNECT .....................527 uncompress_cmd ................................................................................................................524 tape_address_rew_arch ...3 Recovery after Statement Errors .........................................................................1 Error Analysis ...............................................................................................................................................................530 Log Supplements......................................................................................................540 14 April 2004 ................................................................................519 stats_dbms_stats................................................................520 stats_limit_time .......9..................................................................................................................... BRARCHIVE.......................5 Canceling a Backup ....................................1...............................................531 4..................................................................................536 5 Other Tools for Oracle DBA .......1...........................................3...............................................................2 Recovery after User Errors ............................................526 tape_size ........................522 tape_address ...................................................................539 5...............1.......4 cpio Error........................522 tape_address_arch ...................................522 stats_sample_size ...............................................................524 tape_address_rew .............................4 Recovery after Process Errors.........3 Messages and Return Codes for the BR*Tools ......3..521 stats_owner ..........................................................................................................................520 stats_info_cubes..................................1.......518 stage_root_dir.............540 5...........................................................................................................................................................530 File System Logs ...........527 volume_archive.................................................................................................................................................539 5...................................527 tape_use_count ........................................................................538 5...............536 4......................................................................................9...................................................................................................................1 Supported Backup Media.........................................................................................1 Database Recovery with SQLPLUS ............................................................................................................................................................................................................................................................................ 538 5..................................................................521 stats_parallel_degree .........................................................535 4..................................................................................................................................................................................................517 stage_copy_cmd............................................................................................1....529 Log Types ........533 4..SAP Database Guide: Oracle (BC-DB-ORA-DBA) split_resync.....................3 cpio Continuation Tape ........................................................532 4...............................9 Common Features of BRBACKUP and BRARCHIVE .................................................................................526 tape_size_arch ....................................................................................534 4................537 5.....................530 Database Logs for BRBACKUP.......................................3..................................................................................................................................................................9........8.........2 Effects of the Command Options .................3......523 tape_address_ctl_arch ....522 stats_table ................................................................................................................................3...........................524 tape_copy_cmd ...................................................................9.................................................528 volume_backup..............................................................................................2 Logs for BR*Tools ........................................................................................536 4....................................9..............................................................................................3..........

..................576 5.......................................2 Oracle Recovery Manager ......2......579 5........................................................1 RAC with BR*Tools ...............................................................576 5........6 RMAN Incremental Backups Without a Backup Library ......14 Recovering from Errors During the Archiving of Online Redo Logs ............................2......................6 RAC with the init<DBSID>..........1 RMAN Backup Strategies .......2......1..............................1.............558 5......................11 Recovering from User Tablespace Missing.............................580 5...............15........................554 5..3.....................................................3...............................3....................1......................16 Automating the Recovery ........10 Recovering from One Inactive Online Redo Log Missing............................3......SAP Database Guide: Oracle (BC-DB-ORA-DBA) 5.............540 5.........................................................4 Structure-Retaining Database Copy or Restore on Windows.....................2.........................................................1...564 5........................572 5.......1 Finishing an Incomplete Recovery .........................1............................................3 RMAN Restore of Incremental Backups ...8 RMAN Tape Layout .......................1..........578 5.2................................................................................................1 SAP Conventions (Windows).563 5.................................577 5.......................................2........................................2................................3 Other Backup Programs....... 585 6.........................576 5.......1.................1.....553 5........................3..............................................................................................................................................................15 Performing an Incomplete Recovery .....2....................573 5.............. 590 6............................................................................2......2 RMAN Incremental Backups After Structural Changes ...................................................579 5.580 5.......................................1 Naming Conventions for Files (Windows)...546 5...........................581 6 Oracle Real Application Cluster .................................................1...........................................................................573 5................2.............................2 Executables.1......3......557 5........................579 5...........2..4 Database Analysis ...............................3................... 560 5..........................5 RMAN Backup with an External Backup Library ..............9 Recovering from Current Online Redo Log Missing ....................543 5........................................sap Profile .........1........................................3.....................5 Recovery after an Instance Error.................................12 Recovering from SYSTEM Tablespace Missing.......574 5...................................................4 RAC with BRARCHIVE ....570 5.1.............10 RMAN Save-Set Grouping......3......................582 6.......2................8 Recovering from All Control Files Missing .....1.................551 5..................................1..............1...1.....13 Recovering from Index Tablespace Missing.............549 5...........................................3.............542 5................................................5 RAC with BRRESTORE and BRRECOVER...........7 Recovering from One Control File Missing..............................3 RAC with BRBACKUP.......... 587 6..........................3..................................1 NTBackup........1....................................................................2 BRBACKUP/BRARCHIVE ...................2......................4 RMAN Backup with the SAP Backup Library .......567 5..........561 5.........2 RAC with BRSPACE.......................................................................... 586 6.................................547 5............... 588 6...........17 Updating the Control File ............................................7 RMAN Backup of the Offline Redo Log File .3 Starting the SAP Utility Programs .................................9 RMAN Backup Verify ..........1...........................................................................556 5... 576 5... 591 April 2004 15 ....2 Backup Strategy (Windows) ............................2........565 5........5 Offline Backup with Oracle Fail Safe for Cluster Systems .......541 5...................552 5..............2.................3 The SAP Tools with Windows ...............6 Recovery after Media Errors...

BRRESTORE. which helps your company get the most from its SAP System.SAP Database Guide: Oracle (BC-DB-ORA-DBA) SAP Database Guide: Oracle (BCDB-ORA-DBA) Purpose This component lets you administer your Oracle database with the SAP System. Implementation Considerations For more information if you are new to Oracle database administration with the SAP System. Read this documentation to make sure that you administer your database as efficiently as possible. 16 April 2004 . see the documentation on SAP Service Marketplace: service.sap. see Getting Started with Oracle and the SAP System [Page 23]. BRSPACE. For more information about installing the Oracle database with an SAP System. see New Features in SAP Release 6. BRRECOVER.40 [Page 18]. BRARCHIVE. and BRCONNECT in accordance with your conditions of use for the SAP System and other SAP products.com/instguides Features This documentation covers the following main areas: • • • Approach to Oracle DBA [Page 60] BR*Tools for Oracle DBA [Page 181] Other Tools for Oracle DBA [Page 537] For more information about new features in this release. Constraints Make sure that you use the SAP tools BRBACKUP.

1 New Features 1 New Features This section describes new features for Oracle database administration. April 2004 17 .

40. see the following SAP Notes: 646681 647697 668640 • New functionality for split mirror disk backup with the SPLITINT interface program. implemented using the following new parameters: For BRBACKUP: online_mirror and offline_mirror in brbackup –t|-type [Page 373] For the SPLITINT program: split_options [Page 517] and split_resync [Page 517] in the initialization profile init<DBSID>.40 New SAP tool for administration of Oracle databases. For more information on BR*Tools. BR*Tools 6. SAPDBA is no longer being released.40 1.1 New Features in SAP Release 6. However. As of SAP Web Application Server 6.sap 18 April 2004 .40. including BRSPACE can be used for all SAP Releases based on Oracle 9i.1 New Features 1. which you can use for: Instance Management [Page 61] Space Management [Page 65] Segment Management [Page 70] There are the following new features in SAP Web Application Server (SAP Web AS) Release 6.1 • New Features in SAP Release 6. we strongly recommend you to only use BR*Tools instead. You can continue to use SAPDBA 6.40.20 linked to Oracle 9i with SAP Web AS 6.40. The following applies to BRSPACE: BRSPACE is part of BR*Tools and replaces the SAPDBA functions that have not so far been replaced by other BR*Tools. BRSPACE [Page 417]. We are no longer delivering SAPDBA.

For more information. • • Restore and Recovery This explains the concepts behind restore and recovery. New command option and initialization profile parameters Command option BRRESTORE -n2|-number2 Initialization profile parameters: recov_type recov_copy_dir recov_interval recov_degree scroll_lines show_period • Database Recovery with SQLPLUS We have updated the documentation for this.2 • New Features in SAP Release 6. You can now perform a wide range of functions from menus: 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 • BRRECOVER for database recovery You can use this new tool to recover your database.30 1. April 2004 19 .2 New Features in SAP Release 6. see SAP Note 602497.1 New Features 1.30 New user interface for BR*Tools There are the following new features in SAP Web Application Server (SAP Web AS) Release 6.30: There is now a GUI and a character interface for all BR*Tools.

and 483639. especially Database Health Alerts [Extern] SAP Note 483659 • New command options and initialization profile parameters Command Options for BRCONNECT [Page 470]: -o|-output [Page 482]: new option process -f stats [Page 477]: ne w options -f nocasc and -v index_store|cascade_store -f next [Page 475]: new option -f nocasc Initialization profile parameters: check_exclude [Page 495]: new values non_sap and all_part cleanup_check_msg [Page 496] next_exclude [Page 505]: new value all_part next_special [Page 506]: new value all_sel stats_dbms_stats [Page 519] stats_table [Page 522]: new value all_ind SAP Notes 419679. 445884. • SAPDBA support for online reorganization of single tables SAPDBA now supports online reorganization based on the Oracle internal PL/SQL functions.1 New Features 1.3 New Features in SAP Release 6.20: • Update statistics for partitioned tables with BRCONNECT: Update Statistics with BRCONNECT [Page 462] SAP Note 424243 • Update statistics for InfoCube tables with BRCONNECT: Update Statistics for InfoCube Tables [Page 466] SAP Note 428212 • BRCONNECT support for Oracle monitoring in SAP Transaction RZ20: Monitoring the Oracle Database [Extern].20 BR*Tools [Page 181] now supports Oracle 9i. we are no longer delivering SAPDBA. As of SAP Web Application Server 6.20 1.3 • • New Features in SAP Release 6. 20 April 2004 . RMAN backup without BACKINT: RMAN Backup with an External Backup Library [Page 567] SAP Note 420698 There are the following new features in SAP Web Application Server (SAP Web AS) Release 6.40. 424239.

1 New Features 1. April 2004 21 .3 New Features in SAP Release 6.20 • SAPDBA support for LOB columns SAPDBA now supports the reorganization of tables with all types of large object (LOB) columns. Large objects are recreated with the same physical characteristics as before the reorganization.

see backup_dev_type [Page 490]. • Software compression [Page 107] for backups on remote disk This helps to reduce the network traffic load required for backups. • Support of util_file_online logic for offline backups [Page 87] This enables you to fully implement split mirror [Page 142] and snapshot scenarios in BACKINT. • Support for the following new features: Creation and extension of locally managed (that is.10 1. Veritas Quick I/O [Page 153] to administer files from file systems as if they were raw devices 22 April 2004 .4 • New Features in SAP Release 6.4 New Features in SAP Release 6.10: This enables you to develop a comprehensive strategy for database files and offline redo log files. "bitmap") tablespaces and reorganization of locally managed tablespaces. For more information. You can also take advantage of internal block consistency checking by RMAN for offline redo log files. see Command Options for BRCONNECT [Page 470].1 New Features 1. • New user interface for BRCONNECT [Page 449] The main new functions are: Database system check [Page 451] Adapt next extents [Page 460] Update statistics [Page 462] Clean up old logs and trace files [Page 469] For more information about the new commands.10 BRARCHIVE [Page 382] support for backup of offline redo log files [Page 572] with Oracle Recovery Manager (RMAN) There are the following new features in SAP Release 6.

microsoft.. . If you have a problem. 3.. If you intend to use raw devices. You read the Oracle documentation thoroughly. For information about Windows operating system security. you use SAP Service Marketplace [Page 28] for support. 8. 9. choose Help → Release Notes in the SAP System. 1. see: www. You consider using the GoingLive and EarlyWatch [Page 29] services. see Oracle Databases on Raw Devices [Page 33]. However.. See also New Features [Page 17]. Process Flow You do not have to follow the sequence below rigidly. The aim is to help you get started as quickly as possible by giving you concise information and pointers to further details. 5. You take note of the Limitations of the Database System [Page 36]. . you need to know where to find extra information that goes beyond the scope of this documentation. 6. 2. To do this. April 2004 23 .2 Getting Started with Oracle and the SAP System 2 Getting Started with Oracle and the SAP System Purpose This section gives you an overview of database administration for Oracle databases running with the SAP System. To avoid error situations or bottlenecks in the database. be sure to consider all the items listed.com/security Result Now you are ready to configure the database system [Page 37]. 7. It is only a suggestion. You learn about how you can check your database [Page 178] and develop an approach to database backup [Page 80]. You read the Release Notes that appear with each new SAP Release. You read about the Oracle Database Storage Parameters in the ABAP Dictionary [Page 26].. You read the sections of the SAP Library on the ABAP Dictionary to learn about the conditions for creating tables in the ABAP Dictionary [Page 25] and on the database. 4.

Display backup logs and status [Extern] Update statistics for the cost-based optimizer [Extern] Check the database system [Extern] Monitor database operations [Extern] Monitor database alerts [Extern] • • • • • 24 April 2004 .1 Computing Center Management System 2.2 Getting Started with Oracle and the SAP System 2. Features You can use CCMS to: • Schedule a range of database administration activities – such as database backup. see CCMS: Oracle [Extern]. backup of the offline redo log files – using the Database Planning Calendar [Extern]. For more information. You can choose from a range of action patterns that include the most commonly needed activities.1 Use Computing Center Management System You can use the Computing Center Management System (CCMS) to administer your Oracle database.

you have to create it in the database in a second step. see -f next [Page 475]. The F4 help on size category displays the number of data records that will fit in the assigned storage area of the database for each of the categories.2 Specification of SAP Tables in the ABAP Dictionary Purpose As soon as you create a database table for the SAP system. For further database operations. April 2004 25 . Process Flow We recommend you to always maintain at least the parameters Data Class [Extern] and Size Category [Extern] in the technical configuration for each table: • Data class The data class logically defines the tablespace where your table is stored. see Creating Tables [Extern].2 Specification of SAP Tables in the ABAP Dictionary 2. If you need more space later. you can influence its storage parameters by maintaining its technical configuration in the ABAP dictionary [Extern]. The F1 help for data class provides information on how to select the proper value for the table. A maximum of 300 extents ought to be enough for storing table contents. Size category is assigned to extent size using an entry in the table DD09L and an analysis of the TGORA table for tables or IGORA for indexes. use the options provided by BRCONNECT for automatically adapting the size of the NEXT extent for all tables. Data class is assigned to tablespace (for data) using the TAORA table. storage space is added corresponding to the selected category (NEXT extent). • Size category The size category specifies the estimated space requirements of the table on the database using the categories 0 to 4. If the table is defined logically.2 Getting Started with Oracle and the SAP System 2. These values of the ABAP Dictionary only represent starting values. When you create a table an INITIAL extent is reserved in the database. assuming a database block size of 8 KB. For example. your table is automatically assigned to the correct database area when it is created. This technical configuration is used to optimize the space requirements and access response of individual tables. When you select the correct logical table type. Data class is assigned to tablespace (for indexes) using the IAORA table. For more information.

For some SAP objects. You can only change MAXEXTENTS. particularly transparent tables. PCTFREE. and other SAP objects. Make sure that the authorizations in your system are set so that only the database administrator is authorized to configure the database parameters. You can do this online or in the background. such as S_DDIC_ALL.3 Oracle Database Storage Parameters in the ABAP Dictionary Use The database utility [Extern] is the interface between the ABAP Dictionary and the relational database underlying the SAP System. you cannot change all the values immediately. PARTITION. FREELIST GROUPS. You can also set flags to determine which parameters you want to apply the next time a table is created (deleted and created. NEXT. You can also implement various analysis options.3 Oracle Database Storage Parameters in the ABAP Dictionary 2. You can use it to create. However. so saving space. FREELISTS.2 Getting Started with Oracle and the SAP System 2. Check the settings and change them if necessary. you can set user-specific database parameters. MAXIMUM EXTENTS. Prerequisites To use the database utility. and PCTUSED immediately (these values are valid if a new storage area is requested for the object). In a conversion. PCT FREE. using a b*tree). PCT USED. you need an authorization for authorization object S_DDIC_OBJ. to display table and index definitions. converted) and which ones you want to take effect immediately. the definition of a table in the database is adapted to its changed definition in the ABAP Dictionary. COLUMN LIST. The advantages of partitioned tables are: 26 April 2004 . since data only stored in b*tree instead of in table and index Rowid not stored in index entry of b*tree Faster key-based access to table data The disadvantages of index-organized tables are: UNIQUE constraints not allowed Cannot be stored in a cluster Cannot contain LONG columns (but LOB columns are possible) • PARTITION BY This allows you to partition tables by using a range expression. or check the consistency of objects. TABLESPACE. for example. MINIMUM EXTENTS. Features Note the following parameters: • INDEX ORGANIZED This parameter lets you build a table in the same way as an index (that is. such as INITIAL EXTENT. INDEX ORGANIZED. as well as database table. database views. NEXT EXTENT. The advantages of index-organized tables are: Less storage. and delete ABAP Dictionary objects. convert.

see the Oracle documentation. backed up. see: • • Database Utility [Extern] Storage Parameters [Extern] April 2004 27 .3 Oracle Database Storage Parameters in the ABAP Dictionary Logical attributes (such as table or indexed columns. Activities For more information on how to call the database utility and set storage parameters. storage parameters) might differ in the partitions Data of partitioned objects can be handled in the same way as unpartitioned tables Partitions of a table can be separately exported. dropped.2 Getting Started with Oracle and the SAP System 2. constraints) are same in all partitions Physical attributes (tablespace. imported. set offline. and so on Queries can be performed only on specific partitions The disadvantages of partitioned tables are: Bitmap indexes on partitioned tables can only be local Rule-based optimizer is not available for partitions For more information on the other parameters.

reconnect 28 April 2004 . maxextents.4 Support on SAP Service Marketplace 2. init. stuck.com/message The system searches automatically for SAP Notes matching the words in your problem message. BR<error number>. brconnect. by entering a meaningful keyword. You receive the same information that SAP itself uses for support work. tape_size. offline redo logs. archivelog. reorganization.ora. ora-<error number>. brarchive. brrestore. You can also use the alias notes to reach the SAP Notes area. restart. such as: Entering the application area. where you can search manually for SAP Notes to help fix your problem. as in the following examples. 2. control file. brbackup.com/notes 3.4 Purpose Support on SAP Service Marketplace If problem situations occur in the system. restore.sap. if known Searching with free text. 1.sap. effective help. such as BC-DB-ORA Entering the SAP Release Specifying the number of the note. expir_period.. SAP Service Marketplace provides fast. Here you can address questions to SAP directly and immediately receive an initial response.sap. SAP support staff use incoming customer messages to write SAP Notes. Process Flow .. service. You sign on to SAP Service Marketplace with the quick link message to enter your problem message: service. init. brspace.2 Getting Started with Oracle and the SAP System 2. SAP developers also create Notes to help you fix potential problems or to offer missing information. brrecover. There are different ways to search for helpful notes.

2 Getting Started with Oracle and the SAP System 2. see the SAP Service Marketplace at the following Internet address: service.5 GoingLive and Early Watch 2. EarlyWatch supports you doing ongoing live production.com/earlywatch Process Flow Both services contribute to improving the availability of your system because they stress prevention of problems before they become serious enough to cause downtime. For more information. with EarlyWatch taking over once your system has gone live: April 2004 29 . these services are complementary.sap. By using these services. As the following diagram shows. you can make sure that your system is optimally tuned and less likely to fail. which together provide a proactive service for your SAP system.5 Purpose GoingLive and Early Watch This section describes the GoingLive and EarlyWatch services. The result is improved system availability. The benefits are: • • • • • • • Prevention of bottlenecks Optimized performance and system availability Certified and trained SAP experts with in-depth knowledge of the SAP system Best practices database with up-to-date information Service procedures used to maintain top service performance Analysis tools used to expose system weak points Empowering workshops to deliver expertise to your experts These benefits are achieved by: Whereas GoingLive supports you during the implementation phase.

The following diagram shows the different ways that GoingLive can help you during this critical phase and how EarlyWatch can help afterwards: 30 April 2004 .2 Getting Started with Oracle and the SAP System 2. because it is more difficult to change a system once it is in production.5 GoingLive and Early Watch Services and Tools provided by SAP 1 Project Preparation 2 Business Blueprint 3 Realization 4 Final Preparation 5 Go Live & Support Continous Change Quick Sizer Concept Review SAP GoingLive™ Check SAP EarlyWatch® The most critical phase in achieving high availability for your SAP system is when you are going live.

5 GoingLive and Early Watch GoingLive™ Check Service Sessions 4 Final Preparation 5 Go Live & Support Continous Change Analysis • Sizing plausibility • Load distribution • Operating System and Database • R/3 Basis and Software Logistics Optimization • Check central business process • Transactions with high resource consumption • Sizing plausibility Verification • Configuration • Sizing plausibility • System usage and bottleneck analysis Regular EarlyWatch Analysis -2 Months -1 Month Start of Production +1 Month The EarlyWatch service works as follows: How Does EarlyWatch Work? 2 2 EarlyWatch logs on to the system 3 3 1 1 The customer opens a connection to SAP 6 6 EarlyWatch Report Customer EarlyWatch performs a system check 5 5 The customer receives a detailed EarlyWatch report containing the results of the check together with EarlyWatch recommendations. ! 4 4 If critical problems are found. EarlyWatch informs the customer immediately EarlyWatch focuses on the following aspects: • Server analysis April 2004 31 .2 Getting Started with Oracle and the SAP System 2.

6 312452.0 312668. broken down into the following sections: The EarlyWatch Service Report Chapter 1 Global EW Summary (red.9 312345.0 311699.2 Getting Started with Oracle and the SAP System 2. Result You receive a service report after an EarlyWatch session.1994 The Generic Key Buffer is out of space.N) Chapter 5 Database Server Analysis Chapter 6 Summary and Recommendations Chapter 7 Appendix A: Checklists Chapter 8 Appendix B: Glossary CPU M em ory Swap Space Lan Interface Param eter C hanges B uffer Q ualities 312237. yellow.8 312022. The directory of the Short N ametab Buffer is full. you can also decide to have an EarlyWatch session for a more detailed analysis of your system.0 Days relative to 16. green) Chapter 2 Global Analysis Chapter 3 Client/Server Analysis B K o c a p s e F ) ( t f r 312776.7 -34.2 Freespace for SYSTEM History / Forecast Chapter 4 Application Server Analysis (Server 1 .03.4 311806.5 312129.1 311914. In addition to EarlyWatch Alert.3 312560. 32 April 2004 .0 10.5 GoingLive and Early Watch • • • • Database analysis Configuration analysis Application analysis Workload analysis EarlyWatch Alert – a free part of your standard maintenance contract with SAP – is a preventive service designed to help you take rapid action before potential problems can lead to actual downtime.

less disk space is required. You do not have to administer a file system. Since the accesses do not have to be synchronized and the management information does not have to be recorded. This makes later relocation of the database files to other partitions more difficult.1 • Raw Devices and BR*Tools The following information is important if you intend to use BR*Tools with raw devices: Be sure to observe the SAP naming convention for tablespaces on raw devices: <SAPDATA_HOME>/sapraw/<TSP>_<Number> → <Raw-Device-Dir>/<Device> This is composed as follows: April 2004 33 .6. the partition is used as a raw device and does not contain a file system. but be aware of the disadvantages (for example. It is possible to save raw devices with the dd command. the load on the CPU is reduced. no end-of-media handling). This type of storage improves the speed of data access. Since no management information has to be stored on the disk. The sizes of the individual partitions must be adjusted to the sizes of the database files. Therefore. not with Windows NT. Advantages Working with raw devices improves performance for the following reasons: • • • • Since the usual buffer cache for a file system is not needed.6 Use Oracle Databases on Raw Devices You can operate an Oracle database on raw devices. Features There are the following advantages and disadvantages when using raw devices. Disadvantages Working with raw devices makes administration more difficult for the following reasons: • • There is no description of the files residing on the raw devices in the system. but requires its own file management.2 Getting Started with Oracle and the SAP System 2.6 Oracle Databases on Raw Devices 2. faster data access is possible and less main memory is required. This means that the Oracle database management system avoids the file management of the UNIX system and instead writes data directly to a disk partition. Raw devices are only used with the UNIX operating system. The BR*Tools support raw devices: • • Raw Devices and BR*Tools [Page 33] Raw Devices with BRBACKUP and BRRESTORE [Page 34]. The configuration of the storage space is inflexible because only one database file is permitted for each raw device (and therefore for each partition). • 2.

• Each raw device can contain only one tablespace file. dd output is sent directly to the compress. For a backup with software compression.log. BR*Tools checks that the naming convention has been observed. because this is an Oracle requirement. for example. for example.6. If the database check is done using BRSPACE. • The database link structure is recorded in the structure log [Page 443] struct<DBSID>. dd output is sent. a new tablespace is created or a tablespace is reorganized with data files.2 Getting Started with Oracle and the SAP System 2. If a tablespace is extended. Each tablespace “file” (held on a raw device) visible to Oracle is a symbolic link to a raw device. You can define options for dd command using the init<DBSID>. There are some changes in the BRBACKUP and BRRESTORE programs in a raw device configuration. For a restore with decompression. in the case of tablespace extension [Page 217] (adding a file from a raw device). you can write directly from the raw device to tape or to the raw device from tape (that is. BRSPACE uses this structure log to check whether the link structure is still complete and immediately repairs it if not.2 Raw Devices with BRBACKUP and BRRESTORE BRARCHIVE remains unchanged in a raw device configuration because offline redo log files must always reside in a file system.sap parameters dd_flags [Page 501] and dd_in_flags [Page 501]. BRSPACE can set the size of this partition. directly to rsh (/remsh and so on). For a restore from a remote computer. the size of the raw device is determined automatically and is used for the size of the file. 2. See also Environment Variables (UNIX) [Page 47]. The known functionality of BRBACKUP and BRRESTORE for backing up and restoring file systems remains unchanged. output of uncompress is sent to dd. but these changes have no effect on the functional scope of the programs. it is sent from rsh (/remsh and so on) to the dd command. backup to tape or restore from tape) and you can do the same to or from disk. • • • 34 April 2004 .6 Oracle Databases on Raw Devices <Raw-Device-Dir> specifies the central directory containing the devices. Tablespace PSAPDOCUD /oracle/C11/sapraw/docud_1 → /dev/rdsk/C11docud_1 Compare this with the SAP naming conventions for tablespaces [Page 44] in the file system. BRBACKUP and BRRESTORE use the dd command to access raw devices: • With dd. then BRSAPCE updates the structure log. For a backup on a remote computer. <Number> is the sequence number assigned to the raw devices (or files) belonging to the tablespace. <Device> consists of <DBSID><TSP>_<Number>. Therefore.

This means that each individual database file residing on the raw devices must completely fit onto one tape.6 Oracle Databases on Raw Devices Since the dd command does not support a dd continuation tape (in this case an I/O error is reported). April 2004 35 . This restriction does not refer to the BRBACKUP continuation tape management.2 Getting Started with Oracle and the SAP System 2. which means that the BRBACKUP utility can request continuation tapes if they are necessary for backup of the next database files. a method which is similar to the cpio continuation method is not supported.

DB_FILES can be increased to the value of MAXDATAFILES. we recommend setting MAXEXTENTS to UNLIMITED. 36 April 2004 . and this is specified by the DB_FILES parameter in the init<DBSID>. DBFILES. MAXDATAFILES itself must be less than the permissible maximum number of open files supported by the operating system. depending on the host system. Use You need to be aware of the limitations described below when you are: • • Reorganizing Tables with BR*Tools [Page 245] Extending a Tablespace with BR*Tools [Page 217] If you use locally managed tablespaces (LMTS) with autoallocate. Structure • Maximum number of extents per table or index – MAXEXTENTS For older installations with dictionary managed tablespaces. Hard limit The hard limit for DB_FILES depends on the operating system but is usually 1022 per tablespace and 65533 per database. The parameters MAXEXTENTS. Do not regularly reorganize the database to reduce the number of data files.7 Limitations of the Oracle Database System 2. and MAXDATAFILES are discussed.7 Limitations of the Oracle Database System Definition The Oracle database has the limitations described in this section. the autoallocate feature optimizes extent growth for tablespaces.ora profile. However. For new installations with LMTS. you can reduce the number of data files by reorganizing tablespaces that have more than one file. This is because the possible number of data files is large. the value of which was specified when the database was created. this is not likely to occur with a limit of 254 files. The database system only supports a specific number of data files in the database. The default value for MAXDATAFILES is also 254. If your database approaches this limit. you can avoid the situation where your tables have a large number of small extents. so is not normally reached.2 Getting Started with Oracle and the SAP System 2. • Maximum number of files per database – DB_FILES Soft limit The SAP software value for DB_FILES is 254.

With Oracle support.. 5. You set up archiving [Page 38]. being sure to monitor the critical tablespaces. offline redo logs files (that is. You mirror the online redo log files [Page 41] on separate disks (at operating system level and/or using Oracle resources)..8 Database System Configuration 2. The block size of the operating system is reformatted to 8K during the installation of the SAP System. you can set this up when you install the database system. 3.2 Getting Started with Oracle and the SAP System 2. and data files to separate disks. because the block size of the database system must be 8 KB and the block size of the operating system must be 4 KB. 6. you need to change the initial database user passwords. You organize disk storage [Page 41] by installing online redo log files. You follow the SAP Naming Conventions for Tablespaces [Page 44] and familiarize yourself with the tablespace structure of the SAP System. You can use BRCONNECT -f chpass [Page 473] to do this at any time. You make sure that the block sizes of the database system and the operating system are the same for security and performance reasons. You mirror the control files [Page 40] on separate disks.8 Purpose Database System Configuration This section tells you how to configure your Oracle database system. Structure of the Oracle database April 2004 37 . which is not covered in this documentation. online redo log files saved to the archive directory). You check the database parameters [Page 42]. 1. 2. Prerequisites During database installation. as shown in the graphic below. 4. Process Flow . The AIX operating system is an exception. making sure that the database runs in ARCHIVELOG mode and with automatic archiving enabled.

You familiarize yourself with the directory structure: Directory Structure (UNIX) [Page 50] Directory Structure (Windows) [Page 54] 9. t1 Archive Log Files(s) Database buffer Pool 8 KB LGWR Redo Log Files(s) DBWR t2 t3 Data Files(s) 7.ora file control the archiving process for the Oracle database: Parameter Note 38 April 2004 . so that archiving of the log files can continue at all times. In this case. This is important because it allows the online redo log files to be reused for fresh archive data. if necessary.. You familiarize yourself with users and roles [Page 58]. 2. how to change these.8 Database System Configuration Mirror Mirror Redo Log Buffer Control Files(s) ARCH OS Blocks ..1 Use Setting Up Archiving This procedure tells you how to check the archiving parameters and ARCHIVELOG mode for your Oracle database and.. It is very important that: • • The database runs in ARCHIVELOG mode Automatic archiving is enabled After correct installation of an SAP system.. You familiarize yourself with environment variables and set them as required: Environment Variables (UNIX) [Page 47] Environment Variables (Windows) [Page 48] 8. the online redo log files are automatically archived when full (that is.8. Prerequisites The following parameters in the init... the Oracle database meets both these criteria.2 Getting Started with Oracle and the SAP System 2. following a redo log switch).

the archiving process cannot archive any log files and no further actions are possible on the database (this is known as “Archiver Stuck”). If you need to reset ARCHIVELOG mode. The offline redo log files are the copies of the online redo log files saved in the archive directory. The system displays database instance details. 2. Otherwise. log_archive_dest defines the archive directory of the online redo log files for archiving. You can back up the offline redo log files with BR*Tools [Page 282].. April 2004 39 . do this in one of the following ways: a. 3. This means that automatic archiving is enabled. Do one of the following: Choose Instance Management → Alter database instance in BRGUI or BRTOOLS and choose the action Set archivelog mode. see Altering the Database Instance with BR*Tools [Page 206] and -f dbalter [Page 422]. It is delivered with the specification of the following SAP standard path (this example is for a single instance installation on UNIX): OS> <SAPDATA_HOME>/saparch/<ORACLE_SID>arch See SAP Note 316642 for information on how to avoid an "archiver stuck" error by changing the archive directory. Check that: Archivelog mode is set to ARCHIVELOG Archiver status is set to STARTED 4.8 Database System Configuration log_archive_start = true log_archive_dest = <directory>/<file prefix> log_archive_format = <Oracle default> Preset by SAP Part of the file name Use the Oracle default log_archive_start = true causes the background archive process ARCH to be started automatically when the database is started. Procedure . 1.2 Getting Started with Oracle and the SAP System 2. The Oracle database names the offline redo log files using the string <ORACLE_SID>arch followed by the log sequence number. The directory has enough free space. Make sure that: The archive directory (under UNIX: oraarch) exists. The directory is not write-protected. see Environment Variables (UNIX) [Page 47] and Environment Variables (Windows) [Page 48]. For more information on the BR*Tools commands mentioned below. For more information.. Check the archiving status of the database by choosing Instance Management → Show instance status in BR*Tools.

Always make sure that all the control files are on different disks. Prerequisites The default database profile (init<DBSID>. do the following: a. SQLPLUS> alter database open. When the SAP System is installed. change the standard mirroring of the control file by setting the control_files parameter. Procedure If necessary. You can also mirror the control file yourself.?/sapdata2/cntrl/ctrl<SAPSID>. 5. to start the ARCH process). Repeat steps 2 and 3 to check that ARCHIVELOG has been set correctly. Enter the following commands in the Oracle tool SQLPLUS: SQLPLUS> connect / as sysdba SQLPLUS> startup mount SQLPLUS> alter database archivelog. 2.dbf. it is probably impossible to completely recover the database. dbf) 40 April 2004 .2 Getting Started with Oracle and the SAP System 2. Enter the following commands in the Oracle tool SQLPLUS: SQLPLUS> connect / as sysdba SQLPLUS> alter system archive log start.ora profile) delivered with the system makes sure that the control file and its mirror copies are stored in directories that are mounted on different disks. The result is inevitable data loss. Here is a sample entry in profile init<DBSID>. If you only have one copy of the control file and lose this copy due to a disk error or other problems. SQLPLUS> archive log list b.2 Use Mirroring the Control File It is essential to mirror the control file in your Oracle database. SQLPLUS> archive log list BRSPACE or SQLPLUS reconfigures the database to set ARCHIVELOG mode on. Repeat steps 2 and 3 to check that ARCHIVELOG has been set correctly. To prevent this happening.dbf. the control file is mirrored to at least two additional disks (often three). b.8 Database System Configuration Enter the command brspace –f dbalter –a archlog from the command line.ora: control_files = (?/dbs/cntrl<SAPSID>.8. ?/sapdata1/cntrl/ctrl<SAPSID>. create multiple copies of the control file. If you need to enable automatic archiving (that is.

the group has two members). see BRCONNECT DefaultConditions for Database Administration [Page 453]. The condition to check mirroring of the online redo log files is REDOLOG_FILE_MIRROR. Oracle then uses the remaining member (or members) of this group to log the database changes. you can no longer recover the database changes recorded in them. an online redo log group normally consists of the original online redo log file and a mirror copy of this file (that is. Do one of the following to check mirroring: Choose Space management → Additional space functions → Show redo log files in BRGUI or BRTOOLS. Enter brspace –f dbshow from the command line and then choose Show database space information → Show redo log files. many systems support hardware-based file mirroring. For this reason. 2. For more information see: • • Database Recovery with SQLPLUS Recovery: One Inactive Redo Log Missing Prerequisites When an SAP System is installed using Oracle resources.2 Getting Started with Oracle and the SAP System 2. see Backing Up the Offline Redo Log Files with BR*Tools [Page 282]. 2. we strongly recommend that you mirror the online redo log files.. For more information. For more information on the security of offline redo log files. 2. /oracle/C11). Procedure . Also. 1. In such a case. For more information.4 Organizing Disk Storage April 2004 41 .8. the system check in BRCONNECT checks mirroring.3 Use Mirroring the Online Redo Log Files It is essential to mirror the online redo log files in your Oracle database. For more information. see your operating system documentation.8. Call the Oracle program SQLPLUS: SQLPLUS> connect internal SQLPLUS> select * from v$logfile. see the appropriate Oracle documentation.8 Database System Configuration The question mark ? is the official Oracle placeholder for the home directory of the database system (for example. you must recover the original mirroring of the online redo log files as quickly as possible. In addition. Run the system check with BRCONNECT [Page 451]. You can make additional mirror copies.. the database remains in operation. If you lose one or more online redo log files. This means that you can only recover the database up to the first gap in the online redo log records. This procedure describes how you can check the mirroring with BRSPACE. If an online redo log file of a group is lost. We recommend that you make at least one copy.

1. 42 April 2004 . Procedure .8. mirror of the control file Other database files in sapdata3 up to sapdata<n>..ora Use This profile contains the default parameter settings recommended for the SAP System.8 Database System Configuration Use We recommend that you store the files of the database system on different physical disks. as shown above. In this example. Make sure that the offline redo log files (that is. online redo log files saved to the archive directory) are not stored on the same disk as the online redo log files. The database files can be distributed across any number of disks. 2.5 Definition Database Parameters The SAP System for the Oracle database comes with a standard initialization profile for the database parameters: OS> <ORACLE_HOME>/dbs/init<DBSID>.. we recommend you to distribute the online redo log groups to four disks. mirror of the control file Database files.ora For example: /oracle/C11/dbs/initC11. if necessary. Copy this standard profile so that you can access the original parameters. The offline redo log files are not shown in the above example. Make sure that the number and descriptions of the control file and its mirrors agree with the entry in the init. the control file is mirrored twice: Disk Number Directory Contents of Directory 1 2 3 4 5 6 7 origlogA origlogB mirrorlogA mirrorlogB sapdata1 sapdata2 sapdata<n> Online redo log files from the first and third group (Set A) Online redo log files from the second and fourth group (Set B) Mirrored online redo log files from the first and third group (Set A) Mirrored online redo log files from the second and fourth group (Set B) Database files. 2.2 Getting Started with Oracle and the SAP System 2.ora profile. each on separate disks when possible A disk assignment similar to this is essential for reliable database operation. For performance reasons.

5*RAM Default: rating=0. ? is the Oracle placeholder for $ORACLE_HOME. Parameter SAP recommendation control_files log_archive_dest See Mirroring the Control File [Page 40]. Tuning Parameters The following lists a selection of RAM-dependent tuning parameters. default: 8192 The parameters ram. These parameters have to be adjusted to agree with your operating system.8 Database System Configuration Structure Operating System-Specific Parameters All parameters that specify paths and file names are operating system-specific. rating Proportion of RAM taken up by the database and the SAP System One system installed on one host: ram = 1. see the Oracle documentation. 75% for the SAP System) Database-only server: rating=0.8: rating=1. If you have serious database problems. where ?/saparch can be a soft link to a separate disk or a separate mount point.25 (25% of RAM reserved for the database.8 (80% of RAM is reserved for the database) If ram<RAM*0.0 (100% of RAM is reserved for the database) db_block_size db_block_size (unit: bytes) size of the Oracle database blocks Operating system-specific. OS> ?/saparch/<DBSID>arch. See Setting Up Archiving [Page 38]. background_dump_dest user_dump_dest OS> ?/saptrace/background Directory for user trace files. When possible. Make the appropriate changes to your operating system instead. rating and db_block_size are taken into account when calculating the following tuning parameters: Parameter Determination of its value shared_pool_si ze shared_pool_size=ram*rating*0. you must analyze the information in the ALERT and trace files.2 Getting Started with Oracle and the SAP System 2. OS> ?/saptrace/background Directory for database trace and database ALERT files. SAP recommends that you retain the default path and file descriptions in the system.0*RAM Two systems installed on one host: ram = 0. For more information.4*1024*1024 April 2004 43 . however. Parameter Settings ram (unit: MB) Portion of physical RAM that you want to reserve for the system.

44 April 2004 . for administrative reasons) • For more information on extending a tablespace. Use • You might need to create a new tablespace [Page 219].971.8.6*1024*1024/db_blo ck_size The factor 0. if ram<256 100. if ram>=256 200. shared_pool_size=20.6 means that db_block_buffers occupies 60% of the calculated SGA.8 Database System Configuration db_block_size (unit: bytes) buffer size for parsed SQL statements in the Oracle System Global Area (SGA) db_block_buffe rs db_block_size (unit: blocks) buffer size for data blocks and index blocks in the Oracle SGA log_buffer db_block_size (unit: bytes) buffer size for redo log entries in the Oracle SGA row_cache_curs ors Number of cursors used for selecting lines from the ABAP Dictionary. row_cache_cursors= 300.680 Part of the SGA. see Extending a Tablespace with BR*Tools [Page 217]. which is very small when compared with shared_pool_size and db_block_buffers. The factor 0. db_block_buffers=ram*rating*0. for example. Default: log_buffer=327. if ram<128 2. tablespaces and data files are named according to the conventions described in this section.2 Getting Started with Oracle and the SAP System 2. in the following situations: During the repository switch in a SAP system upgrade When moving a table to a separate tablespace (for example.4 means that shared_pool_size occupies 40% of the calculated SGA.6 SAP Naming Conventions for Tablespaces and Data Files Definition In SAP Systems with the Oracle database. We strongly recommend you to create new tablespaces and add data files to extend existing ones in accordance with the SAP naming conventions (see “Structure” below).520 if the value calculated using the formula above is lower than 20971520 Bytes.

10. Customer-specific objects for component <SID>.6D. Tablespace Naming Convention Before SAP Web Application Server 6. the new naming convention is also used if you have Multiple Components in One Database (MCOD) for SAP R/3 4. The association of objects to PSAP<SID>. Exchange tablespace for component <SID> upgrade.2 Getting Started with Oracle and the SAP System 2. Additional customer-specific objects for component <SID>. and contain no SAP data. This is generally valid for new installations or new tablespaces as of SAP Web Application Server 6. PSAP<SID>USR. However. Tablespace Naming Convention as of SAP Web Application Server 6. or PSAP<SID><name> is controlled using the TABART in DD09L or TAORA. Example: PSAPC11DAT. Rollback segments Undo tablespace (used from Oracle 9i instead of PSAPROLL) Additional rollback segments. Example: PSAPTEMP2. Exchange tablespaces have no TABART.10 The following syntax is used for naming tablespaces (TSP): PSAP<name>D PSAP<name>I PSAP<TSP>I for data tablespaces for index tablespaces if it is not important to differentiate The following table contains an overview of all the tablespaces in an SAP system and how they are used: Tablespace name Oracle tablespaces Use These tablespaces are required for operation of the Oracle DBMS. if required. Example: PSAPROLLBIG. Example: PSAPC11. All objects of the SAP component <SID>. Example: PSAPC11ES610. Oracle DDIC SYSTEM April 2004 45 .6C and SAP Basis 4.8 Database System Configuration Structure There is a new convention for naming tablespaces. Example: PSAPC11USR.10 The following table contains an overview of all the tablespaces in an SAP system and how they are used: Tablespace Name Use SYSTEM PSAPTEMP PSAPTEMP<name> PSAPROLL PSAPUNDO PSAPROLL<name> PSAP<SID> PSAP<SID>ES<rel>[X] or PSAP<SID>EL<rel>[X] PSAP<SID>USR PSAP<SID><name> Oracle system Temporary obejcts (system default temporary tablespace) Additional temporary objects.

For example. the first data file for PSAPUNDO is called: • • • • Directory: <ORACLE_HOME>/sapdata<n>/undo_1 File: undo. The same number also appears in the subdirectory that is created for each new file in a tablespace.data1 Environment Variables (UNIX) [Page 47] Environment Variables (Windows) [Page 48] For more information on <ORACLE_HOME>. transparent tables Transaction data. Sapfind PSAPUSER1D/I Customer tables Data Files When you add a new data file to extend a tablespace.. <file number> is the sequentially assigned number of the data file in the tablespace. The naming conventions are as follows: • • Directory: <ORACLE_HOME>/sapdata<n>/<tablespace suffix>_<file number> File: <tablespace suffix>. see: 46 April 2004 .2 Getting Started with Oracle and the SAP System 2. <n> is the sequentially assigned number of the SAP directory in which the data file will be stored. for example.data<file number> <tablespace suffix> is the second half of the tablespace name. BRSPACE attempts to add a new file to the standard SAP directory in which the most recent data file of the tablespace was stored. Sapscript. The most recent file is the one with the highest file number. transparent tables Doc. UNDO for the tablespace PSAPUNDO.8 Database System Configuration PSAPROLL PSAPTEMP Basis Tablespaces Rollback segments Sort processes PSAPEL300D/I PSAPES300D/I PSAPLOADD/I PSAPSOURCED/I PSAPDDICD/I PSAPPROTD/I Application Development environment loads Development environment sources Screen and report loads (ABAP) Screen and report sources (ABAP) ABAP Dictionary Log-like tables (such as spool) PSAPCLUD/I PSAPPOOLD/I PSAPSTABD/I PSAPBTABD/I PSAPDOCUD/I Customers Cluster tables Pooled tables (such as ATAB) Master data.

• ORACLE_HOME Home directory of the Oracle software.8. Structure The following variables are required: • ORACLE_SID System ID of the database instance Example: C11 SAPSID or sapsid refers to the SAP System ID. BRRESTORE. DBSID or dbsid refers to the name of the database instance (database instance system ID). Default value: $SAPDATA_HOME/sapbackup • SAPCHECK Directory for the BRCONNECT logs. When a single instance is installed. and BRRECOVER logs. Standard: /oracle/<DBSID> The variables ORACLE_SID. SAPSID and DBSID are the same.7 Definition Environment Variables (UNIX) Environment variables define values used by the Oracle database and BR*Tools. Default value: $SAPDATA_HOME/sapcheck April 2004 47 . ORACLE_HOME and SAPDATA_HOME must always be set. This section describes the variables used when the operating system is UNIX. Default value: $SAPDATA_HOME/saparch • SAPBACKUP Directory for the BRBACKUP. Standard: /oracle/<DBSID> • SAPDATA_HOME Directory of the database files. The following environment variables must only be set if the corresponding paths deviate from the defaults specified here: • SAPARCH Directory for the BRARCHIVE logs. BR*Tools also use the values. Use The database uses the environment values for many different purposes.2 Getting Started with Oracle and the SAP System 2.8 Database System Configuration 2. There is no default.

Default value: $SAPDATA_HOME/sapreorg • SAPTRACE Directory for Oracle trace files and the alert file. This section describes the variables used when the operating system is Windows. Default value: $SAPDATA_HOME/sapdata1 (The same for SAPDATA<n>. n=1.8 Database System Configuration • SAPREORG Directory for the BRSPACE logs..sap is not set. if the parameter exp_dump_dir in the profile init<DBSID>. Other environment variables that you can set for BR*Tools: • BR_LINES Definition of the number of lines in list menus..8 Definition Environment Variables (Windows) Environment variables define parameter values used by the Oracle database and BR*Tools. • BR_LANG Definition of the message language: E: English D: German • BR_TRACE Setting the trace function for error analysis.99). See also: Environment Variables (Windows) [Page 48] 2. BR*Tools also uses the parameter values. Use The database uses the parameter values for many different purposes. It is also the standard directory for export dump files. Recommended height: ≥ 20 lines. For more information.8.2 Getting Started with Oracle and the SAP System 2. Default value: $SAPDATA_HOME/saptrace • SAPDATA1 Directory of the database data files. 48 April 2004 . This environment variable must be left unset. • TWO_TASK Identification of a remote database system.. The environment variables SAPDATA<n> must only be defined if directories are used that differ from the default. see Configuring the Scroll Line Count for BR*Tools [Page 184].

SAPSID and DBSID are the same. Default value: %SAPDATA_HOME%\saptrace • SAPDATA1 April 2004 49 . If not set. When a single instance is installed. This variable no longer needs to be set. the SAP tools determine its value from the registry. Default value: %SAPDATA_HOME%\saparch • SAPBACKUP Directory for the BRBACKUP logs. Standard: <drive>:\orant Example: D:\orant This variable is optional with Oracle version 8. • SAPDATA_HOME Directory of the database files. Default value: %SAPDATA_HOME%\sapcheck • SAPTRACE Directory for Oracle trace files and the alert file.8 Database System Configuration Structure The following variables are required: • ORACLE_SID System ID of the database instance Example: C11 SAPSID or sapsid refers to the SAP System ID. Default value: %SAPDATA_HOME%\sapbackup • SAPCHECK Directory for the BRCONNECT logs. • ORACLE_HOME Home directory of the Oracle software. The following environment variables must only be set if the corresponding paths deviate from the defaults specified here: • SAPARCH Directory for the BRARCHIVE logs. DBSID or dbsid refers to the name of the database instance (database instance system ID).1 and later. Standard: <drive>:\oracle\<DBSID> Example: E:\oracle\C11 The variables ORACLE_SID and SAPDATA_HOME must always be set. There is no default.2 Getting Started with Oracle and the SAP System 2.

9 Definition Directory Structure (UNIX) This section describes the directory structure for the Oracle database with the UNIX operating system. see Configuring the Scroll Line Count for BR*Tools [Page 184]. Structure 50 April 2004 . Other environment variables that you can set for BR*Tools: • BR_LINES Definition of the number of lines in list menus. Default value: %SAPDATA_HOME%\sapdata1 (The same for SAPDATA<n>. log files.99). You can distribute the SAPDATA directories across several different drives. See also: Environment Variables (UNIX) [Page 47] 2. Recommended height: ≥ 20 lines. For more information. without defining the environment variables SAPDATA<n>.. executables. • BR_LANG Definition of the message language: E: English D: German • BR_TRACE Setting the trace function for error analysis. BTABD for the tablespace PSAPBTABD.. Use The directories contain a range of files such as profiles. The following conventions apply to this section: Term Meaning $<name> <DBSID> <TSP> Environment variable $ORACLE_SID Tablespace short name For example. n=1. For example: SAPDATA1= F:\data\prod\sapdata1.8. and so on.8 Database System Configuration Directory of the database data files.2 Getting Started with Oracle and the SAP System 2. The environment variables only have to be defined individually if directories are used that deviate from the default. scripts..

.dbf • mirrlogB/ log_g12m2. exp. imp rwsr-xr-x ora<dbsid> dba oracle SAP Home Directory For the files starting log_.data1 Example of a SAP data file for tablespace PSAPBTABD .2 Getting Started with Oracle and the SAP System 2.data1 btabd_1/btabd.dbf • sapdata1/ cntrl/cntrl<DBSID>. • sapdata2/ cntrl/cntrl<DBSID>.ora Profile for Oracle init<DBSID>.sap Profile for BR*Tools • bin/ contains binaries such as oracle.dbf log_g13m1.dbf log_g13m1.dbf log_g14m2.dbf Mirrored redo logs are optional – although we strongly recommend using them – so the specification for mirrlogA and mirrlogB might vary: • mirrlogA/ log_g11m2.8 Database System Configuration There are the following main structures: • • • $ORACLE_HOME for Oracle-specific objects with the default directory /oracle/<DBSID> $SAPDATA_HOME for SAP-specific objects with the default directory /oracle/<DBSID> Executables with the directory /usr/sap/<SAPSID>/SYS/exe/run Oracle Home Directory This directory contains the following subdirectories: • dbs/ init<DBSID>..dbf log_g13m2.dbf • origlogB/ log_g11m1.dbf Database control file April 2004 51 .dbf Database control file system_1/system. sqlplus. g means group and m means member: • origlogA/ log_g11m1.

.2 Getting Started with Oracle and the SAP System 2.exp: parameter file for table export [Page 250] • sapcheck/ <encoded timestamp>. d (disk).. f (full) . f (util_file).cln: log of brconnect –f cleanup [Page 473] • sapbackup/ back<DBSID>. and restart files as follows to the directory: <encoded datestamp>/ddl. p (pipe).xyz BRRESTORE detail log.data1 btabi_1/btabi.nxt: log of brconnect –f next [Page 475] <encoded timestamp>.sql: Data Definition Language (DDL) statements for table reorganization [Page 245] <encoded datestamp>.log BRBACKUP summary log <encoded timestamp>.xyz BRBACKUP detail log. i (incremental) y = n (online) or f (offline) z = t (tape). r (RMAN). previously all). where: xyz = rsb Restore backup files xyz = rsa Restore archive files xyz = rsf Restore individual files <encoded timestamp>/ Disk backups 52 April 2004 . • • sapdata<n>/ sapreorg/ BRSPACE logs [Page 440] BRSPACE writes scripts.8 Database System Configuration system_1/system. p (partial) . s (remote disk.chk: log of brconnect –f check [Page 472] <encoded timestamp>.dmp: export dump file for table export [Page 250] <encoded datestamp>/parfile. parameter files.edd/expdat. xyz = qub Query for which tapes are to be used xyz = cmb Determination of software compression rate xyz = tib Tape initialization xyz = rmp RMAN preparation run xyz = dbv Database verification with DBVERIFY xyz = ddb Delete of disk backup <encoded timestamp>.data1 Example of a SAP data file for tablespace PSAPBTABI . stage). where: x = a (whole.

dcp Deleted. delete and save <encoded timestamp>.log Oracle Alert file *. were saved once <encoded timestamp>.cpy Original copied <encoded timestamp>.log Summary log init<DBSID>.ssd Parallel saved on two stations and deleted <encoded timestamp>.tia Tape initialization <encoded timestamp>.dbf For example: C11arch1_4711.cpd Original copied and deleted <encoded timestamp>.dbf If online backup was performed ctrl<DBSID>.8 Database System Configuration cntrl.svd Original saved and deleted <encoded timestamp>.sap <encoded timestamp).cps Copy and save <encoded timestamp>.ssv Parallel saved on two stations <encoded timestamp>.log BRARCHIVE summary log Detail logs: <encoded timestamp>.dbf If offline backup was performed back<DBSID>.xyz Detail log • • BRRECOVER log files [Page 414] saparch/ Offline redo logs or archive logs <DBSID>arch<thread_number>_<log seq.cma Determination of software compression rate <encoded timestamp>.qua Query which tapes to be used <encoded timestamp>.trc User trace files Executables in Directory /usr/sap/<SAPSID>/SYS/exe/run • • brbackup brarchive April 2004 53 .ora init<DBSID>. were saved twice <encoded timestamp>.dbf (Default is OS-dependent) arch<DBSID>.sve Original saved <encoded timestamp>.cds Copy.2 Getting Started with Oracle and the SAP System 2.trc Oracle trace files usertrace/ *.dev Deleted.number>.fst Stop archiving using brarchive –f stop • saptrace/ background/ alert_<DBSID>.

ora Profile for Oracle init<DBSID>.8. and BRRESTORE cntrl<DBSID>.2 Getting Started with Oracle and the SAP System 2. Structure There are the following main structures: • • • %ORACLE_HOME% for Oracle-specific objects with the default directory \oracle\<DBSID> %SAPDATA_HOME% for SAP-specific objects with the default directory \oracle\<DBSID> Executables with the directory x:\usr\sap\<DBSID>\SYS\exe\run Oracle Home Directory This directory contains the following subdirectories: • database\ init<DBSID>. executables. The following conventions apply to this section: Term Meaning %<name>% <DBSID> <TSP> Environment variable %$ORACLE_DBSID% Tablespace short name For example. and so on.8 Database System Configuration • • • • • • brconnect brrestore brtools brrecover brspace brtools See also: Directory Structure (Windows) [Page 54] 2. scripts. Use The directories contain a range of files such as profiles.sap Profile for BRBACKUP. BRARCHIVE.dbf Control file • rdbms\ 54 April 2004 .10 Definition Directory Structure (Windows) This section describes the directory structure for the Oracle database with the Windows operating system. BTABD for the tablespace PSAPBTABD. log files.

imp.edd/expdat.exp: parameter file for table export [Page 250] • sapcheck/ April 2004 55 .dbf Mirrored redo logs are optional – although we strongly recommend using them – so the specification for mirrlogA and mirrlogB might vary: • mirrlogA\ log_tg101m2.data1 Example of a SAP data file for tablespace PSAPBTABI • • sapdata<n>\ sapreorg\ BRSPACE logs [Page 440] BRSPACE writes scripts.dbf log_tg104m1. g means group and m means member: • origlogA\ log_tg101m1. • sapdata2\ btabi_1\btabi..dbf • origlogB\ log_tg102m1.2 Getting Started with Oracle and the SAP System 2.dbf log_tg103m1.sql: Data Definition Language (DDL) statements for table reorganization [Page 245] <encoded datestamp>. and so on SAP Home Directory For the files starting log_.data1 btabd_1\btabd. parameter files.dbf • mirrlogB\ log_tg102m2.dbf log_tg103m2. and restart files as follows to the directory: <encoded datestamp>/ddl.dbf • sapdata1\ system_1\system. exp.dbf log_tg104m2.dmp: export dump file for table export [Page 250] <encoded datestamp>/parfile..data1 Example of a SAP data file for tablespace PSAPBTABD .8 Database System Configuration • bin\ Contains binaries such as sqlplus.

sap <coded timestamp).dbf If offline backup was performed back<DBSID>.xyz Detail log • • BRRECOVER log files [Page 414] saparch\ Offline redo logs or archive logs <DBSID>arch<thread_number>_<log seq.dbf (Default is OS-dependent) arch<DBSID>.number>. f (full). p (pipe).chk: log of brconnect –f check [Page 472] <encoded timestamp>. stage) xyz = qub Query for which tapes are to be used xyz = cmb Determination of software compression rate xyz = tib Tape initialization xyz = rmp RMAN preparation run xyz = dbv Database verification with DBVERIFY xyz = ddb Delete of disk backup <coded timestamp>.sve Original saved 56 April 2004 .log BRBACKUP summary log rest<DBSID>. d (disk).8 Database System Configuration <encoded timestamp>.dbf If online backup was performed ctrl<DBSID>.2 Getting Started with Oracle and the SAP System 2.dbf For example: C11arch1_4711.log BRRESTORE summary log <coded timestamp>. s (remote disk. p (partial) .xyz BRBACKUP detail log. i (incremental) y = n (online) or f (offline) z = t (tape). .xyz BRRESTORE detail log. previously all). r (RMAN). where: xyz = rsb Restore backup files xyz = rsa Restore archive files xyz = rsf Restore individual files <coded timestamp>\ Disk backups cntrl.cln: log of brconnect –f cleanup [Page 473] • sapbackup\ back<DBSID>. where: x = a (whole.log Summary log init<DBSID>.log BRARCHIVE summary log BRARCHIVE detail logs: <coded timestamp>. f (util_file) .ora init<DBSID>.nxt: log of brconnect –f next [Page 475] <encoded timestamp>.

cds Copy. delete and save <coded timestamp>.log Oracle Alert file *.svd Original saved and deleted <coded timestamp>.trc Oracle trace files usertrace\ *.fst Stop archiving using brarchive –f stop • saptrace\ background\ alert_<DBSID>.trc User trace files Executables in Directory <drive>:\orant • • • • • • • • • • • • brbackup brarchive brconnect brrestore brrecover brspace brtools mkszip mksunsip cpio mt dd See also: Directory Structure (UNIX) [Page 50] April 2004 57 .dev Deleted.ssv Parallel saved on two stations <coded timestamp>.cpd Original copied and deleted <coded timestamp>.8 Database System Configuration <coded timestamp>.cma Determination of software compression rate <coded timestamp>.ssd Parallel saved on two stations and deleted <coded timestamp>.qua Query which tapes to be used <coded timestamp>.dcp Deleted. were saved once <coded timestamp>.cpy Original copied <coded timestamp>. were saved twice <coded timestamp>.cps Copy and save <coded timestamp>.tia Tape initialization <coded timestamp>.2 Getting Started with Oracle and the SAP System 2.

and therefore the DBA functions in the Computer Center Management System (CCMS). SAPDBA Read and write authorizations to work with BR*Tools command options. used to be separate. this is no longer true. or <sapsid>adm and SAPSERVICE<SID> on Windows.8 Database System Configuration 2. Database Roles • • • SYSDBA All authorizations SYSOPER Operator activities. ORA_OPER). Due to the requirements for RMAN backup. Both users now belong to the operating system groups dba and oper. as shown in the tables below. the OPS$ user must have both the SYSOPER role and the SAPDBA role. Database Users and Roles UNIX Operating System Users Operating System Group Database Role Database Users ora<dbsid> <sapsid>adm dba oper dba oper SYSDBA SYSOPER SYSDBA SYSOPER OPS$ORA<DBSID> OPS$<SAPSID>ADM Windows Operating System Users Operating System Group Databas e Role Database Users <sapsid>adm ORA_<SID>_DBA ORA_<SID>_OP ER SYSDBA SYSOPE R SYSDBA SYSOPER (SYS) OPS$<DOMAIN>\<SAPSID>ADM OPS$<DOMAIN>\SAPSERVICE<S ID> SAPSERVICE<SI D> ORA_<SID>_DBA ORA_<SID>_OPE R The OS group on Windows can also be specified globally (without instance name) (ORA_DBA.8. 58 April 2004 . Operating System Users and Groups. To be able to use the CCMS DBA functions or BR*Tools command options without restrictions. but no read or write authorizations.2 Getting Started with Oracle and the SAP System 2.11 Users and Roles Operating System Users In the SAP system the roles of the users ora<dbsid> and <sapsid>adm on UNIX.

The prerequisite is that a DB user OPS$<OS_user> corresponding to the OS user is defined on the database. April 2004 59 . Once you have logged on successfully with the OS user. as well as selecting from V$ tables when the database is not open. you can connect to the database with: SQLPLUS> connect / This means you do not have to enter another password.2 Getting Started with Oracle and the SAP System 2.8 Database System Configuration OPS$ Database User The Oracle OPS$ mechanism moves the entire DB security mechanism to the operating system level. shutdown. You are then working as OPS$<OS_user>. and identified as externally. recover and so on. Logon context unix <sid>adm / <password> OS user logon Definition OPS$<SID>ADM identified as „externally“ DB user Configuration DB role OS user OS group OPS$<SID>ADM DB SYSOPER SAPDBA <sid>adm oper dba OS> brbackup -u / BR*Tools ora<sid> rsx rwx r-x brbackup DB Context UNIX Context The OPS$ Mechanism (UNIX) BR*Tools Database User The standard DB user is always SYSTEM. SYSTEM connects with the Oracle option AS SYSOPER or AS SYSDBA for actions such as startup. In the same way you can start the program BRBACKUP with: OS> brbackup –u / This OPS$ mechanism is always used if you call BR*Tools from the CCMS transaction DB13 in the SAP System.

see Tools for Oracle DBA [Page 537]. For more information on how to perform Oracle DBA with the tools supplied by SAP. Process Flow You review the following topics: • • • • • • • Instance Management [Page 61] Space Management [Page 65] Segment Management [Page 70] Database Backup [Page 80] Restore and Recovery [Page 156] Database System Check [Page 178] Update Statistics [Page 179] 60 April 2004 .3 Approach to Oracle DBA 3 Approach to Oracle DBA Purpose This section helps you to work out how to approach database administration (DBA) with the Oracle database. Prerequisites You have already started Oracle DBA with the SAP System [Page 23].

3 Approach to Oracle DBA 3. This section discusses how to approach instance management. see Database Instance Management with BR*Tools [Page 201]. Features Starting Up the Database You can start up the database [Page 202] as follows: Type No mount What Happens Database instance is built up Operating system resources are allocated How brspace -f dbstart -s nomount [Page 420] April 2004 SMON ARCH CKPT Control files : 61 .1 Use Instance Management This section helps you develop an approach to managing your database instance or – if you have an Oracle Real Application Cluster (RAC) – your instances. To make the mounted database accessible to authorized users. The process of associating the database with an instance is called mounting the database.1 Instance Management 3. Prerequisites The main components of the database and instance are shown in the following graphic: Oracle Database Profile Oracle Instance Oracle processes DBWR LGWR PMON Nomount Oracle listener process Mount Datafiles Open System Global Area Database buffer pool Shared pool Online redo log files Redo log buffer Offline redo log files When an Oracle database is running. you must open it. For more information on how to perform instance management. it is associated with an instance.

Information about the file structure of the database is read Data files and logs are not yet opened. Pending database transactions are ended. and the instance is shut down. The database is consistent after shutdown.3 Approach to Oracle DBA 3. brspace -f dbstart -s open [Page 420] brspace -f dbstart -s mount [Page 420] If you have an Oracle Real Application Cluster (RAC). work processes in the SAP system) and shuts down the database brspace -f dbshut -m transactional [Page 421] Abort Emergency database shutdown Users are not logged off and open transactions are not rolled back. The database is not consistent after shutdown. then disconnects all users (that is. PMON ends all sessions and performs a rollback of the open transactions. After all database user have logged off. instance recovery is performed immediately after opening the database. the database is closed properly: all files are closed. you can start up all instances that are currently down with the all_down parameter: brspace -f -i all_down [Page 420] Shutting Down the Database You can shut down the database [Page 204] as follows: Type Normal What Happens No new database logon possible. brspace -f dbshut -m immediate [Page 421] Transactional No new connections are allowed and no new transactions can be started.1 Instance Management using configuration information stored in the profile init<DBSID>. The database is consistent after shutdown. Open All files in the database system are opened. the database is dismounted. Oracle waits for all open transactions to finish. brspace -f dbshut -m abort [Page 421] 62 April 2004 . If required. Mount Database control files are evaluated.ora or the spfile. The database is then closed properly (as for a normal shutdown). DBWR and ARCH might require up to 1 hour post-processing time. How brspace -f dbshut -m normal [Page 421] Immediate Only the current commands are executed.

1 Instance Management An instance recovery is automatically performed at the next database startup. you can shut down all instances that are currently up with the all_up parameter: brspace -f dbshut –i all_up [Page 421] Altering the Database Instance You can alter the database instance [Page 206] as follows: • Switch the current online redo log file You might want to do this when. Altering Database Parameters You can alter database parameters [Page 208] in the following profiles: • • init<DBSID>. For more information. you want to apply the data changes immediately to a standby database. It is still used by many SAP transactions. so must be kept up-to-date with the newer spfile (see below). because BRSPACE ensures that the two files are synchronized whenever you make a change. which contain a record of the database transactions. This means that you can recover the database in the event of a failure involving data loss.ora file. see Setting Up Archiving [Page 38]. If you have an Oracle Real Application Cluster (RAC). you normally make sure that you set archivelog mode on. you want to shorten the database shutdown time after the checkpoint. Set noarchivelog mode You can set noarchivelog mode on for short periods to perform essential database administration. for example. The advantages are: You save space in the archive directory There is a performance gain It is very important that your database normally runs with archivelog mode set and with automatic archiving enabled. We recommend that you always use BR*Tools to alter database parameters. • • Set archivelog mode When you set up the database. are backed up. If your SAP system was upgraded from an older release. April 2004 63 . which is a new binary server-side parameter file introduced by Oracle. you have to create it yourself initially using SQL*Plus because it was not part of older SAP installations. For more information on Set archivelog mode and Set noarchivelog mode. available as part of the standard installation from SAP Web AS 6.40. This makes sure that the online redo log files. spfile. for example. see the Oracle documentation. which is a normal disk file.3 Approach to Oracle DBA 3. Do not change either file manually at operating system level. • Force a database checkpoint You might want to do this when.

1 Instance Management You can change parameters with the following scope: Scope SPFILE Where the Change Occurs When the Change Occurs At next database startup and persists from then on Immediately.ora Memory of the currently running instance MEMORY BOTH spfile and init<DBSID>. but does not persist when database is restarted Immediately and persists through subsequent database startups Summary Persistent but not immediate Immediate but not persistent Immediate and persistent spfile and init<DBSID>.3 Approach to Oracle DBA 3. it maintains a history of all changes in the BRSPACE Parameter Change Log [Page 447].ora and memory of the currently running instance When you perform parameter changes with BRSPACE. 64 April 2004 .

for example: Showing Disk Volumes with BR*Tools [Page 241] Make sure that you plan for additional disks in time to accommodate data growth. You monitor the database closely: You regularly run the database system check [Page 178] so that you can detect space problems before they become serious. Move the data file. for example.3 Approach to Oracle DBA 3..2 Purpose Space Management This section helps you develop an approach to managing the space of your Oracle database.. For example. For more information on reorganization. see Segment Management [Page 70] Prerequisites You consider whether to use raw devices or a file system. with Veritas Quick I/O [Page 153] the difference is reduced. 2. If required. after you have added new disk storage to your system and want to use it for existing data files. You manage tablespaces [Page 65] to: Extend a tablespace by adding a new file to avoid overflow Create a new tablespace. usually to prevent overflow Turn on the Oracle AUTOEXTEND option to avoid data file overflow. We recommend raw devices only for experienced database administrators because the administration is more complex. Raw devices are generally 10 to 20% faster on UNIX systems. 3. for example. For more information on how to perform space management. This section discusses the approach to space management. 1. you run these reports on a one-off basis: Showing Tablespaces with BR*Tools [Page 232] Showing Data Files with BR*Tools [Page 234] You also need to monitor available disk space at the operating system level with. when switching from a dictionary managed to a locally managed tablespace Drop tablespaces. after an upgrade 3. However. Process Flow .1 Managing Tablespaces April 2004 65 . see Space Management with BR*Tools [Page 216].2 Space Management 3. for example. only one Oracle file can be set up on each raw device.2. You manage data files [Page 68] to: Resize the file.

The following graphic shows the effect of adding a data file: <tablespace>. tables and indexes) grow steadily. and make sure there is always enough disk space available. which is when a tablespace runs out of freespace in the allocated file or files. Use this method when either of the following conditions applies: The existing data files cannot be resized because there is not enough disk space available on the disks where the files are located The existing data files have reached their maximum size. Procedure . data1 New file added <tablespace> .data2 New file Extents Critical object threatens overflow Critical object now on new file Set the AUTOEXTEND option for the data files in the tablespace.. client copy or batch input) carefully. because they might extend tables excessively.2 Space Management Use You manage tablespaces in your Oracle database as part of Space Management [Page 65]. • Poor monitoring of the tablespace During normal operation. For more information on setting the AUTOEXTEND option and resizing a data file. 66 April 2004 . Resize an existing data file to provide more space. see Managing Data Files [Page 68]. anticipate growth. This happens when an object requires a new extent but there is either no freespace or insufficient freespace in the tablespace. see Extend a tablespace with BR*Tools [Page 217]. For more information on how to add a data file. Extend a tablespace in one of the following ways: Add a data file to the tablespace. You especially need to avoid tablespace overflow. You can extend. database objects (that is. Prerequisites Tablespace overflow can occur in the following situations: • Operations that greatly extend tables in the tablespace Be sure to plan certain operations (for example. create.3 Approach to Oracle DBA 3. Be sure to monitor the database. 1. drop.. and alter tablespaces.

To prepare for an online reorganization of a tablespace. Alter a tablespace [Page 224] for a number of reasons: Set a tablespace online or offline: For systems with Multiple Components in One Database (MCOD). BRSPACE only lets you drop an empty tablespace. 3. BRSPACE: Creates a control file backup in the directory $SAPDATA_HOME/sapreorg/<encoded timestamp> before and after the procedure. An example of this is when Oracle receives an operating system I/O error when writing to a data file. Logs the action in the BRSPACE Structure Change Log [Page 443]. Oracle can set the tablespace offline to prevent corrupt blocks. without any intervention from you. for example. BRSPACE removes all subdirectories for the data files when it drops the tablespace. see “Prerequisites” in Space Management [Page 65]. In this case. For more information. After you have exported tables from a tablespace and you want to relocate the tablespace to a new disk volume for the import. for example. that is. Drop a tablespace [Page 222]. BRSPACE: Creates a control file backup in the directory $SAPDATA_HOME/sapreorg/<encoded timestamp> before and after the procedure. Make sure that you find the cause if Oracle has automatically set a tablespace offline. you can specify whether the tablespace file: • • Has the AUTOEXTEND option set and. to switch from a dictionary managed to a locally managed tablespace. if so. unless you specify the –f|-force option. Since creating a tablespace is a structural change to the database. the increment and maximum size. Create a new tablespace [Page 219] for the following reasons: To prepare for an upgrade. Set or reset the backup status April 2004 67 . 4.2 Space Management 2. when the tablespace is no longer required after an upgrade. when you need to create a new tablespace for the SAP software of the new release. The SAP system can only function if all the tablespaces belonging to the schema user are online. you can set the tablespaces PSAP<SCHEMA_ID> belonging to one schema user SAP<SCHEMA_ID> offline for maintenance. Is on a raw device or in the file system.3 Approach to Oracle DBA 3. Logs the action in the BRSPACE Structure Change Log [Page 443]. This does not affect tablespaces from other SAP systems with a different SAP<SCHEMA_ID>. When you create a new tablespace. Since dropping a tablespace is a structural change to the database.

see BRCONNECT Default Conditions for Database Administration [Page 453]. you can move the data files to raw disks. you can perform this action on a one-off basis if a large amount of data was deleted. To avoid exceeding the limit for the maximum number of files. Prerequisites The following constraints limit the maximum number of data files in an Oracle database: • The db_files parameter in the init<DBSID>. as shown in the following graphic: 68 April 2004 . This section discusses the approach to managing your data files. you can perform this action immediately afterwards. Although the database system check automatically coalesces tablespace free extents. 3.. • • Procedure . The database system check can report this error when it raises the condition TABLESPACE_IN_BACKUP. If BRBACKUP fails during an online backup. Resize a data file to provide more space for the objects in the file. You can resize and move data files and also set the AUTOEXTEND option.2.2 Use Managing Data Files You manage data files in your Oracle database as part of Space Management [Page 65]. if you have deleted a client or archived data. There is a UNIX kernel limit for the maximum number of open files. the SAP installation process sets maxdatafiles and db_files to 254. It consolidates the storage structure of the tablespace and can improve performance. For more information.3 Approach to Oracle DBA 3. However. Currently. There is an absolute Oracle maximum of 65533 files in a database and usually 1022 files in a tablespace. see Altering a Data File with BR*Tools [Page 227]. If you reach this limit. you can no longer add files to the database.ora file is usually set to the value of the maxdatafiles option of the create database command. Use BR*Tools to reset the backup status if you are sure that: An online backup has crashed There is currently no online backup running Coalesce free extents This combines contiguous extents with free space into a single large extent within a tablespace. For more information on how to manage your data files. you must manage the data files in an Oracle database.. To simplify database administration. To improve your database performance. 1. you can move the files to the file system. For example. certain hardware platforms have a limit lower than this absolute maximum.2 Space Management BRBACKUP sets and resets the backup status for a tablespace during and after an online backup. tablespaces might be left in backup status.

and so on). If you reach the UNIX kernel limit for the maximum number of open files. you have to change the relevant UNIX kernel parameter. 3. In the very unlikely event that you reach the hardware-dependent limit of files in the database (65533 files or less). then make sure that the change takes effect (such as shutting down and restarting the database. To simplify database administration. Reorganize a tablespace consisting of several data files such that the number of files in use is reduced. then do one of the following: Increase the value of the db_files parameter. be sure to regularly monitor space on the disk volume. You move data files [Page 229]. However. restarting the UNIX system.2 Space Management <tablespace>. With this option. Use this method when you want to specify a larger size for the data file. Set the AUTOEXTEND option on a data file. see Altering a Data File with BR*Tools [Page 227]. the data file is extended automatically as the data grows. 4. Otherwise you might have to repeat the procedure soon. the entire disk can still overflow. data1 Critical object Original size Original size After Resize After Resize Make sure that you choose a sufficiently large size for the data file. then do the following: If you reach the limit for db_files or maxdatafiles. see Altering a Data File with BR*Tools [Page 227]. allowing for future growth. For more information on how to resize a data file. move the files to the file system. for example. move the data files to raw disks. April 2004 69 . when you want to relocate the data files to new disk drives for performance or other reasons. Use this method when you have enough space on the disk volume and the tablespace is not expected to grow too rapidly.3 Approach to Oracle DBA 3. then shut down and restart the database. logging on again at UNIX level. If you reach the limits specified in "Prerequisites" above. 2. Therefore. then you have to perform a reorganization. For more information on how to set the autoextend option. Recreate the control files specifying larger values for maxdatafiles. To improve your database performance.

Prerequisites With Oracle 9i. Additional extents When more space for extra data is required. you still need to perform export/import for tables containing LONG or LONG RAW fields. This initial database status can change as follows: • Additional data files When a tablespace is full – that. The Oracle system now automatically merges adjacent areas of free space. • Freespace fragmentation Adding or deleting complete objects causes freespace fragmentation in a tablespace. This section discusses the approach to segment management. is there is not enough freespace to create a new extent – additional data files must be added (except if the AUTOEXTEND option is used). see Segment Management with BR*Tools [Page 243]. For more information on how the reorganization works. Creating and deleting data causes some blocks to be filled completely. you can now perform table reorganization and index rebuild while the database remains online. • Internal fragmentation This occurs if the fill level of the database blocks develops unevenly. For more information on how to perform segment management. the space is lost and cannot be used for storing data. The result might be poorer data access times. so this problem is less likely to occur than in the past. see Reorganization with the Redefinition Package [Page 78]. How the Database Deteriorates When installed for an SAP System. This overcomes the limitations of the old reorganization procedure based on export/import. space is used inefficiently. while others remain relatively empty. additional extents are created for the tables and indexes of a tablespace. If these are smaller than one requested extent. the tables and indexes – of your Oracle database. The fill level of the individual blocks is initially identical. which is a time-consuming procedure with a risk of data loss.3 Use Segment Management This section helps you develop an approach to managing the segments – that is. However.3 Segment Management 3. As a result. • Block chaining 70 April 2004 . the Oracle database looks as follows: • • • Most of the tables and indexes of a tablespace are stored in only one extent. Each tablespace consists of exactly one data file. this problem should not occur in locally managed tablespaces. Free storage space in data files is divided into smaller units. Also.3 Approach to Oracle DBA 3.

For more information on the approach to reorganization. Set parallel degree You can also use alter table to set the degree of parallelism for queries. see Reorganization [Page 72] and Reorganization Case Study [Page 76]. A higher degree of parallelism improves performance on query statements. more time is needed for reading data from the disk. the system must then follow a chain from the first block of the data record to the further blocks. such changes can increase run times for full-table scans. see Export/Import [Page 75]. • Rebuild indexes You can rebuild fragmented indexes. see Rebuilding Indexes with BR*Tools [Page 248]. the above changes to the database do not normally increase the time required to access data. data has never been written to the data blocks).3 Approach to Oracle DBA 3. Only set the parallel degree if told to by SAP support. This greatly reduces the run time for update statistics with BRCONNECT because it can more quickly identify which tables need update statistics. If space allocated to an index has never been used (that is. Although table monitoring has a small performance overhead. You can do this online without incurring downtime. Since SAP Systems usually access table entries using an index. see Altering a Table with BR*Tools [Page 256]. When the record is accessed. • Alter index Coalesce index You can coalesce an index to deallocate internal free space. April 2004 71 . Production systems normally run without parallelism. you can easily schedule update statistics to run daily. As of Oracle 9i. block chaining occurs. • Table export and import This is the older method of reorganization. For more information on how to rebuild indexes. you can free such space for use by other objects in the tablespace. This improve data access using indexes. the overall effect is to improve performance because table statistics can be more up-to-date. Features • Reorganization You can reorganize tables to move them to another tablespace or to recover space in the database and improve performance while the database is online. see Update Statistics [Page 179]. You must still use it for tables containing LONG or LONG RAW fields. For more information. we recommend you to turn on table monitoring for all tables. For more information on the approach to update statistics. As a result.3 Segment Management If a data record does not fit into a database block. Therefore. However. For more information on how to alter tables. • Alter table Table monitoring With table monitoring Oracle automatically collects information on table updates.

remember that the objects for which you have deallocated free space might themselves soon require new extents as they grow with inserts and updates.3 Approach to Oracle DBA 3. For more information on how to alter indexes.3 Segment Management However. A higher degree of parallelism improves performance on query statements. see Altering an Index with BR*Tools [Page 258].data1 2 1 2 5 0 3 1 1 5 External 4 fragmentation 3 0 Oracle block 1 2 3 4 5 . Therefore. BRSPACE performs the reorganization using the new Oracle feature. The following graphic shows some of the reasons for reorganization: Disk accesses [%] 2 0 2 Disk_1 0 2 3 4 1 0 0 2 3 3 5 2 0 2 5 Disk_2 0 2 3 4 1 0 0 2 3 3 5 0 2 Disk_3 0 2 3 4 1 0 0 3 5 2 0 2 5 Disk_4 0 2 3 4 1 0 0 2 3 3 5 1 3 1 3 1 3 1 3 2 5 2 0 3 4 1 0 0 4 1 0 1 0 4 1 0 1 1 Disk "hot spots" 0 4 1 0 5 1 <tablespace>. Production systems normally run without parallelism. online table redefinition. Prerequisites Is reorganization really necessary? You need to reorganize less often than in the past due to the following: 72 April 2004 ..1 Use Reorganization This section helps you develop an approach to reorganization. Set parallel degree You can also use alter index to set the degree of parallelism for queries. 4 2 3 4 Free 0 0 2 1 0 Internal fragmentation Used For more information on how reorganization with the Oracle DBMS_REDEFINITION package works.. and can result in improved performance. which improves the structure of the database. if necessary. 3. see Reorganization with the Redefinition Package [Page 78]. a more permanent solution is to reorganize affected objects and also. Only set the parallel degree if told to by SAP support.3. extend the tablespace.

see Reorganization Case Study [Page 76]. Features BRSPACE performs the reorganization using the new Oracle feature. Effects of a Reorganization A reorganization can have the following positive effects on the database: • • • • • The data from one object is merged into a single extent or into fewer extents. • • Parallel reorganization to improve performance. so wasting space.3 Approach to Oracle DBA 3. Check the parameters TOO_MANY_EXTENTS. make sure that you perform the reorganization when the system load is low. you must use the older reorganization method. It is less important to distribute data files manually to different disks during reorganization because the setup itself can improve performance. You can identify these by using the database system check. For more information. see BRCONNECT Default Conditions for Database Administration [Page 453]. This process is called "defragmentation. Freespace fragments in an object are merged into larger freespace segments. Data chains are resolved in most cases. you might still need to reorganize if the following factors apply: • • • To see how you can use reorganization for your system. CRITICAL_SEGMENT. export/import. Previously. To avoid a performance impact on the SAP system. Less risky because Oracle creates a copy of the table and transfers the entire table contents before deleting the original table. The data from a tablespace with many small files is merged into one or more larger data files.3 Segment Management • With locally managed tablespaces. see Export/Import [Page 75]. You can also reorganize without parallelism if you want to minimize the impact on the production database. • • However. so reducing internal fragmentation. and PCTINCREASE_NOT_ZERO. The parameters MAXEXTENTS and NEXT no longer exist. You want to move certain large and heavily used tables into separate tablespaces. online table redefinition. April 2004 73 . space allocation inside a tablespace is now more efficient. You want to transform dictionary managed into locally managed tablespaces. For more information on this approach. If your tables have LONG or LONG RAW fields. Large disks and RAID systems with large and secure memory buffers reduce I/O hotspots. Automatic segment space allocation reduces internal fragmentation within Oracle blocks and improves the performance of parallel queries. There are fragmented tables or indexes in dictionary managed tablespaces that you are still using. incorrect use of these parameters often caused Oracle to create too many or too large extents." The fill level in the individual blocks is evened out. with the following advantages: • Online reorganization improves availability since the SAP system does not need to be stopped for the reorganization.

If a partition of a partitioned table or index is in a tablespace that you want to reorganize. BRSPACE also supports the reorganization of tables with all types of large object (LOB) columns. In other words.3 Approach to Oracle DBA 3.. Easy restart for an aborted reorganization. Large objects are recreated with the same physical characteristics as before the reorganization.3 Segment Management • • Consistency is guaranteed because all changes to tables currently being reorganized are undone. with a single large tablespace. You can enter first for Create DDL statements in the BRSPACE menu or the command option –d|-ddl so that you can alter the Data Definition Language (DDL) statements for the reorganized tables. different tablespaces for data and indexes – into tablespaces in the layout required for Multiple Components in One Database (MCOD). see Reorganizing Tables with BR*Tools [Page 245]. Activities . that is. even if you do not specify that you want to reorganize the other tablespaces. BRSPACE pauses and you can change the attributes of the following objects: • • • Table Storage Field • Index For more information see Reorganizing Tables with BR*Tools [Page 245] or -f tbreorg [Page 431]. make sure that they: • • • Are syntactically correct Do not contain any new fields Are compatible with the SAP dictionary 74 April 2004 . or vice versa Move large tables to a separate tablespace Reorganize tables due to internal or external fragmentation • • The reorganization case study shows how you can transform data dictionary managed to locally managed tablespaces in the new SAP layout. unless you actually change the Data Definition Language (DDL) statements.. BRSPACE supports reorganization of partitioned tables and indexes. You can use table reorganization to: • • Transform data dictionary managed tablespaces into locally managed tablespaces Transform tablespaces in a traditional layout – that is. BRSPACE reorganizes all partitions of a partitioned object. For more information on how to perform a table reorganization. The reorganization does not change the partitions and their parameters. If you change attributes. BRSPACE reorganizes all other partitions of the object in other tablespaces too. The restarted reorganization only processes tables that have not yet been reorganized.

You can export and import partitioned tables and indexes with BRSPACE. Activities For more information on how to perform export/import. The export and import does not change the partitions and their parameters. BRSPACE exports and imports all other partitions of the object in other tablespaces too. If a partition of a partitioned table or index is in a tablespace that you want to export and import. even if you do not specify that you want to reorganize the other tablespaces. BR*Tools uses Oracle export and import functionality to: • Export database objects You can export tables with their data. you end up with inconsistencies in the SAP system. export is a good method.3. and with other database objects such as constraints. if you attempt to transport data between systems with this function. Create new SAP databases using the SAP installation procedure. Use the SAP correction and transport system to transport objects between SAP systems. Export and import enables you to back up database objects in addition to other database backups. This means that you cannot use them as part of an Oracle restore. synonyms and sequences. This function is only intended for use with objects in a single database.3 Approach to Oracle DBA 3.3 Segment Management 3. The data backups from an export are logical backups. If you only want to back up particular tables. Therefore.2 Use Export/Import You can use this function to export and import database objects. grants. Do not use this function for restore. table and index definitions. Do not use this function for the transport of database objects between databases. For example. In other words. views. • Import database objects You can import objects that have earlier been exported. see Reorganization Case Study [Page 76]. The exported objects are static and are only consistent with the database if it remains unchanged. April 2004 75 . BRSPACE exports and imports all partitions of a partitioned object. The logical structure of SAP data is so complex that data objects are often distributed across many tables and many tables are linked largely according to the relational database model. you can add to the data backup you perform before a reorganization by exporting the objects that are to be reorganized. see: • • Exporting Tables with BR*Tools [Page 250] Importing Tables with BR*Tools [Page 253] For more information on how export/import is used in practice.

• When you reorganize a table tablespace.3 Purpose Reorganization Case Study This case study shows how to perform a reorganization with the following aims: • • • Convert dictionary managed to locally managed tablespaces Convert the tablespace layout to the new SAP standard layout with a single large tablespace. as shown in the following graphic: Dictionary managed tablespace Locally managed tablespace <tablespace>. tablespaces in the old tablespace layout [Page 44]. Correctly process tables with LONG or LONG RAW fields. which cannot be reorganized using the online procedure – they require a reorganization using export/import [Page 75] In this case study we process tables from a group of tablespaces – that is. PSAP<SAPSID>. If you want to process all the tables in your database. However. 76 April 2004 .data1 2 1 2 4 2 0 0 2 3 4 1 0 1 5 0 3 1 5 4 3 Locally managed tablespaces are now the SAP standard.3 Segment Management 3.3 Approach to Oracle DBA 3. For example. BRSPACE also reorganizes the corresponding index tablespace. they are by default locally managed. we recommend that you do this in groups of tablespaces. When you create new tablespaces with BRSPACE. Prerequisites • One of the aims of the case study is to convert dictionary managed to locally managed tablespaces. if you reorganize PSAPSTABD. you can try processing all the tablespaces in one run. then PSAPSTABI is also reorganized. if the database is small.3.

b. which is locally managed and which stores both data and indexes: Set Data type in tablespace in the BRSPACE menu or command option –data to both. PSAP<SAPSID>. 1. BRSPACE cannot reorganize tables with LONG or LONG RAW fields. You create a new tablespace [Page 219] called PSAP<SAPSID> for the schema owned by SAP<SAPSID>.3 Approach to Oracle DBA 3. BRSPACE sets up the new tablespace. It displays a warning message and leaves these tables in the source tablespace. ready to contain the reorganized tables.3 Segment Management • You might need to plan downtime for this procedure because tables with LONG or LONG RAW fields (if selected) require reorganization with the export/import procedure. BRSPACE reorganizes the tables to the new tablespace and deletes the tables from the source tablespaces. However. which cannot be performed online. You do not need to specify a separate index tablespace.. To improve the performance of the reorganization. set Table owner in the BRSPACE menu or command option –owner to the name of the SAP owner. 3.. Process Flow . You reorganize the tables [Page 245] in the selected tablespaces using the BRTOOLS menus or the command option -tablespace: Set Tablespace names to the tablespaces for which you want to reorganize tables. PSAP<SAPSID>. You export the table [Page 250] data from the tablespaces: April 2004 77 . 4. Set Table names in the BRTOOLS menu or command option -table to “*” to avoid having to make a further selection. You perform a dummy reorganization [Page 245] to generate Data Definition Language (DDL) statements with which you subsequently create the tables in the new tablespace: Set Tablespace names or command option –tablespace to the tablespaces containing the remaining tables with LONG or LONG RAW fields (and associated indexes). You do not need to specify a separate index tablespace. You perform an export/import to reorganize the remaining tables with LONG or LONG RAW fields (and associated indexes) into the new tablespace: a. Set New destination (newts) in the BRSPACE menu or command option –newts to the new tablespace. You stop the SAP system. Set New destination (newts) in the BRSPACE menu or command option – newts to the new tablespace. Set Create DDL statements (DDL) in the BRSPACE menu or command option –ddl to only. 2. you can set Parallel threads or command option -parallel. Make sure that the tablespace is large enough to hold all the data from your existing tablespaces. Set File autoextend mode in the BRSPACE menu or command option – autoextend. This means the new tablespace will contain both tables and indexes. If you want to reorganize all the tables in a component.

d.3 Segment Management Set Tablespace names or command option –tablespace to the tablespaces containing the remaining tables with LONG or LONG RAW fields (and associated indexes). if it has LONG or LONG RAW fields – the package returns an error and BRSPACE continues processing. If a table cannot be processed – for example. 7. BRSPACE names the interim table <ORIGINAL_NAME>#S. You drop the tablespaces [Page 222] (including contents using command option –force) from which you have just exported the table data.4 Reorganization with the Redefinition Package Use BRSPACE performs online table reorganization using the Oracle package DBMS_REDEFINITION. 78 April 2004 . For more information on this package. Set Export dump directory or command option –dumpdir to a directory with enough space to store the data from the exported tables. c.3 Approach to Oracle DBA 3.3. You import the table [Page 253] data into the new tablespace. $SAPDATA_HOME/sapreorg/<coded timestamp> – and enter the following SQLPLUS commands: connect / as sysdba @ddl. 2. 1. 4. and comments from the original table on the interim table. e. 6. and triggers are created with interim names. <ORIGINAL_NAME>#S. constraints. You change to the directory where you stored the DDL statements – that is. When the redefinition is finished. This processing occurs in parallel if you set the required option. Activities For each table to be reorganized: . as recommended by Oracle.. Indexes. the interim table has all the data and attributes of the original table.. You restart the SAP System. This step synchronizes the tables. BRSPACE calls DBMS_REDEFINITION to start the redefinition process to copy data from the original table to the interim table. 3. triggers. constraints. BRSPACE creates an empty interim table. BRSPACE dynamically updates the interim table with changed data from the original table. BRSPACE creates a primary key constraint for tables without a primary key but with a unique index. For large tables. 5. grants. BRSPACE creates all indexes. excluding the table from the reorganization. 5.sql This creates the empty tables in the new tablespace. see the Oracle documentation. 3. BRSPACE calls the package to check whether the table can be redefined online. BRSPACE generates Data Definition Language (DDL) statements for the table.

April 2004 79 . BRSPACE calls RDBMS_REDEFINITION to finish the reorganization. constraints. and triggers back to their original names. RDBMS_REDEFINITION briefly locks both the original and interim table before renaming the interim table so that it has the same name as the original table. BRSPACE drops the original table and renames the indexes.3 Approach to Oracle DBA 3. 9. If all the above steps have completed successfully.3 Segment Management 8.

in the event of failure. see Why Back Up the Database? [Page 82] and What Needs Backing Up? [Page 83] Activities You can perform backups in the following ways: • • DBA Planning Calendar for routine backups The menus in BR*Tools BR*Tools calls the tools BRBACKUP. you can restore and recover it. BRARCHIVE. see Backup Overview [Page 81]. Features • • BRBACKUP backs up database files BRARCHIVE backs up offline redo log files For more information. 80 April 2004 . • The command line In this way. or BRRECOVER as necessary to complete the task you have chosen. BRARCHIVE.4 Database Backup 3. For more information. or BRRECOVER. but this requires expert knowledge.3 Approach to Oracle DBA 3. and recovery Prerequisites You familiarize yourself with the above tools and make sure that you frequently back up the entire database. BRRESTORE. BRRESTORE.4 Use Database Backup You need to regularly back up your Oracle database so that. you can use the tools BRBACKUP. Integration You use the following tools for database backup: Tool Use DBA Planning Calendar [Extern] – in the Computing Center Management System (CCMS) of the SAP System Backup and Database Copy with BR*Tools [Page 279] – uses the BR*Tools user interface BRBACKUP [Page 359] BRARCHIVE [Page 382] Oracle Recovery Manager (RMAN) [Extern] – integrated with BRBACKUP and BRARCHIVE Routine backups: • • • • Backup of database files Backup of offline redo log files Backing Up the Database with BR*Tools Backing Up the Offline Redo Log Files with BR*Tools Backup of database files Backup of offline redo log files Backup. restore.

It is even better if you perform backups more often (for example. if possible. and recovery. Use incremental backup [Page 90] for larger databases. 1. We recommend that you schedule regular backups with the DBA Planning Calendar [Extern]. We recommend that.3 Approach to Oracle DBA 3. 4. Normally. archive. and again after any changes have been made to the approach. You document your approach in a plan and make sure that all relevant people know the procedures to follow in the event of problems. There are action patterns for different requirements to cover the main aspects of database administration. You verify [Page 122] the: April 2004 81 . You identify what needs to be backed up [Page 83].1 Backup Overview This section gives you basic information to develop a careful approach to backing up your Oracle database. consider high availability solutions for Oracle [Extern] such as Oracle standby databases [Extern]. consider the following: • You design an approach based on the needs of your company. 3. you perform at least one offline backup per cycle.4 Database Backup We recommend you to use the DBA Planning Calendar for routine backup because this enables you to automatically schedule the backup.4. We recommend a minimum cycle of 14 days. You identify the database backup type [Page 86] that you require. 5. 2. You work out a backup cycle [Page 91]. Prerequisites When designing your approach to backup. you reuse the backup media after 28 days. you perform an online [Page 88] and complete [Page 89] backup. We recommend you to use the BR*Tools menus for restore and recovery because BR*Tools guides you through the necessary steps. weekly) if possible. you back up the complete database and the redo log files. using the action patterns [Extern] available there. 3. with a 28-day cycle.. although 28 days is preferable. You ask yourself questions such as: What level of availability do you require from the database? How long can you afford to shut down the SAP System in the event of data loss? Some backup approaches require a longer restore and recovery time than others. You schedule regular backups. Process Flow . For example.. including backup. Can you afford to lose data at all? If not. Normally. • • You carefully test your approach before your SAP System goes live.

4 Database Backup Backup tape readability. use the command brconnect -f stats -v [Page 477]. a check on the contents of the media after the backup Database block consistency.3 Approach to Oracle DBA 3. To only verify database block consistency (that is. This option is also available in the action patterns [Extern] of the DBA Planning Calendar [Extern]. To verify table and index structures. At the least. The following graphic shows the main ways that data loss occurs: Physical errors Physical errors such as hardware failure External factors External factors such as fire or water damage Logical errors Logical errors such as a deleted table or an application error Data loss DROP MARA A good database backup strategy prevents data loss and minimizes system downtime Procedure and Escalation Plan How you react to data loss depends on how it was caused: 82 April 2004 . Be aware that a verify considerably extends backup run times. brbackup -w use_dbv [Page 375]. be sure to run a verify once in each backup cycle.1 Why Back Up the Database? Without a careful approach to backing up your Oracle database. You can back up the database and then verify both the backup media and the database using a single BRBACKUP command. run both types of verify daily. that is. that is. To verify the backed up redo log files.1. use the command brbackup -w only_dbv [Page 375].4. otherwise weekly. use the command brarchive -w|-verify [Page 390]. you run the risk of experiencing excessive system downtime and possibly losing data. a check on the database itself If possible. without a database backup). Result See the following for examples of backup approaches: • • • Backup Approach with Daily Complete Backups [Page 92] Backup Approach for Very Large Database with Partial Backups [Page 93] Backup Approach with One-Day Retention Period [Page 94] 3.

only the data of uncommitted transactions before the error is lost. • By logical errors You must recover the database up to a point in time shortly before the error occurred. you need to decide what to back up.1. 3.4. store the copies in different locations. The following graphic shows how important it is to archive the redo log files: Forward recovery A database backup is restored and you now want to recover data from offline redo log files Lost offline redo log file Lost information Point in time of the database error Intact but unusable offline redo log files Time If one offline redo log file is lost.3 Approach to Oracle DBA 3. As well as regularly backing up the database. none of the files that follow it can be used We recommend you to keep at least two copies of the offline redo log files on a secure storage medium. data entered after the error is lost. you also need to archive the redo log files.2 What Needs Backing Up? Apart from deciding whether to perform an online or offline [Page 87]. If a full recovery is possible. However. To avoid data loss after a logical error. However. For maximum security.4 Database Backup • By external factors or physical errors You must recover the database up to the point in time when the database crashed. a complete [Page 89] or incremental [Page 90] backup of your Oracle database. The following graphic summarizes the different items that you need to consider in your backup approach: April 2004 83 . this method is difficult and requires expert knowledge of the application that uses the table. it is sometimes possible to restore the database to a different machine and then export the affected table from that machine to your production database.

Performing frequent complete backups reduces the number of redo log files that must exist in order to make a complete recovery. or deleted tablespaces. even if you have a complete database backup. new. see Backup Cycles [Page 91]. • • 84 April 2004 . Instead. To enable fast. After a reorganization with data files. you can often not completely recover the database after an error. Backing Up the Complete Database • Consider the following when you decide the frequency of complete database backups: The frequency of complete database backups should depend on the degree of activity in your database. • If a redo log file is lost.4 Database Backup Physical database objects Data files BRBACKUP Online redo log files Control file Logs & profiles Offline redo log files Database backup Database backup BRRESTORE BRARCHIVE Offline redo log Offline redo log backup backup SAP data SAP data files SAP executables Other data Operating system files Database executables For more information on the tools. High database activity increases the number of redo log files written between complete backups. see: • • • • BRBACKUP BRARCHIVE BRRESTORE BRRECOVER The rest of this section discusses what you need to back up from a logical viewpoint. you can only recover up to the gap in the redo log file sequence. SAP recommends keeping several generations of complete backups and the corresponding redo log files. For more information. This reduces the data loss if one of these files is lost. always back up the affected tablespace if you want to use the BRRECOVER recovery functions. This ensures that you can still recover the database. simple recovery of the database. Follow the instructions for the tablespace backup below. even if the last complete backup is lost. changed. or new data files).3 Approach to Oracle DBA 3. which increases the time required for any necessary recovery. back up at least the changed tablespaces and the control file after every structure change (that is.

tablespace backups are not necessary. BRBACKUP supports the backup operation itself. Backing Up a Tablespace Backing up tablespaces that are changed frequently can reduce the time required for any necessary recovery. If you accept the restriction that you will only be able to recover the database from the last offline backup. Backing Up Executable Programs and Other SAP Components In addition to backing up database files and offline redo log files. we recommend you to back up the tablespace immediately. If tablespace backups are used. for example. depending on how your test system is used. However. and therefore the risk of data loss if one of the redo log files is lost. you decide what has to be backed up. See Common Features of BRBACKUP and BRARCHIVE [Page 533]. Backing Up a Test System The data of a test database might not have to be backed up as often. Backing Up the Control File Another type of partial backup is to back up the control file. but does not help you decide which tablespaces to back up. They include executable programs and profiles of the SAP System and of the Oracle database system. for operations such as tablespace extension [Page 217] or table reorganization [Page 245]. on UNIX systems in the subdirectories /usr/sap/<SAPSID>/SYS and <ORACLE_HOME>/<ORACLE_VERSION> (UNIX) or \\sapmnt\<SAPSID>\SYS and <ORACLE_HOME> (Windows). the control file is always saved along with them. If you can back up the entire database on a daily basis. you can operate the database in NOARCHIVELOG mode. tablespace extension or reorganization of a table). However.3 Approach to Oracle DBA 3. • You can use tablespace backup [Page 131] for large databases. When BRBACKUP is used to back up the database files. mirroring the control files is by no means a replacement for backing up the control file after every change in the structure of the database. this increases your dependence on the archived redo log files. you will have to reinstall the database in a recovery situation. an older control file that mirrors the corresponding structure of the database may be necessary for recovery. we recommend you to also back up the following non-database files: • Permanent Files You can find these files. Therefore. it is possible that you might forget to back up certain tablespaces. We April 2004 85 . you should back up the control file after every structure change.4 Database Backup • Use BRBACKUP to back up the database and BRARCHIVE to back up the offline redo log files. Therefore. The control file is saved before and after the operation for various administration measures with BRSPACE (for example. For this reason. Mirrored control files protect you against the loss of a single control file. The control file records the physical file structure of the database. If you do not back up the database at all. tablespace backups are no replacement for frequent backups of the complete database because: • If you only perform tablespace backups for a long period of time. When a more recent backup of an intensively used tablespace is available. fewer redo log entries have to be processed in order to recover the tablespace. If data files are damaged.

and does not cause data inconsistency. are complete block-for-block copies of the database. see Backing Up Non-Database Files and Directories [Page 360].4. You cannot recover database changes made after a logical backup. The term "backup" normally refers to a physical backup. on UNIX systems in the subdirectory /usr/sap/<SAPSID>/<INSTANCE>.3 Approach to Oracle DBA 3. Backing up non-database files using BRBACKUP is not a replacement for backing up the file system at operating system level. Oracle and SAP support the following types of database backup: • Physical backup using BRBACKUP [Page 359] Physical backups. SAP tables are usually used by multiple users or applications.4 Database Backup recommend you to back up the SAP directories after an SAP System upgrade and the Oracle directories after a database upgrade. you do not 86 April 2004 . BRBACKUP backs up non-database files as well as database files in the same run. for example. that is. not the entire database.1. • Logical backup using BRSPACE – also called export BRSPACE export uses the Oracle export and import functions to let you back up and recover specific objects – that is. Partial backupsto back up only parts of the database. SAP provides tools that can reset the references to these files in the database. Physical backups are required to recover the database to a consistent and current state. a set of database records – in the database. which we do not normally recommend. For more information. while the database is in use Complete backupsof the entire database Incremental backupsof only data that was changed since the last full backup Tablespace backups to separately back up intensively used tablespaces between complete backups – this is an adva nced function to speed up recovery. which means that it is not a good idea to make user-related backups with Export/Import. For more information. The loss of these files is not critical. However. For example. see the documentation for your operating system. • Temporary Files You can find these files. 3. when required. which is sometimes called an image backup.3 Definition Database Backup Types This section describes the different types of backup that you can make of your Oracle database. but we recommend you to back up non-database files in a separate run. logical backups are not a suitable replacement for physical database backups because you can only recover the database to the condition at the time of the backup. sometimes called image backups. You can perform the following kinds of physical backups: Online and offline backupsof the database Consistent online backups. either online or offline.

3 Approach to Oracle DBA 3. under the control of BRBACKUP [Page 359]. In this way. the users can continue to work normally.4 Database Backup want a user to restore the ATAB table in order to retrieve lost entries in a particular SAP pool table stored in ATAB. see the documentation for your operating system Online and Offline Backup Definition Online Backup You can perform an online backup with the database running – that is. the backup is no longer up-todate. the command ALTER TABLESPACE <tablespace name> END BACKUP makes sure that the header information of the files is updated.. To make the database consistent. There are also the following types of non-database backup: • • Backup of executable programs and other components of the SAP System. The management of database changes by the corresponding Oracle background processes is not affected. For more information. 1. so it is not explicitly performed. Tablespace online backups on their own are inconsistent. The starting point of the backup is set using the command ALTER TABLESPACE <tablespace name> BEGIN BACKUP. described in What Needs Backing Up? [Page 83] Operating system backup – for more information. If a user then inadvertently deletes an object. 2. the header information remains unchanged. Oracle must be informed about the starting point of a backup. RMAN normally takes care of this process internally. you have to recover the database after you restore the backup. that is. it takes care of internal block consistency during the backup. a unique restart point is defined from which the recreation of all the files of a tablespace can be performed in the event of an error. If you work with the database after the backup. April 2004 87 . In this case.. Based on this mechanism. you need to apply redo log entries from the backup period. When the next redo log file switch or checkpoint occurs (normal database operations continue). see the documentation on Transport Tools. This process works as follows: . Since these tools are not part of the database system. using the redo log files. that object can be imported from the exported backup file. the system change number (SCN). The header of the tablespace files holds information on the checkpoint and redo log files. If you use Oracle Recovery Manager (RMAN) [Page 560] for online backup. Logical backups of SAP objects can be performed using the SAP tool R3trans. you have a backup of the database that is consistent. 3. An online backup is made using operating system tools such as cpio or dd – for example. R3trans exports SAP System objects (among others) from the database into operating system files. all the files of a tablespace are copied with uniform header information specifying when the backup was started. Once the backup of the tablespace is complete. Offline Backup After an offline backup of the complete database.

Distinguish between the following. as described in this section Backup of the offline redo log files using BRARCHIVE as a separate operation – for more information.4 Database Backup You must close the database for an offline backup. the SAP System does not have to be shut down for an offline backup. Use Database recovery is simplified because the offline redo log files of the same backup can be applied. You use BRBACKUP [Page 359] for a consistent online backup. This means that the information in the buffers of the SAP System is not lost. consistent online backups cannot replace backups of the offline redo log files with BRARCHIVE. which implies better performance immediately following the database startup. If the RECONNECT mechanism is set in the SAP start profiles. However. In the same way the database can be reset to an earlier status (Whole database reset). which means that you have to stop work in the SAP System. A consistent online backup differs from an offline backup in that a recovery of the database – that is. Consistent Online Backup Definition A consistent online backup of your Oracle database is an alternative to an offline backup when you cannot close the database. see -a|-archive [Page 384]. which are completely independent: • • Backup of the offline redo log files using BRBACKUP during a consistent online backup. when an offline backup is unacceptable. We recommend consistent online backups.3 Approach to Oracle DBA 3. the connection to the SAP System is remade after the database is restarted. However. 88 April 2004 . applying the redo log files – is always necessary in order to guarantee consistent data. especially for monthly and yearly backups. An online backup has logically consistent data because the offline redo log files created during a backup are backed up with the database files on the same backup volume.

..4 Database Backup Phase 1 Backup of the database files Online redo logs 104 Database files (DBF) oraarch Database files oraarch Offline redo logs Phase 2 Backup of the offline redo log files 105 103 101 102 104 103 101 102 BRBACKUP BRBACKUP ..sap profile parameter backup_type [Page 494] = online_cons.. You can use RMAN to make incremental backups [Page 90]. DBF1 . but this backup is not cataloged. you cannot start an incremental backup without a preceding full backup. To restore the offline redo log files from the BRBACKUP backups. The syntax for a whole backup is as follows: In profile init<DBSID>. Complete backup refers to one of the following: • Whole backup Backs up all database files... use the BRRESTORE option -m|-mode [Page 402] archive_logs.. then RMAN is called separately to catalog the backup. This means that you can use this backup as a reference backup for an incremental backup with RMAN. use the BRBACKUP option -t|-type [Page 373] online_cons or the relevant init<DBSID>. To perform a consistent online backup. However. SAP backup tools are integrated with the Oracle Recovery Manager (RMAN) [Page 560]. Complete Backup Definition This section describes the different types of complete backup for the Oracle database..3 Approach to Oracle DBA 3.sap: backup_mode = all With BRBACKUP: brbackup -m all • Full backup Backs up all database files.. Restore a complete BRBACKUP backup including offline redo log files using the BRRESTORE option -m full. If you do not use RMAN. DBFn 104 105 .. The syntax for a full backup is: April 2004 89 . DBF1 .. which means that you cannot use it as a reference backup for an incremental backup with RMAN. You can perform a full backup with or without RMAN.

90 April 2004 . you must first make a full backup (level 0). saving both time and backup media. cumulative) of the database backs up all Oracle database blocks that have changed since the last full backup (level 0). BRBACKUP [Page 359] supports incremental backup with the Oracle Recovery Manager [Page 560] (RMAN). cumulative) of the database The SAP incremental backup has the advantage that it comprises a backup (level 0) of the new files that were created as a result of tablespace extensions after the last full database backup. You must always have the preceding full backup as well. this is because each block has to be checked individually to see if it needs to be backed up. A full backup of the database backs up all Oracle database blocks that have already been used to store data. You can only make incremental backups with the RMAN. that is. Example The following describes a weekly backup scenario: • • Sunday: Full backup (level 0) of the database Monday to Saturday: Incremental backup (level 1. Use To be able to make an incremental backup. Incremental backups are especially useful for regular backups of large databases [Page 124]. In an incremental backup. Incremental backups improve the performance of the database backup.sap: backup_mode = full With BRBACKUP: brbackup -m full In the context of the Recovery Manager this backup is a level-0 backup. For more information. see RMAN Backup Strategies [Page 561]. This means that you do not need to make a full backup of the entire database immediately after such extensions. An incremental backup (level 1.4 Database Backup In profile init<DBSID>.3 Approach to Oracle DBA 3. only the changes that have been made since the last full backup are saved. If you do not save as much time as expected. An incremental backup cannot be used on its own to recover the database. whether it has been changed or not. See also: backup_mode [Page 492] -m|-mode [Page 369] RMAN Backup Strategies [Page 561] Incremental Backup Definition This section describes incremental backups for the Oracle database. You can then make incremental backups.

4 Database Backup 3. Perform a full offline backup weekly (for example. You need to do this after any of the following: A data file is added A data file is moved to a different location A tablespace or its data files are reorganized April 2004 91 .4. or at least once in the cycle. To verify the process. For more information on the tapes required. Use Recommended 28-Day Backup Cycle Daily: Online backup and offline redo log backup 28-day cycle Weekly: Full offline backup and offline redo log backup and verify with DBVERIFY The guidelines are as follows: • • • • Perform a full online backup each working day. Be sure to back up the offline redo log files twice on separate tapes. you need to: Verify backups for physical errors Verify the database for logical errors at least once in the cycle • • Keep the verified full offline backup from each cycle in long-term storage. see Backup Media [Page 95]. at the weekend).3 Approach to Oracle DBA 3.4 Definition Backup Cycles This section gives you recommendations on how to plan a backup cycle for your Oracle database. Remember to perform additional backups after changes to the database structure and keep these tapes in long-term storage. replacing it with a new initialized tape in the pool.1. We recommend a backup cycle of at least 14 days. preferably 28 days. Back up the offline redo log files each working day and after every online and offline backup.

you must always back up redo information directly after the database backup. so 27 backup generations are always available. an extra unplanned backup becomes necessary. As the SAP System does not have to be available after 18:00. As the redo data is much more dynamic than the actual data. we recommend you to back up redo information twice.3 Approach to Oracle DBA 3. such as overnight.1. In this example. the online backup is worthless. This approach is secure and is suitable for small to mediumsized databases. or a tape fails. 52+x tapes are needed. even more reserve tapes are required. In this example.4 Database Backup 3. and daily backups are possible. Particularly in the case of an online backup. the size of the database is less than 200 GB. Alternatively. Backup Approach with Daily Complete Backups and 28-Day Retention Period Number of tapes for database data Tape re-use possible locked: retention period = 28 days Key: free locked total: (56+x) tapes 2 1 S M T W T F S S M T W T F S S M T W T F S S M T W T F S S days Number of tapes for redo logs Tape re-use possible locked: retention period = 28 days 3 2 1 S M T W T F S S M T W T F S S M T W T F S S M T W T F S S days total: (52+x) tapes To be able to deal with a faulty backup. several generations of backups must be available. where x is the number of reserve tapes for redo data. The redo information generated during the day – buffered on a separate disk that is as large as possible – is also backed up every day using a separate tape pool. the backup can be performed online at a time when the transaction load is low. 56 + x tapes are required for data backup. a full backup of the data (without redo information) fits onto two tapes. the backup can be performed offline. For this example. so 92 April 2004 . the retention period is set to 28 days. In this case. The additional x tapes – approximately 20% of the required number – function as a reserve in case the amount of data to be backed up greatly increases. As this data is necessary to recover a database after restoring a data backup.5 Backup Approach with Daily Complete Backups This section describes a sample backup approach for your Oracle database using daily complete backups [Page 89]. The tape pool must also contain several reserve tapes. Without backups of the redo logs. the retention period for the tapes must be no less than the retention period for the actual data backup. For security reasons. If DLT drives are used.4.

Backup Approach for a Very Large Database with Partial Backups A and B Key: Number of tapes for database data 8 Tape re-use possible locked: retention period = 10 days A + 4 free locked total: (40+x) tapes B A B A B A B A B days So Number of tapes for redo logs 3 2 1 Mo Tu We Th Fr Sa So Mo Tu We Tape re-use possible locked: retention period = 10 days total: (19+x) tapes days So Mo Tu We Th Fr Sa So Mo Tu We April 2004 93 .1.4.4 Database Backup the total number of tapes required is 2 x (52 + x). It runs during the night.6 Backup Approach for Very Large Database with Partial Backups This section describes a sample backup approach for a very large Oracle database using daily partial backups. The actual number of tapes depends on the hardware implemented and the tape capacity available: Capacity and Performance of Tapes and Tape Devices Tape or Tape Device IBM 3590/Magstar DLT 7000 DAT (DDS-3) DST 310/312 See also: Backup Approach for Very Large Database with Partial Backups [Page 93] Backup Approach with One-Day Retention Period [Page 94] Capacity (GB) 20 – 40 35 – 70 10 – 20 50 Approximate Rate (GB/hour) 10 – 15 15 – 20 2–4 30 – 50 3. In this example. as this is the only time when a low transaction load can be expected. Therefore.3 Approach to Oracle DBA 3. the database is too large for a complete daily offline or online backup and has to be available 24 hours a day on five working days. the backup is spread over two days (part A and part B) and performed online.

you need 2 x (19 + x) tapes for redo information. an additional complete offline backup is performed at the weekend. If it cannot be read. The risk of losing data is even higher. It is possible with brarchive -cds [Page 389] to automatically create two copies of backup data using a single set of tapes. where x is the number of reserve tapes. For security reasons. so the two tapes required are overwritten each day. the database is destroyed. a complete backup is performed offline once a day.1. It is essential to back up the redo data twice.4 Database Backup This strategy is more error-prone than the first example [Page 92]. the single backup has to be used. if a disk failure affects data and redo information. As the redo information has not been saved separately. The number of tapes required for the data backup is 40+x. only four generations of backups are available. In this example. Therefore.7 Backup Approach with One-Day Retention Period This section describes a sample backup approach for your Oracle database using daily full backups but with a retention period of only one day. Do not follow the example shown in this section. Faulty Backup Approach 94 April 2004 . See also: Backup Approach with Daily Complete Backups [Page 92] Backup Approach with One-Day Retention Period [Page 94] 3. because online backups are only consistent in combination with redo information.3 Approach to Oracle DBA 3. However. It is included to illustrate a faulty backup approach.4. In the event of a disk error. all transactions executed since the last backup are lost. because the database administrator is responsible for the correct distribution of the data to the partial backups. A and B. as the online backups are worthless without them. where x is the number of reserve tapes. the retention period is set to 1 day. The redo log files are even more important than in the first example. If this strategy is used with a retention period of seven days.

Backup tapes can be reused at the end of a backup cycle (that is. normally after 28 days).4 Database Backup Number of tapes for database data 4 Key: free locked Tapes only locked briefly because retention period = 1 day Danger: possible loss of all data Tapes re-used each day total: 2 tapes 2 Sa Number of tapes for redo logs 2 1 So Mo Tu We Th Fr Sa So Mo Tu days No backup of redo information Danger: possible loss of daily transactions Sa So Mo Tu We Th Fr Sa So Mo Tu days See also: Backup Approach with Daily Complete Backups [Page 92] Backup Approach for Very Large Database with Partial Backups [Page 93] 3. The following graphic shows the factors you need to consider when making up a tape pool: April 2004 95 .3 Approach to Oracle DBA 3. Of course. for example after a new data file. We recommend having 20% more tapes than required to cover database growth and additional backups.2 Definition Backup Media You require a pool of tapes for database and offline redo log file backups to back up your Oracle database. you can also back up the database to disk if you have enough storage space available and later copy it to tape.4. Ensure that enough tapes are provided in each tape pool to cover the entire backup cycle.

For more information on data compression.4. Initialized volumes have an SAP-specific tape label [Page 99]. Activities 96 April 2004 . For more information. see: • • Software Compression [Page 107] Hardware Compression [Page 106] Integration If you use an external backup tool.2. and the network is stable. Only back up a production database to a remote host if the database is not too large. The backup volumes must be managed to make sure that they are protected from premature deletion. 3. see Volume Management [Page 96]. These tools never use the space remaining on the tapes after a backup has finished. You might want to back up the test database to backup devices that are connected to the host on which the production database is running.1 Use Volume Management The tape volumes for the Oracle database are overwritten again at each backup or archive by BRBACKUP or BRARCHIVE. see Used Volumes [Page 102]. see Volume Expiration Period [Page 100]. New tapes have to be inserted each time you make a backup. For more information. You should be able to back up a test database to a remote host without any major problems. BRBACKUP or BRARCHIVE can only use volumes that are correctly initialized [Page 97].3 Approach to Oracle DBA 3. For more information on how to manage the tape volumes. ensuring that you have access to the required volumes at all times. see External Backup Programs [Page 154].4 Database Backup Number of parallel backup devices Database size Tape pools Length of backup cycle ? BRBACKUP + 20% Reserve BRARCHIVE Frequency of backups Number and size of redo log files in a backup cycle Backup media are normally locally connected to the database server. For more information on the contents of a volume that has been written by BRBACKUP or BRARCHIVE. BRBACKUP [Page 359] calls BACKINT to manage backup media.

or locked tapes: brbackup -i force or brarchive -i force Rename non-locked tapes: brbackup -i -v <tape name> or brarchive -i -v <tape name> Features Several devices can be used for initializing volumes.tape. non-SAP tapes. The volumes of all the available backup devices can be changed at the same time. This label file is read when the volume is checked. If the label file does not exist... the check fails and the volume is rejected.hdr0 Initialize new tapes.sap profile in parameters tape_address and tape_address_rew (or in tape_address_arch and tape_address_rew_arch) are used serially during a volume initialization.hdr0 – to the volume concerned. For more information.4 Database Backup You can choose volumes as follows: • • • Select volumes manually [Page 103] Select volumes using external tools [Page 104] Select volumes automatically [Page 105] Volume Initialization Use You need to initialize the tape volumes for Oracle database backup with SAP tools..3 Approach to Oracle DBA 3.<SID>B02.sap contains the tape names: .. BRBACKUP or BRARCHIVE writes an SAP-specific label – that is.tape. The information in the label is overwritten and the entire tape contents lost if you write to a BRBACKUP or BRARCHIVE volume directly using other tools. volume_archive = (<SID>A01.. see the parameters tape_address [Page 522] and tape_address_rew [Page 524]. The following graphic summarizes volume initialization: Profile init<SID>.. a file with the name ..<SID>A02. Write the label to the tape that also contains the tape name .. The backup devices defined in the init<DBSID>. . Activities April 2004 97 . volume_backup = (<SID>B01.

You enter the following options during an initialization: -i|-initialize Renames volumes that have already been initialized. not repeatedly before every backup. If you initialize BRBACKUP or BRARCHIVE tapes with the addition force. Initialization of 5 volumes with the first 5 volume names specified in volume_backup/volume_archive: 98 April 2004 . Only initialize the volumes once. If you want to use automatic tape management [Page 105]. to change the name of a volume. 2. -n|-number Specified number of volumes for initialization. 1. the expiration period of the volume is checked. . which you should never do. the tape_use_count stored in the tape label is set to 1. You cannot change volume names during a backup. The expiration period check is not active. However. Otherwise this value is increased accordingly.4 Database Backup You only have to initialize the following: • • New tapes Tapes that have never been used before by BRBACKUP or BRARCHIVE. you have to reinitialize it. New and non-BRBACKUP or BRARCHIVE volumes must always be initialized with the additional specification force. Mount a volume and enter the following command: brbackup|brarchive -i [force] The volumes are initialized in sequence with the names specified in the parameters volume_backup/volume_archive. Locked volumes or volumes without labels are rejected.. -v|-volume Enters the names of volumes for initialization. Volumes that are not locked are renamed.3 Approach to Oracle DBA 3.sap parameters volume_backup [Page 528] or volume_archive [Page 528]. the volume names must be listed in the init<DBSID>. The following examples show how you can use the above options: Initialization of volumes with the volume names specified in volume_backup/volume_archive: Use the BRBACKUP or BRARCHIVE option -i [force]. Only possible for volumes with an expired expiration period. You initialize all tape volumes to be used by BRBACKUP or BRARCHIVE for the first time. -i|-initialize force Initializes new volumes or volumes not yet used by BRBACKUP or BRARCHIVE. If you initialize a volume without this additional specification. We recommend you to write paper labels on the volumes so that you can identify them more easily.. Important: This option can also be used to reinitialize locked volumes.

.. Before BRBACKUP or BRARCHIVE writes to a volume. The following graphic shows the volume label and check: Volume name Database name Timestamp of last backup Number of backups performed Database instance name (ORACLE_SID) BRBACKUP or BRARCHIVE action ID (coded timestamp of BRBACKUP or BRARCHIVE log names) BRBACKUP or BRARCHIVE function ID (extension of the detail log file name of BRBACKUP or BRARCHIVE) Profile init<SID>.. The label file is called ..tape. All the volumes for initialization must be mounted in the backup device in the correct order. BRBACKUP or BRARCHIVE performs the following volume label checks: .hdr0. it first checks the volume label.. = 28 = 100 Activities You can display the contents of a volume label as follows: brbackup|brarchive -i show -n 1 The volume label is always the first file on a volume. Volume Label Check Use You must first initialize [Page 97] tape volumes before you can use them to back up your Oracle database with BRBACKUP or BRARCHIVE. This file has a format specific to BRBACKUP or BRARCHIVE and is written to the volume using cpio.3 Approach to Oracle DBA 3. expir_period tape_use_count . 1.. you have to either initialize the volume or mount another volume. it reads the volume label file.4 Database Backup brbackup|brarchive -i [force] -n 5 Initialization of volumes with a specific name: brbackup|brarchive -i [force] -v <name1>[.<name2>]. When BRBACKUP or BRARCHIVE writes to a volume.. April 2004 99 .sap: Volume label contents Volume checks by BRBACKUP or BRARCHIVE Volume name Expiration period Use count Error Warning . If this file does not exist..

tape device. and the function ID match the current values. that is. If a scratch volume [Page 103] was requested. Volume Expiration Period Use The volume expiration period for backups of the Oracle database is defined by the init<DBSID>. if you use a volume on Monday 1st July. In extreme cases. This means that the backup volumes are 100 April 2004 . you can reuse the volume for a backup. Volume use count A warning message (message BR0235W) is issued if the volume has been overwritten more frequently than specified in the init<DBSID>. expir_period = 28 means that writing to a volume is possible 28 days after the volume was mounted and used. the action ID. The expiration period always expires at midnight (that is. you cannot use it for another backup until Monday 29th July. the volume label is checked once more. this means that the volume is not locked. not the value of the parameter during the backup. SAP recommends an expiration period of at least 28 days (the default value is 30 days). This specifies the period in days during which a volume is locked. When the period expires. or hardware errors that would prevent a successful backup. After a backup or archive to a volume is completed.sap parameter tape_use_count [Page 527].3 Approach to Oracle DBA 3. driver. several sequential backups might be unusable if these errors are not recognized. 24:00 using the 24-hour clock) of the last day of the lock. Therefore. The program checks whether the name of the database instance.sap parameter expir_period [Page 503]. The volumes can be overwritten on the same day. If you set an expiration period of 0 days. but would not cause an error message to be issued. Expiration period An error message (message number BR0217E) is issued if the configured expiration period – number of the days specified in the init<DBSID>. The start time of BRBACKUP or BRARCHIVE determines the first day of the lock for all volumes used for a backup. 2. This is to detect volume. cannot be used.4 Database Backup The following volume label information is checked: Volume name An error message (message number BR0216E) is issued if you have mounted a volume with an incorrect name. The time when the volume was initialized does not matter. do not set expir_period to 0.sap parameter expir_period [Page 503] that must have passed before the volume can be used again – has not ended yet. you can mount any volume. For example. Features The current value of expir_period is decisive for whether or not a volume is locked.

Temporarily set the init<DBSID>. This generation date is determined when the volume label is written (when a backup on this volume was started). you can switch off automatic volume management temporarily by mounting the volume on the backup device and entering the following command: brbackup|brarchive -v SCRATCH For more information. Reset the expir_period parameter to its previous value. Start BRBACKUP or BRARCHIVE. as follows: . as follows: brbackup|brarchive -i -v <volume name> c. where n is the current value of expir_period. • Logical lock The internal information in the BRARCHIVE or BRBACKUP logs is decisive for a logical lock.3 Approach to Oracle DBA 3. If you still want to use this volume before the logical lock has expired. The volume can be reinitialized (with the same name) in order to cancel the physical lock. • Unlocking a logically locked volume A volume was reinitialized before the expiration period ended (for example. However. b. You can unlock volumes as follows: • Unlocking a physically locked volume During a backup.. Under certain circumstances. This means that the volume is locked physically but not logically. When performing this operation. with the option -i force). Volumes can be locked physically and logically: • Physical lock The volume generation date specified on the volume label is decisive for a physical lock. the volume label was written to the volume but the backup was terminated before the first database file could be written to the volume. the value of the current date is less than the total of the volume generation date stored in the volume label and the value of expir_period. see: • brbackup -i [Page 368] April 2004 101 . to circumvent the physical lock. it is not selected by the automatic volume management system because it is still locked logically. the value of the current date is less than the total of the volume generation date stored in the BRBACKUP or BRARCHIVE logs and the value of expir_period. The logs are updated when a database file has been backed up successfully.4 Database Backup locked for n days after the last backup operation. If the value of expir_period is changed. the expiration period for all volumes is automatically changed. as this causes the volume use count stored in the volume label to be lost. A volume is locked logically when the automatic volume management system checks the volume and finds that the expiration period stored internally has not ended yet. A volume is locked physically when the system checks the volume label and finds that the expiration period for the volume has not ended yet. for example. that is. do not use the -i force option. a. This means that the volume is no longer locked physically. It is selected from the list by the automatic volume management system – with volume_backup [Page 528] or volume_archive [Page 528] – but is rejected when the physical volume label check takes place. discrepancies may occur between the physical and logical locks..sap parameter expir_period to 0.

sap Offline redo log 1 Offline Detail space.hdr0 init<sid>. Database files (data files.3 Approach to Oracle DBA 3.sap DB file 1 DB file n space. Structure After successfully backing up the Oracle database with BRBACKUP and BRARCHIVE. non-database files) space_log: BRSPACE summary log det_log: Detail log written by BRBACKUP or BRARCHIVE (second-to-last position) sum_log: Summary log written by BRBACKUP or BRARCHIVE (last position) Tape Layout for BRBACKUP and BRARCHIVE BRBACKUP: .4 Database Backup • • • brbackup -v [Page 374] brarchive -i [Page 387] brarchive -v [Page 390] Used Volumes Definition This section describes the tape volumes written by BRBACKUP or BRARCHIVE when you back up your Oracle database or back up the offline redo log files. offline redo log files.hdr0 (position 1) init_ora: Initialization file init<DBSID>. created for each backup Summary log.ora init<sid>. the volumes produced contain the following files: • • • • • • • Label: tape. extended during each backup 102 April 2004 .tape.ora (position 2) init_sap: Initialization file init<DBSID>.log Detail log Summary log BRARCHIVE: .tape.ora init<sid>.sap or the profile file defined under -p|profile [Page 371] (position 3).hdr0 init<sid>.log redo log n log Summary log Information about used volumes is contained in the BRBACKUP and BRARCHIVE logs: • File system logs Detail log.

Such a volume is always accepted. For more information.4 Database Backup • Database logs Table SDBAH with information about backup runs Table SDBAD with information about backup files Use These log files should only contain information that was written by BRBACKUP or BRARCHIVE. Prerequisites • • Make sure that initialized volumes are available for the backup. Do not change this information manually. Selecting Volumes Manually Use You can select the volumes for an Oracle database backup manually. using brbackup -i -v SCRATCH . BRARCHIVE uses the summary file system log. this situation might occur when a scratch tape is requested and a tape named SCRATCH is mounted. Procedure April 2004 103 .3 Approach to Oracle DBA 3. You can do this if the BRBACKUP or BRARCHIVE automatic volume management [Page 105] is deactivated by using the reserved volume name SCRATCH. for example. Determine whether the required expiration period has been configured in profile parameter expir_period [Page 503] and change the value when necessary. when an additional tape is requested unexpectedly during a backup operation. For automatic volume management [Page 105]. even when a volume with another name is requested. For more information. A backup on a tape named SCRATCH should never exist. see Scratch Volume [Page 103]. see Logs for BR*Tools [Page 529]. It does not mean that you have to mount a volume with the name SCRATCH . BRARCHIVE cannot rely on the database logs because it also runs when the database has been shut down. BRBACKUP uses the corresponding database log to select available volumes. In this case the tape mounted is assigned the name of the requested tape. Scratch Volume Definition When BRBACKUP or BRARCHIVE requests a scratch volume for backup. However. for example. The information in database tables SDBAH and SDBAD is evaluated by the Computing Center Management System (CCMS). for example. this means that you can use any volume for which the expiration period has ended. However. Use You can also initialize a volume with the name SCRATCH explicitly. and only allows you to use volumes for which the expiration period has ended. Only use this option in exceptional cases. The program still makes sure that the expiration period has expired. BRBACKUP or BRARCHIVE still checks the expiration period of the volume.

Determine whether the required expiration period has been configured in profile parameter expir_period [Page 503].4 Database Backup You can start the backup with BRBACKUP or BRARCHIVE in one of the following ways: • .3 Approach to Oracle DBA 3. This might involve an external volume management system or simply a shell script. Prerequisites The external tool that you use for volume selection must make sure that only non-locked volumes are suggested for backup. You can do this if you have deactivated BRBACKUP or BRARCHIVE automatic volume management [Page 105] by calling them with the option -v. the expiration period of the volumes is checked anyway. Result BRBACKUP and BRARCHIVE request the number of scratch volumes needed for the backup (message BR0104I). expired volumes with any name. • . BRBACKUP or BRARCHIVE only use the volumes listed with option -v for one backup.sap: volume_backup = SCRATCH volume_archive = SCRATCH For more information.. Using the profile init<DBSID>. 1. If you use scratch volumes.sap a. Any expired BRBACKUP or BRARCHIVE volumes are accepted. Otherwise. Start BRBACKUP or BRARCHIVE with the option -v SCRATCH. b.. Enter one of the following parameter values in profile init<DBSID>.. BRBACKUP or BRARCHIVE terminate if they do not find enough free volumes. The volume names in the labels are not changed by the backup operation. BRBACKUP or BRARCHIVE checks whether the mounted volumes agree with those in the volume list and whether the expiration period has expired. Change the value if necessary. it might make sense to include the weekdays or days of the month in the volume names. Selecting Volumes with External Tools Use You can also use external tools to determine the names of the volumes relevant for the Oracle backup. 104 April 2004 . Start BRBACKUP or BRARCHIVE with the option -v <volume list>. 2. Before starting the backup. However.. Start BRBACKUP or BRARCHIVE. Leave the profile unchanged (a volume pool can be defined). Make sure that initialized volumes are available for the backup.. Procedure . see volume_backup [Page 528] and volume_archive [Page 528]. See Volume Expiration Period [Page 100]. b.. This helps to make the names more meaningful. Using the option -v SCRATCH a.

C11B143 brarchive -ssd -v C11A141.C11B142.C11B${day}3 -c brarchive -ssd -v C11A${day}1. The name of the mounted volume is compared to the name found in the volume pool. BRBACKUP finds tape names + Volume label check active = Only accepts volume with requested names and with expired lock period BRBACKUP BRARCHIVE Tables SDBAH and SDBAD C11B01 C11A01 Prerequisites April 2004 105 . In addition. One option would be to include the day of the backup in the volume names. for example.C11A142 You can also give the volumes other names. then day=`echo 0${day}`. X = A for BRARCHIVE or X = B for BRBACKUP dd = day of month n = next volume number within one backup. Here is the script: day=`date | cut -f 3 -d " "` if [ ${day} -le 9 ].C11A${day}2 -c Selecting Volumes Automatically Use BRBACKUP or BRARCHIVE automatically selects the volumes that are recommended for the next backup. as suggested for automatic volume management). brbackup -v C11B141. the procedure ensures that current backups are not overwritten.4 Database Backup You can select the volume names yourself by defining them in the call with the option v|-volume (using the naming convention. The name <DBSID><X><dd><n> is made up of: DBSID = ORACLE_SID (name of the database instance).3 Approach to Oracle DBA 3. BRBACKUP or BRARCHIVE can use the following sample script to assign the volume names to the day of the month on which the backup was started.C11B${day}2. fi brbackup -v C11B${day}1. Automatic Volume Management 28-day cycle Volume management active.

SAP recommends that you include the name of the database instance and a sequential number in the tape name. do not use weekdays or days of the month in the volume names. Mount the requested volumes. 3. In particular.3 Approach to Oracle DBA 3.. for example <DBSID>A<nn> for BRARCHIVE tapes. You can display the names of the volumes required for the next run as follows: brbackup -q brarchive -q 6. Initialize [Page 97] new volumes when necessary. All the volumes defined there should physically exist. Tape units with hardware compression are now industry-standard. 1. enter the corresponding volume names in profile parameter volume_backup or volume_archive. Only volumes that are not locked are selected from the pool of available volumes. see -q|-query [Page 371]. To do this. This reduces backup time because more data can be written to a single volume. <DBSID>B<nn> for BRBACKUP tape volumes. For more information. If you want to select the volumes manually [Page 103] you can deactivate automatic tape management. 5. 3. BRBACKUP and BRARCHIVE attempt to write to all the available volumes in the pool in sequence. You can check whether you have mounted the correct volume in the backup device with: brbackup -q check brarchive -q check These commands do not actually start the backup. Define a pool of the volumes available for the backup. The compression method used is normally based on the Lempel-Ziv algorithm. Features The amount of data that can actually be written to a tape depends on the compression rate. A few operating systems also support hardware compression for disk. you can use these options before scheduling a backup with CRON or a similar tool. see Scratch Volume [Page 103]. 4. Start the backup with BRBACKUP or BRARCHIVE. The average compression rate is between 3 and 5. set the init<DBSID>. You can also use software compression [Page 107]. 2. because BRBACKUP or BRARCHIVE does not check whether or not a holiday fell in the period since the last backup.3 Use Hardware Compression When backing up your Oracle database to tape.4 Database Backup When you use automatic volume management..sap parameters volume_backup [Page 528] and volume_archive [Page 528] to SCRATCH or call BRBACKUP or BRARCHIVE with the option -v SCRATCH. Determine whether the required expiration period [Page 100] has been configured in profile parameter expir_period [Page 503]. Change the value when necessary. Procedure . always use hardware compression if your tape devices support it. During the next runs. but this can vary as follows: 106 April 2004 .4. For more information. To do this.

4 Software Compression April 2004 107 . You can also run multiple compressions in parallel. you set the init<DBSID>. a lower-case c can be important). To do this. after a year).3 Approach to Oracle DBA 3. you can reduce the amount of data by compressing database files individually. you must compress the affected tablespaces again. or excluding them from compression. Activities For hardware compression. you can consider the compression rate to be constant. Be sure to enter the correct address for tape devices with hardware compression in the parameters tape_address and tape_address_rew (for example.4. The compression rate does not improve if the files are compressed again. without starting a backup). You can exclude these files from regular compression since the compression rate stays constant. After a large data transfer or a reorganization of a tablespace. Repeat this at least once a month to update the compression rates. To reduce compression time for large databases. Example • • Device type: backup_dev_type = tape|pipe|tape_auto|pipe_auto|tape_box|pipe_box Addresses for the tape device: tape_address = (/dev/rmt/0hnc) tape_address_rew = (/dev/rmt/0hc) • • Compression parameters: compress = hardware Tape size: tape_size = 16G See also: backup_dev_type [Page 490] tape_address [Page 522] tape_address_rew [Page 524] compress [Page 498] tape_size [Page 526] 3. the above is not relevant and you do not need to do it. use brbackup -k only [Page 368] to approximate compression rates.sap parameter compress to hardware. BRBACKUP can optimize a backup on tape units with hardware compression if the current compression rates are known before starting the backup. It is higher if new or relatively empty database files are compressed. You can use parallel compressions to determine the compression rates (that is. You only need check the compression rate again after a longer period (for example. If you are using the BACKINT interface to an external backup tool.4 Database Backup • • It is lower if the data is mostly already compressed. If a database file has no essential changes in two consecutive compression runs.

assuming that the number of parallel copy processes was not reduced by changing the exec_parallel [Page 502] parameter.4 Database Backup Use When backing up your Oracle database to tape or disk. using software compression significantly reduces the network load. For more information. backup not on disk). you can use software compression. For successful compression. This means that unattended backup of large databases is possible even if you do not have a tape device with hardware compression or want to perform remote backups.3 Approach to Oracle DBA 3. The sizes are evaluated by reading the compressed files directly (using redirection). make sure that the compression directory has at least as much free space as the largest database file needs before the compression. If several tapes are required for a backup with software compression or for a remote backup. no disk space is required in the compression directory. When BRBACKUP is started for the first time. compression rates are not available. see Logs for BR*Tools [Page 529]. Using hardware and software compression at the same time does not improve compression rates. Example • • Device type: backup_dev_type = tape|pipe|tape_auto|pipe_auto|tape_box|pipe_box Tape device addresses: 108 April 2004 . • Advantages If you make remote backups over a network. BRBACKUP uses the compression rates to determine the space required in the compression directory. The calculated compression rates are stored in a detail log and in the database table SDBAD. the redirection character ">" must be used in the parameter compress_cmd (as set already by default). If you specify compress = only (determine the compression rates). As a prerequisite for this. • Disadvantages High CPU utilization Lengthy backups due to compression process Features Software Compression and Remote Backup to Parallel Tape Devices You can use multiple tape devices when you use software compression or make a remote backup to a remote host. The free space must be at least as large as the largest compressed file. Size of the Compression Directory When software compression is used (compress = yes. Use software compression only if you have no tape devices with hardware compression [Page 106]. The tape devices must be defined in parameters tape_address [Page 522] and tape_address_rew [Page 524]. the existing tape devices are used in parallel. In this case BRBACKUP uses internal default values that are usually smaller than the actual compression rates.

/backup/dir2) Compression parameters: compress = no|yes April 2004 109 .4.5 • • • • • • • • Backup Methods This section describes special methods to perform backup of database files and offline redo log files for the Oracle database: Backup to Multiple Disks [Page 109] Backup to a Remote Disk [Page 110] Backup to a Remote Tape Device [Page 112] Two-Phase Backup [Page 113] Structure-Retaining Database Copy [Page 115] Parallel Backup [Page 117] Unattended Backup [Page 118] BRBACKUP and BRARCHIVE Backups in One Run [Page 120] 3.3 Approach to Oracle DBA 3.4 Database Backup tape_address = (/dev/rmt/0mn) tape_address_rew = (/dev/rmt/0m) • • Compression parameters: compress = yes Tape size: tape_size = 18G See also: backup_dev_type [Page 490] tape_address [Page 522] tape_address_rew [Page 524] compress [Page 498] tape_size [Page 526] 3.5.4. you use the init<DBSID>. This is an example of the entries required in the init<DBSID>. To do this.sap profile parameter backup_root_dir to specify the directories on the different disks where you want to save your database files.sap [Page 488] initialization profile for parallel backup: • • • Device type: backup_dev_type = disk Backup directories: backup_root_dir = (/backup/dir1.1 Use Backup to Multiple Disks You can use BRBACKUP [Page 359] for Oracle backup to multiple disks if the space available on one disk or logical volume is not sufficient.

if the backup is across the network. You can change this setting with the init<DBSID>. • No password is needed if you use the RCP command for the remote disk backup.sap parameter exec_parallel [Page 502] or the command option -e|-execute [Page 367]. A prerequisite for a successful RCP call is. all the hard disks specified in backup_root_dir [Page 493] are written to. Prerequisites • • The target directories for the backup defined in the parameter stage_root_dir [Page 518]and archive_stage_dir [Page 490] must exist on the remote host.3 Approach to Oracle DBA 3. We only recommend remote backup when your network is very fast and stable.4 Database Backup BRBACKUP normally uses all the directories specified in backup_root_dir in parallel to back up the database files. If you use FTP as the transmission program. except if the number of files you want to back up is smaller than the number of disks. which is located in the HOME directory of the remote user on the remote host: <host_name> <user_name> For more information. for example. a password is needed for the remote host. Since BRBACKUP attempts to optimize the speed of the backup. we do not recommend this procedure for production systems in most cases. The NFS protocol is relatively insecure. • remote_user = "<user_name> <password>" Let BRBACKUP use the password of the database user. See also: backup_dev_type [Page 490] compress [Page 498] 3. or as part of an incremental backup using the Oracle Recovery Manager (RMAN) [Page 560]. Make sure that the password of the operating system user is the same. Features Remote Disk Backup with BRBACKUP A remote disk backup removes the need for a Network File System (NFS) disk mount. the following entry in the . see your operating system documentation. you can use it to back up test systems. The name of the remote host and the relevant user must be specified in the initialization profile with the parameters remote_host [Page 509] and remote_user [Page 509]. Do one of the following for this: Specify the password in the remote_user [Page 509]parameter. which means that the 110 April 2004 . which happens if you do not explicitly specify a password in the remote_user parameter.4.rhosts file.2 Use Backup to a Remote Disk You can perform an Oracle backup to a remote disk directly with BRBACKUP [Page 359] or BRARCHIVE [Page 382]. However. The number of copy processes corresponds to the number of disks. Therefore.5.

You need to meet the prerequisites above and make the following entries in the initialization profile init<DBSID>. . April 2004 111 . A remote backup to disk is particularly useful with the standby database [Page 133] and hierarchical storage management systems.3 Approach to Oracle DBA 3. Incremental Remote Backup with RMAN You can use RMAN [Page 560] to perform an incremental disk backup on a remote host. In contrast. You need to meet the prerequisites above and make the following entries in the initialization profile init<DBSID>. which means that you do not have to verify the backup.sap [Page 488]: backup_dev_type = stage backup_mode = incr You must have the SAP backup library installed on your system.sap [Page 488]: backup_dev_type = stage|stage_copy|stage_standby stage_copy_cmd = rcp|ftp Oracle database BRBACKUP BRARCHIVE BRRESTORE rcp/ sapftp . FTP is always used automatically as the transmission program for incremental backup to remote disk. RCP and FTP are relatively secure ways of transferring data over the network.4 Database Backup backup must be verified. .

However. we do not recommend this procedure for production systems in most cases. Prerequisites • Make sure that no additional messages (that is. you can perform the backup on an AIX host. For example. if the database runs on an HP-UX host. RMAN Oracle server process SAP backup library sapftp .: only one line with the output of the date command should be displayed.3 Approach to Oracle DBA 3.5.login or . . Therefore. . We only recommend remote backup when your network is very fast and stable. from .4. You can use several tape devices on the remote host for backup and these are used in parallel. . 112 April 2004 .4 Database Backup BRBACKUP / BRRESTORE Oracle database . See also: RMAN Backup with the SAP Backup Library [Page 565] Profile Parameters and BRBACKUP Command Options [Page 378] 3. you can use it to back up test systems. Backup to a remote tape device is not supported for remote hosts running a Windows operating system. Test the command remsh|rsh <host_name> date. The UNIX versions of the local and remote hosts need not be identical.cshrc). .3 Use Backup to a Remote Tape Device With BRBACKUP [Page 359] and BRARCHIVE [Page 382] you can back up files of the Oracle database to a remote tape device that is connected to a UNIX host in the network. not belonging to command output) are issued on remote login (for example.

You define the dd command in the profile init<DBSID>. This backup strategy enables you to easily make a disk backup.” You define the remote host with the init<DBSID>. and so on. On the remote host the files are written to tape using the UNIX dd command. in this case. If a restore from tape is required.sap parameter remote_host [Page 509] and the user with the remote_user [Page 509] parameter. See also: Backup to a Remote Disk [Page 110] 3. called a “pipe.4. You can not use the BACKINT interface to copy backups from raw devices or compressed disk files to tape. You can change this setting with the init<DBSID>.sap. backup programs. For a recovery. you have full responsibility for the complete and correct execution of this phase. In this case.rhosts file. as in the following example: copy_in_cmd = "dd bs=64k if=$" copy_out_cmd = "dd bs=64k of=$" The number of parallel copy processes normally corresponds to the number of backup devices available.5. BRRECOVER can. You can also perform the second phase of the two-phase backup with external tools – that is.4 Use Two-Phase Backup As an alternative to a direct Oracle backup to tape you can perform a two-phase backup with full support from BRBACKUP [Page 359] or BRARCHIVE [Page 382].4 Database Backup • For a successful remote shell call. Activities The individual database files are transferred to the remote host using a remote shell call. operating system tools. check that there is an entry as follows in the . the files are directly copied to the original directories by BRRESTORE [Page 395]. access the disk backup directly.sap parameter exec_parallel [Page 502] or the command option -e|-execute [Page 367]. as well as having several copies of this and previous backups available. which is located in the HOME directory of the remote operating system user on the remote host: <local_host_name> <local_user_name> where: <local_host_name> is the host where the database runs <local_user_name> is the operating system user who starts the backup For more information. Features April 2004 113 .3 Approach to Oracle DBA 3. If you use raw devices or compressed disk files. you must save them directly to tape with BRBACKUP or operating system tools. see your operating system documentation.

Volume management and all other automatic actions of BRBRACKUP can be fully used in the second phase. When restoring from tape. disk storage and storage tapes) must be fulfilled. • • • The backup type – that is. In the case of a recovery the restore phase is shortened.3 Approach to Oracle DBA 3. offline or online [Page 87] – and the extent of the backup [Page 83] – that is. For more information. complete or partial – must be identical 114 April 2004 . Additional disk storage space is required. compared to a direct tape backup. Features of Two-Phase Database Backup with BRBACKUP Advantages Disadvantages • • The first phase can be much shorter than a direct backup to tape.4 Database Backup Two-Phase Database Backup with BRBACKUP • • • Phase 1 BRBACKUP backup to disk Phase 2 BRBACKUP backup from disk to tape Restore phase BRESTORE restore from tape directly to the original directories or BRRESTORE from the disk to the original directories Phase 1 Phase 2 Restore Database files Database files Database files back_dir1 back_dir2 BRBACKUP -d disk BRBACKUP -b -d tape BRRESTORE -b -d tape back_dir1 back_dir2 To back up to tape (phase 2). see -b|-backup [Page 364]. if the backup is directly available on disk. You must start BRBACKUP twice for a two-phase backup. • The hardware requirements (that is. start BRBACKUP with the relevant command option. BBRESTORE can write the backed up files directly to the original directories.

Two-Phase Backup of Offline Redo Log Files with BRARCHIVE Two-phase backup of the offline redo log files using BRARCHIVE runs analog to the BRBACKUP backup.4 Database Backup in the first and second phases. The volume management of BRARCHIVE can be fully used in the second phase of the backup. Additional storage space and storage tapes are required. When restoring from tape. start BRARCHIVE with the appropriate command option. You can use this type of database copy to: April 2004 115 . you can only make a maximum of two copies to tape. regardless of the way in which the offline redo log files are backed up: directly to tape or with a disk backup. see a|-archive [Extern]. In this case BRRECOVER uses the offline redo log files directly from the disk. For more information. in addition to a disk backup. In a recovery. Features of Two-Phase Backup of Offline Redo Log Files with BRARCHIVE Advantages Disadvantages • The first phase can be much shorter than direct backup to tape. There is no restore. • • • Phase 1 BRARCHIVE backup to disk Phase 2 BRARCHIVE backup from disk to tape Restore phase BRRESTORE restore from tape directly into the original directories or direct applying of offline redo log files in a BRRECOVER recovery from disk (no restore).5 Use Structure-Retaining Database Copy With BRBACKUP you can make a copy of the Oracle database files with exactly the same directory structure. To perform the BRARCHIVE backup of the offline redo log files from a disk backup to a tape volume. For an offline backup.5. However. so that the ORAARCH directory is emptied more quickly. We strongly recommend you to back up the offline redo log files to tape. • • • • 3. if the backup of the offline redo log files is directly available on disk. the database remains open in the second phase. BBRESTORE can write the backed-up offline redo log files directly to the ORAARCH directory. You must start BRARCHIVE twice for a two-phase backup. the restore phase can be much shorter.3 Approach to Oracle DBA 3. • • A maximum of two copies of the offline redo log files can be backed up to tape.4.

3 Approach to Oracle DBA 3. In this case the Oracle Home directory is renamed as the new Oracle Home directory of the database copy. When you make the copy. Have a database backup available that saves you the restore during a recovery. Under Windows. Also set the parameter backup_dev_type [Page 490] to disk_copy|disk_standby|stage_copy|stage_standby or call up BRBACKUP with the relevant command option. origlogB. you can retain this distribution by specifying 116 April 2004 . mirrlogA. brbackup -d|-device disk_copy. brbackup -d disk_copy sapdata0 btabd_1 btabi_1 Oracle_Hom e B R B A C K U P sapdata0 New Oracle_Hom e btabd_1 btabi_1 /oracle/C11/sapdata2/stabd_1/stabd. Activities To copy the database.4 Database Backup • • • Generate a test system from a production system Set up a Standby Database [Page 133]. The copied files are then the current files and you can apply the offline redo log files directly. for example.sap profile parameter new_db_home [Page 505] (for local disks) or stage_db_home [Page 518] (for remote disks). you have to define the name of the new database home directory (of the database copy) in the init<DBSID>. software compression is not possible. Prerequisites You must create the following directories on the target database: • • • sapdata directories sapbackup directory origlogA.data1 is copied to /oracle/C12/sapdata2/stabd_1/stabd.data1 Since this is a one-to-one copy. mirrlogB directories of the online redo log files The corresponding subdirectories are created automatically during copying. the sapdata directories can be distributed across several drives.

The backup devices can be tape or disk drives. Whenever possible. • • BRARCHIVE only uses the parallel backup option to tape when you start archiving with brarchive -ss or brarchive -ssd. For more information. which is called size optimization. see -s|-sc|-ds|-dc|-sd|-scd|-ss|-ssd|-cs|-cds [Page 389]. in order to minimize drive head movement during the backup.sap parameters: tape_address tape_address_rew tape_address_arch tape_address_rew_arch • • If the -ss or -ssd option is used. The addresses of the directories on disk are defined in the init<DBSID>. the offline redo log files for archiving are saved to both volumes in parallel (or saved and then deleted). When you perform parallel backups to several backup devices. Features • • Parallel backup is possible to local or remote backup devices. 3. see compress [Page 498].5. as follows: BRBACKUP attempts to balance the load equally among all the backup devices. This is an example of the entries required in the init<DBSID>. see Parallel Backup of Large Databases to Disk with BRBACKUP [Page 127].sap parameter compress = hardware.6 Use Parallel Backup You can use BRBACKUP and BRARCHIVE to back up your Oracle database to several backup devices in parallel. it attempts to divide the data files equally among the individual backup devices.3 Approach to Oracle DBA 3. If this is not possible.sap [Page 488] initialization profile for parallel backup: April 2004 117 . For more information. BRBACKUP saves files from one disk on one volume in one backup device. using compress = yes. If the backup devices used support hardware compression. see the BRBACKUP parameter m|-mode [Page 369]. which is called time optimization. Parallel backup reduces the backup time and allows unattended operation (that is.4.sap parameter backup_root_dir [Page 493]or stage_root_dir [Page 518]. Parallel backup is especially useful for large databases [Page 124].4 Database Backup the appropriate target drives. In this case. use this by setting the init<DBSID>. BRBACKUP attempts to optimize the distribution of the database files among the backup volumes using load balancing. backup in unattended mode). The addresses of the tape devices are defined in the following init<DBSID>. You can also make parallel backups with software compression. For more information. BRARCHIVE only uses the first two tape devices in the list. For more information.

due to the impact on performance). /dev/rmt/1hc) Addresses for directories on hard disk: backup_root_dir = (/backup/dir1. If you need several volumes for a backup.5. Features Unattended Parallel Backup You can make unattended backups if you have enough backup devices. Automatic Tape Changers If you want to use automatic tape changers. without operator intervention to change the volumes. In this case they are used in accordance with the number of copy processes set. For more information. You can change this setting with the init<DBSID>. For more information. you must define the rewind_offline [Page 512] parameter appropriately and set backup_dev_type [Page 490] to tape_auto or pipe_auto.7 Use Unattended Backup With BRBACKUP [Page 359] and BRARCHIVE [Page 382]. you can back up your Oracle database without monitoring or operator intervention. see BRBACKUP/BRARCHIVE [Page 579]. This means that you need as many backup devices as volumes are required for the backup. To make a parallel or serial backup on several tape devices.sap parameters: • tape_address 118 April 2004 . see Backup with Automatic Tape Changers [Page 150].sap parameter exec_parallel [Page 502]or the command option -e|-execute [Page 367]. set the parameter exec_parallel [Page 502] to 1. BRBACKUP can then back up to these devices in parallel. Serial Backup Unattended backup is also possible if fewer parallel copy processes than connected backup devices are possible (for example. How you do this depends on your operating system. you must define the addresses of the backup devices in the following init<DBSID>.4. the backup devices are not used in parallel. To do this. For more information on backup with Microsoft Windows.4 Database Backup • • Device type: backup_dev_type = tape|disk|pipe|stage Addresses for tape devices: tape_address = (/dev/rmt/0hnc. See also: backup_dev_type [Page 490] tape_size [Page 526] 3. see Parallel Backup [Page 117]. /dev/rmt/1hnc) tape_address_rew = (/dev/rmt/0hc.3 Approach to Oracle DBA 3. /backup/dir2) Compression parameters: compress = no|software|hardware Tape size: tape_size = 18G|16G • • • • The number of parallel copy processes normally corresponds to the number of backup devices available.

you must meet the following requirements: • • • The parameters in init<DBSID>. Use brbackup|brarchive -q check to verify that the required volumes were actually mounted. This means that no password can be seen in a script.ora<dbsid> -c "brbackup -t online -c force -u"%system/<password> or under <sapsid>adm: su .4 Database Backup • • • tape_address_rew backup_root_dirfor a local disk backup stage_root_dirfor a remote disk backup Here is an example of these parameters: tape_address = (dev/rmt/0mn. For more information. see BRBACKUP and BRARCHIVE Backups in One Run [Page 120]. using command option -a|-archive [Page 363]. Backup with CRON For a successful unattended backup using CRON. tape or disk volumes) must be available. The correct tapes must be mounted in the backup devices.3 Approach to Oracle DBA 3. The advantage of the <sid>adm user is that no password is needed. as well as a sufficient number of backup devices (if you want to perform a parallel backup). If automatic tape management is not active. If automatic tape management is active. see brbackup -q [Page 371] and brarchive -q [Page 388]. • • Examples Online backup of the complete database Unattended operation Daily.. first determine the tape names by entering the commands brbackup|brarchive -q. For more information.6-Sat) 00 22 * * 1-5 su . due to the OPS$ mechanism.<sapsid>adm -c "brbackup -t online -c force -u /" April 2004 119 .. The operator cannot change the tapes during the backup run. BRBACKUP or BRARCHIVE must run under database user ora<sapsid> or the operating system user <sid>adm..sap must be set correctly. /dev/rmt/1m) Backups with BRBACKUP or BRARCHIVE in One Run The complete backup of the database files and the offline redo log files can be executed with a single start of BRBACKUP. /dev/rmt/1mn) tape_address_rew = (dev/rmt/0m. The Crontab entries must be defined under user root. Enough volumes (for example.. Monday through Friday Backup to start at 22:00 #Min(0-59) Hrs (0-23) Day (1-31) Mon(1-12) WD (0-Sun. mount tapes for which the expiration period has passed.

6-Sat) 00 8 * * 1-5 su .sh in the root directory might look as follows: su ..<sapsid>adm -c startsap Offline backup of the complete database Unattended operation Daily.sh The script backup1. Monday through Friday Backup to start at 22:00 No R/3 System shut down #Min(0-59) Hrs (0-23) Day (1-31) Mon(1-12) WD (0-Sun. Monday through Friday Backup to start at 22:00 R/3 System shut down #Min(0-59) Hrs (0-23) Day (1-31) Mon(1-12) WD (0-Sun.sh The script backup2. You can use this option to make more effective use of the increasing capacity of storage devices.....ora<dbsid> -c "brbackup -t offline -c force -u" <<END system/<password> END su ..6-Sat) 00 22 * * 1-5 /backup2.8 Use BRBACKUP and BRARCHIVE Backups in One Run You can execute the database backup using BRBACKUP [Page 359] and the backup of the offline redo log files using BRARCHIVE [Page 382] in a single run..5.. the 120 April 2004 .<sapsid>adm -c "stopsap R3" su . #Min(0-59) Hrs (0-23) Day (1-31) Mon(1-12) WD (0-Sun. since after a backup with BRBACKUP.3 Approach to Oracle DBA 3.6-Sat) 00 22 * * 1-5 /backup1.ora<dbsid> -c "brarchive -ssd -c force -u"%system/<password> 3.4 Database Backup Offline backup of the complete database Unattended operation Daily.4.sh in the root directory might look as follows: su ... such as tapes and disks..ora<dbsid> -c "brbackup -t offline_force -c force -u" <<END system/<password> END Archiving the offline redo log files Unattended operation Daily. Monday through Friday Backup to start at 08:00 Parallel archiving to two backup devices.. It also makes an unattended backup easier.

Backup of the offline redo log files (AL) Then BRARCHIVE: DBF1 DBF1 . for BRBACKUP and BRARCHIVE) 1.3 Approach to Oracle DBA 3. .sap DBFn AL1 AL2 . For tape backups. DBFn AL1 AL2 ..tape. The database files are backed up first and then the offline redo log files are backed up to the same tapes. BRBACKUP: • • • • • • Checks the volume label Backs up the tape header files (.. You can also perform this procedure in the DBA Planning Calendar of the Computing Center Management System (CCMS) There are the following options for performing the backup in one run: • • BRBACKUP starts BRARCHIVE.hdr0 init. see -a|-archive [Page 363]..tape. using brarchive -b.. using brbackup -a.... ...sap detail log . DBFn BRARCHIVE detail logs .. init_sap) Backs up the database files (but does not save logs) Calls BRARCHIVE Backs up the offline redo log files to tape after the backed-up database files (without checking the label and without header files) Backs up all logs (that is. For more information. DBFn saparch DBF1 DBF1 .. To execute the backup.tape. init_ora. For tape backups. brbackup -a 2.. For more information. DBFn saparch BRBACKUP init_ora DBF1 DBF2 . ALn space summary log logs Overall View init_ora DBF1 DBF1 . We recommend the first option (brbackup -a). April 2004 121 ..hdr0. BRBACKUP uses the tapes defined in volume_backup [Page 528].. ALn space summary logs log This is an example of a BRBACKUP command for unattended online backup with two tape devices. Backup of the database files.4 Database Backup BRARCHIVE run is started automatically. BRARCHIVE starts BRBACKUP. For tape backups. the tapes are managed by BRBACKUP..... . see -b|-backup [Page 385].hdr0 Init. the tapes are managed by BRARCHIVE.

If possible. There are the following types of verify: • Backup tape readability This verify checks the backup media (that is. We recommend that. If you fail to verify backups. usually tape). In this case the logs are backed up by BRBACKUP at the end. Even if a backup is reported as successfully completed. It does not automatically mean that the backup is made to the same volume. you can do this with BACKINT tools in some situations. or even for every backup.9 Use Backup Verify When making database backups. it also compares the backed-up data with the contents of the database files byte-by-byte. Prerequisites 122 April 2004 . the tapes defined in volume_archive [Page 528] are used. The only change to the backup is the sequence in which the data files and the offline redo log files are written to tape. If you run the tape administration using brarchive -b [Page 385]. In some cases. It checks the size of the backup files and whether the data can be read. The offline redo log files are backed up on tape first and then the database files are copied to the same tape. brarchive -sd -c -b -t offline -c For more information. you must regularly perform a verify.4 Database Backup brbackup -m all -t online -c -a -ssd -c For more information. you might find that a backup cannot be used in the event of a database restore. 3. and BRRESTORE [Page 395] tools. You can also perform verify using the action patterns [Extern] of the DBA Planning Calendar [Extern]. see BRARCHIVE command -b|-backup [Page 385]. or to disk. Starting BRBACKUP and BRARCHIVE in sequence with BACKINT. For more information. You can also perform a combined BRBACKUP and BRARCHIVE run to several tape devices in parallel. perform verify once a week.4. This is an example of a BRARCHIVE command for offline backup with one tape device. If you are using BACKINT.5. see Parallel Backup [Page 117]. at least once in every backup cycle [Page 91]. this does not mean that it is always error-free. you perform both types of verify.3 Approach to Oracle DBA 3. only means that BRBACKUP and BRARCHIVE run together. Integration • • You can perform verify at the command level of the BRBACKUP [Page 359]. BRARCHIVE [Page 382]. see BRBACKUP command -a|-archive [Page 363]. • Database block consistency This verify checks the database itself block-by-block. as described below.

For more information. Independent Verify of Backups with BRRESTORE This type of verify with BRRESTORE [Page 395] only checks the backup tape readability. ORA-1578).3 Approach to Oracle DBA 3. a check on the contents is not possible. see brbackup -w|-verify [Page 375]. separately from the backup. that is. see brrestore -w|-verify [Page 405] Verify of Backups with BRARCHIVE This type of verify with BRARCHIVE [Page 382] only checks the backup tape readability. Since the originals were deleted. at a later time if you want. The extent of the check on archived offline redo log files depends on the type of BRARCHIVE backup: • • brarchive -s|-sc|-ss|-cs The backed-up files are restored and compared with the originals byte by byte. compress_dir. but only the readability file sizes are compared. For more information. A volume is first written and then verified. compress_dir. brarchive -sd|-scd|-ssd|-cds The file sizes of the archived offline redo log files are checked. You can use DBVERIFY as follows: April 2004 123 . The byte-by-byte compare used in an offline backup is not possible with an online backup because the database is constantly changing as updates continue. The method and extent of a BRBACKUP [Page 359] verify differs according to whether the backup is online or offline [Page 87]: • Offline backup After the backup the files are copied back to a temporary directory. Verify is always performed on complete backup volumes. BRRESTORE only checks whether the backup can be read and its size. Features Verify of Backups with BRBACKUP This type of verify only checks the backup tape readability. backup tape readability (but without a byte-by-byte comparison) and database block consistency. For more information. see -brarchive -w|-verify [Page 390] Verify of Backups with Oracle DBVERIFY The Oracle DBVERIFY tool is available for both types of verify. not restored. and the contents are compared to the original data in the database byte by byte. not the contents.4 Database Backup • • Verify adds considerably to backup run times. before they lead to the termination of a program in an application that accesses the blocks. This means you can recognize errors early (for example. • Online backup After the backup the files are copied back to a temporary directory. You can also perform this type of verify on another computer. The files are only read.

confirmation) and they are accepted when restoring. If you want to include verification of the internal Oracle block consistency with DBVERIFY. you can check the database directly without starting the backup. Verify of BACKINT Backups You can verify third-party backups using the BACKINT interface. Make sure that you have sufficient expertise before using these functions. 3.6 Advanced Backup and Recovery This section deals with advanced topics in backup and recovery. The verification with DBVERIFY is no longer required because for each backup all saved database files are checked by RMAN for internal Oracle block consistency.utl.4 Database Backup • Database backup with subsequent restore to a temporary directory (compress_dir) and check on the Oracle block consistency: brbackup -w use_dbv • Online check of block consistency on the database files without backup: brbackup -w only_dbv Any number of these verify processes can run in parallel. To do this. consult your BACKINT provider. using parameter exec_parallel.3 Approach to Oracle DBA 3. that you can use to activate the verification independent of the option -w|-verify. data is physically read by the backup medium and checked by RMAN for consistency. • Temporary restore of a database backup (compress_dir) and verify of the database block consistency: brrestore -w use_dbv The restore implicitly checks the readability of the backup. you can perform BACKINT backup verification directly using the backup tool (if supported). For more information. Only an internal catalog of BACKINT backups of the backup tool is checked (that is. This gives you a complete range of functions for verification: • • The RMAN validate function is used for verifying backups. init<SID>.6. call BRBACKUP as follows: brbackup -w only_dbv An external backup tool can also be accessed using the Oracle Recovery Manager (RMAN) with the parameter backup_dev_type = rman_util. In this case there is no physical data check on the backup medium.1 Use Backup of Large Oracle Databases 124 April 2004 . This function confirms that backups are known to the external backup tool (that is. Some backup tools offer special parameters in the BACKINT parameter file. In this case. option -e. Of course. logical verification).4.4. 3. Verifications using Oracle DBVERIFY are not supported in this context.

disk and volume controllers. Features Whether you can back up large databases with BRBACKUP [Page 359] (and cpio or dd for the copy processes) depends on the following factors: • • • • • Capacity and maximum throughput of the tape devices Disk access times Maximum throughput of the I/O buses Maximum throughput of the system bus cpio and dd performance. daily in most cases): • Performance problems There is a heavy load on database server resources. This might require multiple tape changes and the management of hundreds of volumes. If possible. Prerequisites Your system is normally configured so that there is a single server for the database. use tape jukeboxes or robots supported by the BACKINT interface and external backup programs. online operations in the SAP System are restricted. In general. Large databases contain 500 GB – 2 TB or more data. you might not be able to back up the database as often as you want to (that is. dd offers much better performance than cpio BRBACKUP itself places minimal load on the backup process. Any hardware-specific restrictions can only be improved by the hardware vendor. Common backup strategy A common backup strategy for database and non-database files is not a solution since non-database data can better be backed up with operating system tools (such as tar). you might still find that you exceed the 12 hours available. • • Data volume The amount of database data is too great to back up in the time available. such as at night. particularly CPU time.4 Database Backup This section gives you advice on backing up large Oracle databases. determined by internal buffering and blocking.3 Approach to Oracle DBA 3. For reasons such as the following. which we recommend Standby Database [Page 133] Split Mirror Backup [Page 142] Backup Devices for Large Databases April 2004 125 . • Lack of time Although you normally perform backups at times of low system load. Therefore. where no other large applications run. You can reduce the amount of data significantly by using the following features: • • • Incremental backup [Page 90]. We recommend you not to back up large databases across a network because of instability and performance problems. The hardware configuration for a large database needs careful planning for an optimal backup. system and I/O buses.

Backup devices (for example magneto-optical media) that are addressed with an external backup program can be reached using the BACKINT interface. However. Always perform tape swapping with BRBACKUP. Backup of Large Databases to Tape with BRBACKUP Use This section describes how you can use BRBACKUP [Page 359] to back up large Oracle databases [Page 124] to tape. Backup devices: The maximum number of locally connected tape devices supported by BRBACKUP [Page 359] is 255. Do not mount too many backup devices on one I/O bus. we recommend you to reduce other activities on the computer to the absolute minimum during the backup. Prerequisites Note the following restrictions for backup with BRBACKUP: • As the database server is working with high load during the backup. • BRBACKUP offers only limited support for automatic tape changers [Page 150] such as jukeboxes. This means that you must always completely save individual files to one volume. No cpio continuation mechanism is supported during parallel backups. BRBACKUP calls cpio or dd to copy individual database files from disk to tape. the size of the 126 April 2004 . This clearly limits the high availability required of the SAP System. If you work with tape units with hardware compression. For more information. Use • • Do not perform the backup over a network. system bus speed. you can address such devices using the BACKINT interface to external backup programs. Virtually all of the computer's resources ought to be available for the backup.4 Database Backup Definition This section discusses how to use devices when backing up a large Oracle database [Page 124]. so as not to overload it. As a result. If hard disks and tape units are mounted on the same I/O bus. • • Be aware of the features of hardware compression [Page 106] if you decide to use this. such as: Server throughput. throughput is largely determined by cpio or dd. hard disk access times. the load is split between the mounted devices. there is no simple solution to this conflict. I/O bus speed. in particular. the size of a file to be saved must not exceed the tape capacity. Factors other than the performance of the backup device also play a large role. see External Backup Programs for Large Databases [Page 127].3 Approach to Oracle DBA 3. see cpio Continuation Tape [Page 536]. However. • • Use tape units with a larger capacity and higher throughput rate if possible. Therefore. but either to volumes in locally mounted backup devices or directly to hard disks. For more information.

In a parallel backup. That is. For more information. All files to be saved are distributed to the tape volumes inserted in the tape units. there is a certain amount of wastage when distributing the files to the available tapes. see the option util_file_online with the backup_dev_type [Page 490] parameter or the corresponding command option -d|-device [Page 366]. BRBACKUP makes sure that the tape capacity is never exceeded. magneto-optical (MO) media.sap file – and the log files at the end of the tape (central. init<DBSID>. automatic tape changers [Page 150]. Make sure that the tape capacity is not set too high. We provide the BACKINT interface for this purpose. BRBACKUP has different optimization targets. for example. a completely automatic backup is also possible with tape swapping for one or more tape units during a backup.ora file. For more information. and init<DBSID>. The size of the tape header files – that is. BRBACKUP also supports automatic tape changers [Page 150]. You can obtain information on the throughput and performance of external backup programs from the vendors providing the external backup. Therefore. label. for example. see Optimization of File Distribution [Page 128]. • See also: Optimization with a Logical Volume Manager [Page 129] Partial Backups [Page 131] External Backup Programs for Large Databases Use You might want to use external backup programs if you need to back up a large Oracle database [Page 124].3 Approach to Oracle DBA 3. Features BRBACKUP offers the following functions for optimal backup of large databases: • • BRBACKUP can back up in parallel [Page 117] to several locally mounted tape units (up to 255). the tape capacity cannot be fully used. in order to avoid reaching the end of the tape. • Since individual files can only be written in their entirety to a volume. April 2004 127 . see External Backup Programs for Large Databases [Page 127]. detailed. Features The main advantage of using the BACKINT interface with external backup programs is that you can use other backup media. and summary log) are not taken into account. Parallel Backup of Large Databases to Disk with BRBACKUP Use You can use BRBACKUP [Page 359] to back up your large Oracle database to multiple disks [Page 109] in parallel [Page 117]. When distributing the files. Alternatively you can transfer volume management to other systems.4 Database Backup compressed file must not exceed the tape capacity. such as jukeboxes and tape robots. For more information.

you can back up directly to remote disks [Page 110]. Start the backup from this host. see Optimization with a Logical Volume Manager [Page 129]. • Activities To avoid imposing extra processing load on the database server during the second phase of a two-phase backup. Features When distributing the files to the tapes. consider the following procedure instead: . Alternatively. this target can only be attained if the logical volumes are not scattered over several physical hard disks.4 Database Backup Prerequisites You must define the directories with the backup_root_dir [Page 493] parameter. If a Logical Volume Manager (LVM) is used. This is especially relevant to backup of large Oracle databases [Page 124].. BRBACKUP [Page 359] has different optimization targets: • All files from a disk saved to the same tape volume Therefore. since the file system cannot be mounted on different computers at the same time due to the buffering mechanism. BRBACKUP attempts to minimize the total backup time by keeping the backup time equal on each of the individual tape units. If required.. Mount the file system on a second host.3 Approach to Oracle DBA 3. 3. that is. Optimization of File Distribution Use This section describes how BRBACKUP [Page 359] optimizes file distribution during an Oracle backup. This eliminates the need for umount and mount. Features • • You can perform the backup with or without software compression [Page 107]. Note the following factors relevant to time-based optimization: 128 April 2004 . you can make a two-phase backup [Page 113]. For more information. the number of parallel copy processes – using the exec_parallel [Page 502] parameter or the BRBACKUP command option -e|-execute [Page 367]. first to disk and then to tape. 1. Another approach to reduce processing load on the production database host is to use split mirror backup [Page 142]. and keep the number of read/write accesses to a minimum. Unmount the file system from the database server. A requirement for this procedure is that the hard-disk controllers for the backup disks can be physically mounted on both hosts simultaneously. • Time-based optimization used Using the backup times for individual files stored in the database. 2. umount and mount – are necessary. You can control the degree of parallelism – that is. The unmount and mount operations – that is. try to avoid competing disk accesses.

• Previous backup times used BRBACKUP is capable of “learning. using a tape unit. the changes to backup time are taken into account for individual files. As a result. The tape capacity in general is not used to its maximum due to time-based optimization. BRBACKUP always attempts to use all mounted tape units. The backup time can change. the backup time can vary for individual volumes. see -o|-output [Page 371] (BRBACKUP) and -o|-output [Page 388] (BRARCHIVE). Therefore. In this case. When using tape units with hardware compression.4 Database Backup • It helps to avoid the following problem. See also Log Supplements [Page 531]. though the tape still has plenty of space left. That is. As a result. the optimization is performed from the backup times stored by BRBACKUP. The one exception is when the number of files to be backed up is less than the number of tape devices. see the tape_size [Page 526] parameter. no further files are saved to this tape. For more information.” It stores the backup times of individual files in the database and uses these in the next backup for time-based optimization (if this is performed). time used BRBACKUP or BRARCHIVE use these to: Display the file distribution performed by BRBACKUP before starting the actual backup Display the backup times of the individual files after the backup is completed For more information. the total capacity of all available tapes inserted at the same time must significantly exceed the total size of the files to be saved. because the tape capacity can never be exceeded and the total tape capacity can be better utilized. April 2004 129 . • • • • Files sorted and distributed by size BRBACKUP sorts the files to be saved according to their size and distributes the largest files to the available tapes first. if the fill level of the individual database files varies and the files are saved with hardware compression [Page 106]. Optimization with a Logical Volume Manager Use This section describes how a Logical Volume Manager (LVM) influences the optimization of file distribution [Page 128] during an Oracle database backup. • • • Parameter -o|-output with options dist. the entire capacity of the tapes is used. even if the backup would fit onto a smaller number of tapes. All mounted tapes used To minimize the total backup time. for example. if the optimal backup time is reached for a tape.3 Approach to Oracle DBA 3. Therefore. the backup time cannot be estimated accurately from the file size or the size of the compressed file. followed by the smaller ones. since BRBACKUP always attempts to avoid volume changes. The time-based optimization is cancelled internally if it would cause a tape change. As a result. wastage is reduced on individual volumes.

Activities When planning the configuration of logical volumes for large databases.disk2 + area3. Configuration A of the graphic below is better suited for backup with an LVM.disk3 Logical volume 2 = area2. BRBACKUP can only save all files from a hard disk to tape if the logical volumes are not scattered over several hard disks. However.4 Database Backup If you use an LVM.disk1 + area1.disk2 + area2.disk3 Disk 1 Disk 2 Disk 3 logical volume 1 logical volume 2 logical volume 3 Configuration A is more efficient than configuration B with respect to database backup.disk3 Logical volume 3 = area3. Disk 1 Disk 2 Disk 3 logical volume 1 logical volume 2 logical volume 3 Configuration B Each logical volume is set up so that it covers areas of all the hard disks: • • • Logical volume 1 = area1. you need to find a compromise between the following: • • • More effective backup Higher SAP System performance Advantages of using an LVM Consider the following factors: 130 April 2004 . logical volume 3 = disk 3. Features Configuration A Each logical volume exactly corresponds to one hard disk. For example logical volume 1 = disk 1.disk1 + area2. configuration B can provide better performance for online operation of the SAP system.3 Approach to Oracle DBA 3.disk2 + area1.disk1 + area3. logical volume 2 = disk 2.

consider whether you could do without an LVM: You lose the LVM advantages outlined above. Use BRBACKUP command option -f|-fillup [Page 367] to do this. this is an unlikely event. higher security by using RAID systems • Disadvantages of using an LVM Performance loss through management overhead and possibly – in configuration B – reduced optimization with BRBACKUP • • • • Although the higher security and availability of your datasets provided by using the LVM has a generally high priority. You must consider the effect on physical disk configuration and the influence this has on performance when you make changes to the configuration. high flexibility. It is also possible to restore the entire database and then recover it. and then back them up separately at tablespace level. You can quickly recover after a media error – that is.4 Database Backup Easier administration. You can recover the database at any time if the corresponding redo log entries exist. This situation only normally occurs with logical errors. Partial Backups Use You can reduce long backup times for your Oracle database by dividing the backup into several partial backups. you can put extremely large tables into separate tablespaces. This is your responsibility as database administrator.3 Approach to Oracle DBA 3. Disadvantages • Restoring the entire database takes as long as the total of all of the partial backups. you can perform a dataset backup much more effectively using BRBACKUP. such as program errors or user errors. a disk crash – as you only need to restore the files of the affected hard disks. so you can perform them daily. Features Advantages • • • The partial backups require less time. You must ensure that all database files are saved in a partial backup cycle. However. However. For example. the configuration of the database files is not variably selectable. • Back up at tablespace [Page 131] level (not at database file level. which is also possible). as BRBACKUP can then make sure that all files from a tablespace are backed up. Splitting extremely large tablespaces into several smaller tablespaces can be useful in this case. such as structure changes due to a tablespace extension or a tablespace reorganization with data files. Tablespace Backups Use April 2004 131 . In large databases.

After restoring the backed-up data tablespaces both the index tablespaces and the indexes must be newly created with the definitions in the SYSTEM tablespace. One way to do this is by backing up specific tablespaces. Four tape units are available in our example. indexes can always be recreated. During the backup. For more information. assuming the average compression rate for SAP data. see -m|-mode [Page 402]. Activities You do not have to back up pure index tablespaces during a database backup. Index definitions are stored in the SYSTEM tablespace as a matter of course. so that BRRESTORE recognizes these. about 3-4 GB per hour. To make a backup of all tablespaces except index tablespaces. which uses a complete backup (brrestore -m all). see backup_mode [Page 492]. For example. We recommend you to test the complete recovery procedure to find out whether you can indeed expect a time reduction of this approach. you can use brconnect -f stats -t <tablespace name> to do this. see -f stats [Page 477]. Tape capacity About 70 GB for tape units with hardware compression [Page 106]. Set the profile parameter backup_mode = all_data in init<DBSID>sap. For more information. possibly canceling the expected time reduction from a new index. see Tablespace Point-In-Time Recovery with BR*Tools [Page 299]. you can exclude the pure index tablespaces with the command brrestore -m all_data. In the restore process. BRBACKUP indicates all pure index tablespaces. especially when backing up large Oracle databases.3 Approach to Oracle DBA 3. For more information. After new indexes have been created. Therefore. • • Throughput The throughput of the backup is approximately 15 to 20 GB per hour. For more information. Backup Example for a Large Database The following example shows how you can perform a large Oracle database backup: • • Size of the database: The size of the database is 400 GB. 132 April 2004 . perform one of the following: • • Start BRBACKUP with the command option -m all_data. This requires extra time. For more information.4 Database Backup It is important to keep the volume of data to be backed up or restored as small as possible. you must update optimizer statistics [Page 462] on these indexes. BRRECOVER automatically performs this during the recovery. see -m|-mode [Page 369]. Backup devices The database backup is performed to locally mounted tape units.

a logical volume is considered to be one disk. so speeding up the backup. 1. 2. tape_address_rew [Page 524]. Features Parallel Backup You can improve throughput by performing data backups in parallel [Page 117]. see tape_address [Page 522]. Remember that scalability is restricted. using hardware compression [Page 106]. By keeping the logical volume on one physical disk. you minimize read/write head movement on the disk. for example. and backup_root_dir [Page 493].3 Approach to Oracle DBA 3. you can back up 4 to 6 GB per hour. Backups can often take a long time. If the database can be backed up in parallel to four tape devices.4 Database Backup • Duration The backup should be possible in less than 10 hours overnight. Logical Volumes If you are using the logical volume manager (LVM) [Page 129]. Speeding Up the Backup Use This section discusses how you can speed up a backup of your Oracle database. This means that backing up a 50 GB database on one tape device of this type takes approximately 10 hours.2 Use Standby Database April 2004 133 . you can make a parallel backup with BRBACKUP by assigning several tape devices to the init<DBSID>. You back up to disk. Therefore. Activities A good way to reduce backup time is to perform a two-phase backup [Page 113]: . You can then make a backup of.sap parameters tape_address and tape_address_rewind or several disks to parameter backup_root_dir... If you have several backup devices. using the backup_dev_type [Page 490] parameter. This means that backup performance does not rise in proportion to the number of tape devices.6. Therefore. using hardware compression. then it can be completed within ten hours.You can assign the copy operation a lower priority. For example. using the tape_copy_cmd [Page 525]. if you use more tape devices. if you use digital audio tape (DAT) devices as a backup medium. you should not distribute a logical volume to be used for backup over several physical disks when this is not absolutely essential. You copy the disk backup to a tape volume. a 100 GB database in parallel on five tape devices in five hours. backup time increases for each device. For more information.4. 3.

see: • • • • • • Standby Database: BRARCHIVE Backup of Offline Redo Log Files Standby Database: BRBACKUP Backup of Database Files Copy the offline redo log files from the production database to the standby database. the resources on the production host are fully available for production operation. see Standby Database Configuration [Page 135].3. • Significant decrease of the load on the production host The database backup requires considerable resources and time for large databases. For more information. This avoids a time-consuming data-file restore. Advantages • Very low failure rate All system components are duplicated. For more information. The primary and standby instances can run on different hosts. followed by backup of the offline redo log files to tape Back up the standby database Create and configure a new standby database. The only thing you need to do is to import the last entries from the redo log files. Disadvantages • High costs 134 April 2004 . Therefore. • Very short downtime If an error occurs in the primary database system and it is necessary to recover the database. Therefore. They can also have separate locations depending on the safety requirements. you can perform the recovery very quickly on the standby host. and database operation does not need to be interrupted or restricted for a backup. If you decide to use the standby database. since these files are already located on the standby host. weigh up the advantages and disadvantages carefully. Since the backup can run on the standby host.4 Database Backup The standby database is supported officially by Oracle as of Version 7. and reconstruct the production database after a takeover BRARCHIVE and BRBACKUP support the standby database by helping you to: Features Before you use the standby database. the load on the primary instance is reduced significantly.3 Approach to Oracle DBA 3. Integration The SAP tools BRARCHIVE [Page 382] (for backup of offline redo log files) and BRBACKUP [Page 359] (for database backup) support the standby database. including a check on the copied files Import the offline redo log files into the standby database (recovery). Only use the standby database if you are an experienced user. the standby instance can take over the tasks of the primary instance very quickly. you are fully responsible for correctly configuring and running the standby database. The Oracle documentation contains detailed information on this database configuration.

The primary database system is also the system that directly executes all database requests.4 Database Backup For a standby database scenario. . including advantages and disadvantages of using the standby database. since the standby database can assume the role of the productive database in a very short time. who are responsible for selecting this software and ensuring that it functions correctly. the appropriate switchover software is required. The standby database is a copy of the primary database and is only intended as a recovery system.3 Approach to Oracle DBA 3. production) database is duplicated on a standby database. . . The database is open and fully available for all SQL statements of the SAP System. make sure these are incorporated on the standby host. If structural changes are made on the primary database system. • High requirements for switchover software For the standby instance to take over production operation. Standby Database Configuration Use This section describes how to configure the Oracle Standby Database. In particular. see Standby Database [Page 133]. all system components must be available in duplicate. You need to work with the hardware and software suppliers. The aim of this configuration is to minimize downtime if the primary database suffers an error. productive) Oracle instance is located on the first host. Features The following graphic illustrates the standby database: PRIMARY DATABASE Network DBWR ARCH Recovery STANDBY DATABASE copy . . . and so on) are expensive. duplicate hardware resources (CPU. hard disks. For more information. • High system administration expense You need to set up the standby host. this is referred to as a standby database configuration. When the standby instance has taken over production operation – a “takeover” – you must set up a replacement standby database. • April 2004 135 . When the primary (that is. Host A data files control files online redo logs archive directory archive directory Host B data files control files online redo logs LGWR DATABASE <SID> open DATABASE <SID> mounted standby Two identically configured databases operate on two identically configured hosts: • The primary (that is.

If you try to directly apply the redo entries from the online redo log file. which are required for working with a standby database. The new and changed SQL and SQLPLUS commands are also described there as well as the necessary init. the recovery process is stopped. If you use this parameter.3 Approach to Oracle DBA 3.5B. This means that you must first import the missing offline redo log files from the primary instance. do not copy the current online redo log file to the standby host. after a media error). the offline redo log files created in the primary database system are applied (only the redo entries already archived by Oracle can be imported). these changes do not appear in the redo log files. the standby instance can assume the functions of the primary instance in a very short time. and you need to intervene manually to incorporate the structural change in the standby database. If it is not possible to incorporate the changes automatically. However. Changes to the physical structure of the primary database (creating new files.sap parameter orig_db_home [Page 507]. we do not recommend this for high availability. For more information. From SAP Release 4. Since all data files are already located on the standby host. renaming files. you need to restart the recovery process. This means that the standby instance incorporates all changes to the data of the primary instance either immediately. Therefore. changes to online redo log and control files) are not automatically incorporated in the standby database in every case. After the takeover. However. BRBACKUP supports renaming all database files to another SAPDATA_HOME directory of BRBACKUP using the init<DBSID>. Some redo entries might still need to be applied to the files to enable all transactions to be incorporated in the standby instance. it is even possible to run the standby database on the same host as the primary database. It is therefore not possible for the standby instance to receive any information about such changes. Activities 136 April 2004 . a standby database needs to be set up again (usually on what was the primary host). You can then try to archive the current online redo log file of the primary instance with the Oracle command ALTER SYSTEM ARCHIVE LOG CURRENT and also to import these redo entries in the standby instance. This is a "takeover. you might crash the standby database. costly reloading of the files is avoided. To do this. In this case. be sure to check the ALERT file regularly. After that.4 Database Backup The standby Oracle instance on the second host is in a mounted standby state (not opened) and is recovered constantly. You might need to intervene depending on the type of change. no error messages appear during the recovery process." which means that the recovery mode of the standby instance is terminated and the standby database is opened for online operation. If this command fails. they are recorded in the standby database ALERT file. If commands are executed in the primary database with the UNRECOVERABLE option. The original names of the primary database ought to be retained. see the Oracle documentation. If it is necessary to recover the primary database system (for example.ora parameters. or with a chosen delay.

5A. In this case. • Reliable copy programs Starting with SAP Release 4. BRARCHIVE can back up offline redo log files from the primary to the standby instance. Features The following graphic illustrates how BRARCHIVE works with the standby database: PRIMARY DATABASE Network DBWR ARCH NSF mount for -d disk . . • BRARCHIVE process on the standby host April 2004 137 . Host A data files control files online redo logs brarchive -sd -d disk/stage -f -w archive directory data files control files Host B online redo logs LGWR brarchive archive -ssd -f -m 10 directory DATABASE <SID> open DATABASE <SID> mounted standby • BRARCHIVE process on the primary host This process copies the offline redo log files to an NFS-mounted or remote directory. the copy process uses an insecure network protocol. BRARCHIVE can use reliable copy programs such as rcp or ftp for the copying of the offline redo log files from the primary host onto the standby host. which represents the archive directory (usually saparch) on the standby host. . see backup_dev_type [Page 490]. as follows: backup_dev_type = disk_standby|stage_standby For more information. . NFS-mounting and verification are no longer necessary. Standby Database: BRARCHIVE Backup of Offline Redo Log Files Use You can use BRARCHIVE [Page 382] with the Oracle Standby Database [Page 133] to back up the offline redo log files. with the backup_dev_type [Page 490] parameter set to stage. For a mounted directory. you make a copy of the production database. This is possible because BRARCHIVE is able to copy offline redo log files to a local or remote hard disk. Therefore. You can then use this as the standby database. .3 Approach to Oracle DBA 3.4 Database Backup To create a standby configuration. STANDBY DATABASE Recovery . you should use BRARCHIVE with the -w|-verify [Page 390] option.

backing up the redo log file and deleting it if necessary. Since there is no online operation on the standby database. production) database. Standby Database: BRBACKUP Backup of Database Files Use You can use BRBACKUP [Page 359] to back up the data files and control files of the Standby Database [Page 133].4 Database Backup This process waits for the offline redo log files to be copied into the local archive directory. If a logical error occurs in the primary instance (for example. To do this. the database user (usually SYSTEM) must have SYSDBA authorization. using the <delay> parameter with the -m|modify [Page 387] option.5B. in which the offline redo log files are processed individually. Starting with BRARCHIVE Release 4. accidental deletion of a table). A major advantage of the standby database is that you do not have to perform backups on the primary (that is. see -m|-modify [Page 387]. If a redo log file was copied completely. • Importing offline redo log files You import the offline redo log files with the following Oracle command: RECOVER STANDBY DATABASE.file not found ORA-01110: data file <file_id>: ‘<file_name>‘ You now need to manually incorporate the structural change in the standby database. For the BRBACKUP backup of the standby data. see SAP Note 216108. the import to the standby database is performed in parallel to the backup. For more information. 138 April 2004 . you can prevent this error from being imported in the standby instance. Prerequisites • The standby instance is in the recovery state and is not opened. To import the redo log files. you can use the command: ALTER DATABASE CREATE DATAFILE ‘<file_name>‘. you can perform the backup on the standby database using BRBACKUP. You can only perform an offline backup. BRARCHIVE starts the recovery process of the standby database. For more information. the BRARCHIVE process terminates with the following Oracle errors: ORA-01670: new datafile <file_id> needed for standby database recovery ORA-01157: cannot identify data file <file_id> .modify [Page 387] option. BRARCHIVE applies these redo entries to the standby instance with the -m|. When redo entries are imported in which a structural change of the primary database is recorded. Therefore. you must set the backup_type [Page 494]parameter to offline_standby. You can now restart BRARCHIVE. when the volume of offline redo log files is high. • Delaying import of redo entries You can delay importing the redo entries. leading to significantly faster processing. This means that the database backup does not add to the load on the primary database host. by stopping the BRARCHIVE run. Instead.3 Approach to Oracle DBA 3. all host resources are available for the database backup.

If the database was in a recovery state.4 Database Backup • • Renaming of database files in the standby database is not supported by BRBACKUP. we do not recommend this for high availability. you can even run the standby database on the same host as the primary database. using Oracle commands STARTUP NOMOUNT. the original state of the standby database instance is recovered.5. • • • See also: Structure-Retaining Database Copy [Page 115] Standby Database: Restore and Recovery Use April 2004 139 . You must keep the original names of the primary database. we support renaming all database files to another SAPDATA_HOME directory of BRBACKUP using the orig_db_home [Page 507] parameter. ALTER DATABASE MOUNT STANDBY DATABASE. However. BRBACKUP backs up the standby data. This information is written to the backup logs. . After the backup has finished. . you must meet the remote database connect requirements [Page 141]. Host A data files control files Host B archive directory online redo logs archive directory brbackup -t offline_standby LGWR DATABASE <SID> open DATABASE <SID> shutdown • BRBACKUP logs on to the primary database instance using the instance string from the primary_db [Page 508] parameter. this state is restored. If you use this parameter. BRBACKUP stops the standby database instance.3 Approach to Oracle DBA 3. For connection to a remote host. . STANDBY DATABASE online redo logs ct . . It retrieves the information required on the database structure. • Features The following graphic shows how backup occurs in a standby database: PRIMARY DATABASE network DBWR ARCH data files control files conne . From SAP Release 4.

This is the only way to make sure that the standby database can be recovered. Be sure to perform this operation whenever you switch production from one database to another. Resume the original configuration This means that you switch back to the previous production database. to resume the configuration from before the failure. Resuming the Original Configuration After a Switch To recreate and configure a production database after a switch. Which option you choose depends on whether the production and standby databases are equivalent in terms of processing power. in which case it makes sense to switch back to the original production database as soon as you can.3 Approach to Oracle DBA 3. Control File Backup and Complete Online Backup After a Switch If the production database fails. We then strongly recommend you to perform a complete online backup as soon as possible. you can enter the following command to do this: brbackup -m 0 -t online For more information. see "Resuming the Original Configuration after a Switch" below. you can do one of the following After a takeover. the standby database is less powerful. restore and recover the database with the redo log files. which now becomes the production database If you switch to the standby database. you can enter the following command to do this: brbackup -f m all -t online For more information.4 Database Backup This section describes what you need to do in the event of a failure with the Oracle Standby Database [Page 133]. you should back up the control file immediately. you can do one of the following: Stay with the swapped configuration This means that you continue production operation on the previous standby database. For more information. If necessary. the database that was functioning as a standby before the switch). you cannot recover the standby database at all. Often. if necessary. In effect. see -f|-fillup [Page 367]. Otherwise. if available. Activities If the production database fails. For example. you use BRBACKUP to perform an offline backup of the current production database (that is." After you have fixed the problem on the previous production database. you have swapped the configuration. For example. you can do one of the following: • Switch to the standby database. see -m|-mode [Page 369]. be sure to perform backups as described below in "Control File Backup and Complete Online Backup After a Switch. with the previous production database becoming the standby database. • Fix the problem and continue on the production database. set: 140 April 2004 . To do this.

you must restart it. without a restore).. If you want to set it up in one step (that is. After a restore on the production database. Test the connection in SQLPLUS with the following command: connect system/<password>@<value_of_primary_db> Procedure . which are started on the standby database server.ora file. April 2004 141 . that is. 3. see backup_type [Page 494]. you also set one of the following: backup_dev_type = disk_copy|stage_copy stage_copy_cmd = rcp|ftp For more information. Therefore. Start as user SYS and execute the Oracle command: grant sysoper to system. change the password for the system user: alter user system identified by <password>. Set the remote_login_passwordfile parameter in the init<DBSID>. Standby Database: Remote Database Connect Requirements Use Certain conditions are required for the connection to a remote host with the Oracle Standby Database [Page 133]. you must be able to start up and shut down this instance from the standby instance.3 Approach to Oracle DBA 3. so that the parameter becomes effective. so it can resume the role of the standby database. this can resume its role as production database. 1. This grants the system user SYSOPER authorization on the primary database instance. see backup_dev_type [Page 490] or stage_copy_cmd [Page 517]. Prerequisites BRARCHIVE [Page 382] and BRBACKUP [Page 359]. make sure that the instance string in the primary_db [Page 508] parameter is defined to Oracle SQL*Net in the tsnnames. 4. If necessary. connect remotely to the primary database. Create an Oracle password file: orapwd file=<ORACLE_HOME>/dbs/orapw<DBSID> password=<sys_password> entries=100 2.ora as follows: remote_login_passwordfile = exclusive If the parameter is entered only after an instance has been started up. you directly switch the database to mount-standby state..4 Database Backup backup_type = offline_stop For more information. You must be able to perform these operations from a local SQLPLUS session. After the backup. You must be able to manage the primary Oracle instance from the standby instance.

you can start a BRARCHIVE session immediately after the disks are split and not just at the end of the online BRBACKUP session. If the backup device is connected to the backup server. this saves processing power otherwise required for the backup. BRBACKUP can be used to control the splitting and later synchronization of the disks. Integration • Computing Center Management System (CCMS) You cannot use CCMS to schedule split mirror disk backups. synchronized. On the production host. so that the production SAP System is unaffected by the backup. the disks of the production database host are mirrored. Backups of the offline redo log files using BRARCHIVE [Page 382] are not included because they do not place any significant load on the production host. where the backup is performed after the mirror disks have been split and mounted.5B. which CCMS can then use. you can use the remote device – using backup_dev_type [Page 490] = pipe|pipe_auto|pipe_box – or the BACKINT interface. However. that is. it is no longer necessary to give the SYSTEM user SYSOPER authority in the Oracle password file of the production database. A split mirror disk backup only includes database backups with BRBACKUP. because BRBACKUP sends status information to the production database. It is especially important to make sure that the data on the backup database host is consistent when you perform the backup. 142 April 2004 .3 Use Split Mirror Backup This section describes how you can use split mirror disk backup with BRBACKUP [Page 359] to perform an online or offline backup of your Oracle database without downtime. you back up the offline redo log files on the database server to local or remote tape devices. If you want to open the database on the backup host and use it as a "reporting server" you can perform the synchronization yourself later.3 Approach to Oracle DBA 3. BRBACKUP runs on a backup database host.4. In a standard setup. Oracle regards the backup as already finished. • The BACKINT interface is also supported in the split mirror configuration. This configuration is transparent to BACKINT and there are no extra considerations for BRBACKUP.6. When the disks have been split. This is because BRBACKUP runs on the backup database host. We provide this information on split mirror backup for advice only. We recommend this especially for online backup of large databases. on disk or with BACKINT. you can use CCMS to monitor backups on the production database. • • To synchronize BRBACKUP sessions with BRARCHIVE sessions. Consult your hardware partner for help in setting up split mirror backup.4 Database Backup Starting with SAP Release 4. 3. Features In the split mirror configuration.

For more information. or backup software. Database handling with the SPLITINT scenario is considerably faster than with the split command scenario.4 Database Backup The actual splitting and later synchronization of disks is executed by a script or program supplied and supported not by SAP. BRBACKUP controls the splitting and later synchronization of the disks. disk subsystem. If the split disks do not have to be resynchronized immediately after the backup you can use the backup server along with the mirror disks to operate an independent SAP system on the backup server. • SPLITINT Scenario This uses the SPLITINT interface program with split_options [Page 517] and split_resync [Page 517] to split and resynchronize the mirror disks. see SAP Note 378818. there is an online and an offline variant. but by the manufacturer of the operating system.3 Approach to Oracle DBA 3. . see SAP Note 170607. Activities There are two basic scenarios: • Split Command Scenario This uses split_cmd [Page 517] and resync_cmd [Page 511] to split and resynchronize the mirror disks. BRBACKUP calls SPLITINT to actually split and resynchronize the disks. AB A’ B B’ Remount April 2004 143 . For each scenario. see the following: • • To start split mirror backup on the production database server. For this you must install the entire Oracle server software on the backup server. The following graphic shows in outline how split mirror backup works: Production database host Backup database host Automatic tape changer SAP shadow process Database 1 File system Mirroring 2 3 File system Backup 4 Resynchronization 5 . . SPLITINT executes the split and resync requests from BRBACKUP using the appropriate disk subsystem calls. . To divide the split mirrors.

The tablespaces to be backed up are temporarily set to BACKUP status while the mirror disks are split. We especially recommend this for large databases where high availability is an important consideration. you can enter the BRBACKUP command option -t|-type as shown below in "Activities. Prerequisites You set the following parameters in the initialization profile init<DBSID>.3 Approach to Oracle DBA 3. Split Mirror Online Backup Use This section describes how you can use BRBACKUP [Page 359] to perform a split mirror [Page 142] online backup with your Oracle database. the amount of redo information is significantly reduced. In comparison to the normal online backup.sap [Page 488]: • backup_type: Split command scenario: backup_type = online_split SPLITINT scenario: backup_type = online_mirror Instead of the backup_type parameter. In an online backup the system remains available the whole time. • • Split command scenario: split_cmd [Page 517]and resync_cmd [Page 517] SPLITINT scenario: split_options [Page 517]and split_resync [Page 517] Activities Split Command Scenario You start BRBACKUP on the backup host using the following command : brbackup -t online_split 144 April 2004 . in which the tablespaces retain this status during the whole backup period.4 Database Backup Split mirror Online Backup [Page 144] 1 2 Tablespaces set to status BACKUP Split mirror Offline Backup [Page 146] Production database shut down Mirror disks (A' and B' in the graphic) split and connected to backup server using: Split command scenario: split_cmd SPLITINT scenario: SPLITINT program 3 4 5 Tablespaces reset to normal status Production database restarted Mirror disks backed up on backup host Optional: Primary and mirror disks resynchronized using: Split command scenario: resync_cmd SPLITINT scenario: SPLITINT program Consider online split mirror disk backup if high availability is an important consideration for your system." The BRBACKUP command option takes priority.

see -t|-type [Page 373]. When complete. BRBACKUP then performs the following steps: . 8. 1.. 3.3 Approach to Oracle DBA 3. BRBACKUP starts the actual backup (for example. 4. It is optional and only needs to be executed if the setting in init<DBSID>. see -t|-type [Page 373].sap.com/dbaora → Media Library → Backup and Recovery See also: Split Mirror Backup: Software Configuration [Page 147] April 2004 145 . BRBACKUP calls SPLITINT without setting the tablespaces to backup status. 1.. it takes the tablespaces out of backup status. When complete. 5. Sets the tablespaces to be backed up to BACKUP status using: ALTER TABLESPACE <tablespace name> BEGIN BACKUP. For more information. SPLITINT Scenario You start BRBACKUP on the backup host using the following command : brbackup -t online_mirror For more information. Resynchronization (the next step) occurs after the actual backup (for example. Resets the tablespaces to the normal status using: ALTER TABLESPACE <tablespace name> END BACKUP. When BRBACKUP receives the message.4 Database Backup For more information. BRBACKUP cleans up and terminates. 6. 2. When BRBACKUP receives the message. with BACKINT) has finished.. 2. 7. BRBACKUP and SPLITINT then perform the following steps: . SPLITINT prepares the split.sap is split_resync [Page 517] = yes. see the documentation BC-BRS SPLITINT Interface for Oracle Databases. SPLITINT executes the split. synchronizes the mirror disks with the originals. Splits the mirror disks using split_cmd [Page 517]. SPLITINT performs the resynchronization and sends a success message before returning control to BRBACKUP. with BACKINT). SPLITINT completes the split and sends a success message before returning control to BRBACKUP. Backs up the mirror disks. SPLITINT sends a message to BRBACKUP. SPLITINT sends a message to BRBACKUP.. 5. If you have set resync_cmd [Page 517]. 3. 4. 9. it sets the tablespaces to backup status. which you can find on SAP Service Marketplace at: service.

you can enter the BRBACKUP command option -t|-type as shown below in "Activities. it is considerably faster than a normal offline backup.. BRBACKUP and SPLITINT then perform the following steps: .4 Database Backup Split Mirror Offline Backup Use This section describes how you can use BRBACKUP [Page 359] to perform a split mirror [Page 142] offline backup with your Oracle database.. Therefore. 2. When complete. If you have set resync_cmd [Page 517]. 3.3 Approach to Oracle DBA 3.. 146 April 2004 . 1. Prerequisites You set the following parameters in the initialization profile init<DBSID>." The BRBACKUP command option takes priority. 1. Restarts the database on the production host. in order to guarantee the consistency of the database for an offline backup. SPLITINT Scenario You start BRBACKUP on the backup host using the following command : brbackup -t online_mirror For more information. Backs up the mirror disks offline on the backup host. BRBACKUP then performs the following steps: . SPLITINT prepares the split. BRBACKUP calls SPLITINT without stopping the database.sap [Page 488]: • backup_type [Page 494] Split command scenario: backup_type = offline_split SPLITINT scenario: backup_type = offline_mirror Instead of backup_type. 4. 5. Shuts down the database on the productive host. synchronizes the mirror disks with the originals. In an offline backup the database is shut down to split the mirror disks. see -t|-type [Page 373]. in which the database is shut down for the duration of the entire backup. so that it is again available for the SAP System.. Splits the mirror disks using split_cmd [Page 517]. SPLITINT sends a message to BRBACKUP. see -t|-type [Page 373]. 2. • • Split command scenario: split_cmd [Page 517]and resync_cmd [Page 517] SPLITINT scenario: split_options [Page 517]and split_resync [Page 517] Activities Split Command Scenario You start BRBACKUP on the backup host using the following command : brbackup -t offline_split For more information.

When BRBACKUP receives the message.sap. SPLITINT performs the resynchronization and sends a success message before returning control to BRBACKUP. For more information. 4. The Oracle home directory structure must correspond to the SAP standard installation required by BRBACKUP. Resynchronization (the next step) occurs after the actual backup (for example. 9. When complete. with BACKINT) has finished. SPLITINT executes the split. with BACKINT). When BRBACKUP receives the message. see the documentation BC-BRS SPLITINT Interface for Oracle Databases. which you can find on SAP Service Marketplace at: service. 6. SPLITINT completes the split and sends a success message before returning control to BRBACKUP. SPLITINT sends a message to BRBACKUP. It is optional and only needs to be executed if the setting in init<DBSID>. it stops the database. BRBACKUP starts the actual backup (for example.sap is split_resync [Page 517] = yes. BRBACKUP cleans up and terminates.3 Approach to Oracle DBA 3.4 Database Backup 3. Default Directories UNIX Windows $ORACLE_HOME/dbs $ORACLE_HOME/bin $SAPDATA_HOME/sapbackup $SAPDATA_HOME/saparch $SAPDATA_HOME/sapreorg $SAPDATA_HOME/sapcheck $SAPDATA_HOME/saptrace %ORACLE_HOME%\DATABASE %ORACLE_HOME%\BIN %SAPBACKUP% %SAPARCH% %SAPREORG% %SAPCHECK% %SAPTRACE% April 2004 147 .com/dbaora → Media Library → Backup and Recovery See also: Split Mirror Backup: Software Configuration [Page 147] Split Mirror Backup: Software Configuration This section describes the software configuration for split mirror backup [Page 133]: • • At least the client software and SQLPLUS components of the Oracle database software must be installed on the backup server. 8. it restarts the database. 7. 5.

BRBACKUP tries to copy the control files to the backup server using the rcp or ftp command – depending on the value of stage_copy_cmd [Page 517] – and the host name for the HOST_NAME field of the V$INSTANCE view. BRCONNECT. You can mount the database files on the backup host in a different SAPDATA_HOME directory by using the init<DBSID>. change the password for the system user: SQL> alter user system identified by <password>. Set the backup_type [Page 494] parameter in the init<DBSID>. To establish the connection between the backup server and the production server. Profile Parameters and Command Options for init<DBSID>.sap profile to offline_split |online_split|offline_mirror|online_mirror. you must perform the following steps: Create an Oracle password file: orapwd file=<ORACLE_HOME>/dbs/orapw<DBSID> password=<SYS password> entries=100 Set the remote_login_passwordfile parameter to exclusive in all init<DBSID>.ora profiles. • Make sure that the directory /usr/sap/<SAPSID>/SYS/exe/run or \\<Host name>\sapmnt\<SAPSID>\SYS\exe\run is accessible from the backup server and that it contains at least the programs BRBACKUP. the standard remote connection using the instance string specified in the primary_db [Page 508] parameter is sufficient. • • • The Oracle and BRBACKUP profiles should be available in $ORACLE_HOME/dbs or %ORACLE_HOME%\DATABASE. Alternatively. The SYSOPER authorization and the password file are only required to stop the primary database for the offline split.sap parameter orig_db_home [Page 507]. you must define the profile parameter primary_db [Page 508] for the SQLNET connection. you can use Network File Systems (NFS) to mount the sapbackup directory from the production server to the backup server. Normally make sure that the paths of all database files accessed by the production database and backup database are identical.3 Approach to Oracle DBA 3. see SAP Note 156704. although this is not absolutely essential. If needed. Start SQLPLUS as user SYS and execute the following Oracle command: SQL> connect / as sysdba SQL> grant sysoper to system. Before this. and BRTOOLS (and optionally other BR programs). For an online split.sap 148 April 2004 . Give the system user SYSOPER authorization in the production database.4 Database Backup BRBACKUP must be able to access the control files on the backup server created by the SQL command alter database backup controlfile to <filename> on the production server. By using this parameter you can even mount the split-off files on the same host. For more information. The manufacturer of the external backup tool should install and configure the BACKINT interface on the backup server.

Your SPLITINT vendor can you tell you how to set them.4 Database Backup Make sure that the following parameters are set in the initialization profile init<DBSID>. resync_cmd [Page 511] = "<resync_cmd> [$]" <resync. If the command is not successful.sap profile. This command line option overrides the backup type set in the backup_type parameter in the init<DBSID>. Only messages beginning with #INFO are accepted. an exit code of 0 is returned. these are the only messages not interpreted as error messages.ora. • primary_db [Page 508] = <inst_str> <inst_str> is an instance string to the production database to connect from the backup server to the production server. • The BRBACKUP call is as follows: Split command scenario: brbackup -t|type online_split Online backup of mirror disks brbackup -t|type offline_split Offline backup of mirror disks SPLITINT scenario: brbackup -t|type online_mirror Online backup of mirror disks brbackup -t|type offline_mirror Offline backup of mirror disks For more information.sap [Page 488]: • • backup_type [Page 494] = offline_split|online_split|offline_mirror|online_mirror Split command scenario using offline_split or online_split: split_cmd [Page 517] = "<split_cmd> [$]" <split_cmd> is a program or shell script called by BRBACKUP to split the mirror disks.3 Approach to Oracle DBA 3. BRBACKUP does not perform the resynchronization. • SPLITINT scenario using offline_mirror or online_mirror: split_options [Page 517] = “<split_options>” This defines the additional options used to call SPLITINT.cmd> is a program or shell script called by BRBACKUP to resynchronize the mirror disks. that is. If this parameter is not set. BRBACKUP replaces the optional character $ with the name of the text file that contains the names of all files to be split or resynchronized. The connections are defined in the Oracle configuration file tnsnames. At runtime. see -t|-type [Page 373]. split_resync [Page 517] = no|yes This controls whether the mirror disks should be resynchronized immediately after the backup has finished. April 2004 149 . a return code of > 0 is returned as well as messages describing the cause of the error. If split_cmd/resync_cmd is completed successfully.

jukeboxes. Activities You can set the parameters from the above table in either of the following ways: • • In the backup_dev_type [Page 490]parameter of the Initialization Profile init<DBSID>. for your Oracle database.4. see Mount and Dismount Commands [Page 150].4 Database Backup 3. This additional time can be taken into account by adjusting rewind_offline [Page 512]. BRBACKUP [Page 359] or BRARCHIVE [Page 382] does the following: .sap [Page 488] In the -d|-device [Page 366]command option of BRBACKUP (this overrides the initialization profile) Some devices with automatic tape changing require additional time to change the tape.3 Approach to Oracle DBA 3.4 Use Backup with Automatic Tape Changers In addition to standard backups to local disks or tapes. or tape robots. such as jukeboxes or tape robots.6. Features The following table shows the types of backup supported by BRBACKUP: Backup type Parameter Local disks Local tape devices with manual tape swapping Remote tape devices with manual tape swapping Automatic sequential tape swapping: autochangers or autoloaders Fully automatic tape swapping: jukeboxes or tape robots Local tape devices Remote tape devices Local tape devices Remote tape devices disk tape pipe tape_auto pipe_auto tape_box pipe_box The following commands are used to define automatic mounting and dismounting of tapes in the backup device: • • mount_cmd dismount_cmd These commands enable you to administer hundreds of tapes in jukeboxes and autoloaders.. autoloaders. such as autochangers. To do this. For more information. you can enter a command like the following: rewind_offline = "mt -t $ offline && sleep 60" See also: Autoloader Backup Example [Page 152] Mount and Dismount Commands The mount and dismount commands are relevant if you use automatic tape changers [Page 150]. 150 April 2004 .. BRBACKUP [Page 359] supports several types of Oracle backup with automatic tape changers.

Then they call the command defined in dismount_cmd [Page 502]to automatically dismount the tapes. those for which the expiration period has finished) can be mounted. 2. The mount and dismount commands used in most implementations require special control drivers. In this case. Which of the available tapes is mounted is decided by the mount command... In this case any tapes from this list can be mounted on the given tape devices.] where <dev_addr> is the driver address of the tape unit One or more of the tape devices defined in the parameter tape_address_ctl [Page 523] can be addressed. on which the mount or dismount operations are to be performed..]|SCRATCH where <tape name> is the name of the tape to be mounted The tape names are chosen from the backup volume list volume_backup [Page 528] (from BRBACKUP) or volume_archive [Page 528] (from BRARCHIVE) by the automatic tape administration. For some tape devices. The reserved tape name SCRATCH means that any unlocked tapes (that is. • <C> defines the tape names to be mounted on the tape devices given in <B>: <tape name1>[. Syntax of the commands mount and dismount commands: mount_cmd = “<mount_cmd> <A> <B> <C> [<D>]” dismount_cmd = “<dismount_cmd> <A> <B> [<D>]” The command options <A> to <D> mean the following: • <A> identifies the database to be backed up and has the following structure: <DBSID>-A <DBSID>-B for BRARCHIVE and BRRESTORE with option -a|-a1|-a2 for BRBACKUP and BRRESTORE without option -b|-b1|-b2 where <DBSID> is the Oracle system ID (that is. The dismount command is then sufficient to dismount the tapes. • <B> identifies the tape devices. the tapes might not be switched to offline mode.3 Approach to Oracle DBA 3..4 Database Backup 1. they perform the command defined in mount_cmd [Page 504]to automatically mount the tapes. which are defined in the parameters tape_address_ctl [Page 523] or tape_address_ctl_arch [Page 524]. the database instance) This option can be used to identify a subset of tapes (“sub-pool”) for database backup.<dev_addr2>. When the backup has finished. The assignment of the tapes on the tape devices can be defined freely by the mount command. do not set rewind_offline [Page 512].. The number of tape names can be greater than the number of driver addresses..<tape name2>. April 2004 151 . using the control driver addresses: <dev_addr1>[. The additional extension -A and -B enables you to define and administer separate tape sub-pools for BRARCHIVE and BRBACKUP. 3. BRBACKUP or BRARCHIVE switches the corresponding tape devices to offline mode. Before accessing tapes for the first time.

C11B12..csh $ $ $“ dismount_cmd = “dismount_tape. Slot 11-20: tapes C11B11... which contains additional configuration parameters for these commands.C11B20.csh: #!/bin/csh -f set_slot=`echo $3 | cut -b 5-6` mtx -d $2 -l $slot echo $slot > $SAPDATA_HOME/sapbackup/. The name of the file is defined in the mount_par_file [Page 504]paramet er or by the command option -r|parfile [Page 372].C11A10... The user must provide the mount or dismount command in the form of a program.sap might look like the following: ...3 Approach to Oracle DBA 3. During this the mtx command is used for the mounting and dismounting of the tapes. HP 48AL... An extract from the profile initC11. backup_dev_type = tape_box tape_address = /dev/rmt/0mn tape_address_rew = /dev/rmt/0m tape_address_ctl = /dev/scsi/3 mount_cmd = “mount_tape. We assume that the autoloader has 20 slots. C11A02.. Automatic tape administration is switched on. Autoloader Backup Example If you are using Backup with Automatic Tape Changers [Page 150].C11A10) volume_backup = (C11B11.....csh: #!/bin/csh -f set_slot=`cat $SAPDATA_HOME/sapbackup/.. The fifth and sixth characters of the tape name are used for the number of the slot: Slot 1-10: tapes C11A01.4 Database Backup • <D> transfers the name of a parameter file to the mount or dismount command. Procedure for a BRBACKUP backup with mount and dismount commands: 152 April 2004 . this example shows how to integrate an autoloader.slot` mtx -d $2 -u $slot echo $slot > $SAPDATA_HOME/sapbackup/...... The successful completion of the command is indicated by the exit code 0 and the absence of any output (except for lines starting with #INFO).... C shell script mount_tape. The backup of the database C11 with BRBACKUP and the backup of the offline redo log files each require one tape.slot These scripts must be executable and be located in the directory /usr/sap/C11/SYS/exe/run. into the backup strategy for BRBACKUP [Page 359] or BRARCHIVE [Page 382].C11A02. The configuration of the mount and dismount commands is your complete responsibility. Consult your hardware partner if in doubt..C11B20) . shell script or a batch file...csh $ $“ volume_archive = (C11A01.slot C shell script dismount_tape... C11B12..

csh C11-B /dev/scsi/3 In this script the following mtx command is executed: mtx -d /dev/scsi/3 -u 11 This command dismounts the current tape and returns it to slot 11. such as to perform parallel backups on several tapes. The BRARCHIVE backup procedure is similar to the BRBACKUP backup described here... or to backup several databases and form sub-pools for these in a tape robot. If the command is performed without an error message and with exit code 0. For simplification neither the first option (ORACLE-SID) nor the last option (mount_par_file) of the mount or dismount command has been used in the example described here.. • April 2004 153 . BRBACKUP assumes that the tape has been mounted successfully. without BACKINT). In addition. After a tape label check.5 Use Veritas Quick I/O Feature BRBACKUP [Page 359] and BRRESTORE [Page 395] now support the Veritas Quick I/O feature. In this case. Unlike the raw disks. C11B11) from the backup volume list. BRBACKUP starts the backup to the tape.C11A10 is chosen from the slots 1-10. Internally the mount command is called up to mount the chosen tape in the tape device: mount_tape.4.4 Database Backup After BRBACKUP is started. Features • The Veritas Quick I/O files are automatically recognized by BRBACKUP and marked in the detail log (see QIO flag in messages BR118I.csh C11-B /dev/scsi/3 C11B11 In this script the following mtx command is executed: mtx -d /dev/scsi/3 -l 11 This command causes the tape to be mounted from the 11th slot in the tape device. They were saved with dd command (if no BACKINT was used) with block size equal to Oracle block size. a tape C11A01.6. to local disks using cp or dd or using rcp or sapftp onto remote disks. the files are copied to local and remote tape units using dd.3 Approach to Oracle DBA 3. Up to now BRBACKUP and BRRESTORE considered the Veritas Quick I/O files to be raw disks. In native BRBACKUP backups (that is. using backup_dev_type [Page 490] = stage.. After the backup has finished the tape is again dismounted in the tape device: dismount_tape. BR119I and BR120I). the automatic tape administration of BRBACKUP chooses a tape (for example. 3. This is the basis for processing these files through BRRESTORE. the files had to be created manually before BRRESTORE was started. This could cause performance disadvantages. the block size for the dd command can be set to any value using parameters dd_flags [Page 501] and dd_in_flags [Page 501].. You can make use of these options in more demanding scripts or programs.

Features By using external backup programs you gain the following advantages: • You can use new.data1::cdev:vxfs: • Quick I/O files can be created with relative links.6 Use External Backup Programs The SAP tools BRBACKUP [Page 359]. tasks are distributed as follows: 154 April 2004 . the SAP tools do not support direct backup to or restore from optical storage media.data1 -> . the "cdev" names are transferred to BACKINT with complete path. as in the following example. manufacturer-specific backup media.ddici. • • Activities If you use this interface. BRARCHIVE [Page 382]. You can only use this interface if the BACKINT interface program is supported by the supplier of the external backup program. For example. You can set up a consistent backup procedure for file systems and databases. • BRRESTORE creates the Quick I/O files automatically before data is actually restored. and BRRESTORE [Page 395] provide an interface called BACKINT that can be used to access external backup programs. However. for backup with an automatic tape changer [Page 150].ddici. 3. Many backup programs are not hardware-specific and can be used in a network. you can use such media with an external backup program using the BACKINT interface.4. as in the examples above.4 Database Backup • In BRBACKUP with BACKINT. you can use any BACKINT program (not only NetBackup by Veritas) for the database backup. /oracle/DCA/sapdata13/ddici_1/.data1::cdev:vxfs: We recommend you to usually adhere to the SAP standard naming convention for normal files. as in the following example: /oracle/DCA/sapdata13/ddici_1/ddici. Therefore. for example.6.3 Approach to Oracle DBA 3.

3 Approach to Oracle DBA 3.utl For more information.4 Database Backup Database files Oracle database Offline redo log files SAP tool BRBACKUP BRARCHIVE BRRESTORE BRRECOVER Interface program BACKINT BACKINT BACKINT BACKINT External backup / restore program External BACKUP server Media The graphic shows that: • • • BRBACKUP or BRARCHIVE does the database handling. see the SAP Service Marketplace at the following Internet address: service. see backup_dev_type [Page 490] and util_par_file [Page 527]. This request contains a list of the files for backup. The external backup program manages the backup media.com/partners April 2004 155 .sap. BRBACKUP or BRARCHIVE uses BACKINT to pass a backup request to the external backup program. BRRESTORE also uses BACKINT to trigger the external program to restore the requested files. The external backup program performs all the backup operations. • BRBACKUP. Use the following settings in the initialization profile init<DBSID>. For more information about SAP partners that support the interface to external backup programs. for example: util_par_file = initC11. or BRRESTORE evaluates the confirmation messages of the external backup program. Any parameters that are passed are contained in a parameter file that you define.sap [Page 488]: Device type: backup_dev_type = util_file|util_file_online Parameter file. BRARCHIVE.

Repeat this regularly. The business costs of an incorrect or delayed recovery can easily outweigh consultancy fees. If in doubt. Always analyze the problem carefully before attempting to recover your database. seek support from SAP. We strongly recommend you to practice restore and recovery on a test system as similar as possible to your production system.3 Approach to Oracle DBA 3.5 Restore and Recovery 3.5 Use Restore and Recovery This section helps you to develop an approach to restore and recover of your Oracle database in the event of failure. 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 Integration You use the following tools for database restore and recovery: Tool Use Restore and Recovery with BR*Tools [Page 295] Restore and recovery with the BR*Tools user interface 156 April 2004 . especially after you have modified the production system.

which are very important for the restore because they contain all the information about the backups. or the required offline redo log files made with BRBACKUP [Page 359] or BRARCHIVE [Page 382]. You might also need to meet other prerequisites. depending on the context of the recovery. The BRBACKUP logs [Page 375] and BRARCHIVE logs [Page 391]. you need to perform Disaster Recovery [Page 175]. 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. volumes. BRRESTORE.5 Restore and Recovery BRRESTORE [Page 395] BRRECOVER [Page 407] SQLPLUS [Extern] Oracle Recovery Manager (RMAN) [Extern] – integrated with BRBACKUP and BRARCHIVE 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 Prerequisites Before you start to restore and recover your database. try to locate: • • The backups of the missing or faulty data files. or BRRECOVER as necessary to complete the task you have chosen. and timestamps. when the entire database is lost. including backup profiles and logs Activities You can perform restore. and recovery tasks from either of the following: • The menus in BR*Tools BR*Tools calls the tools BRBACKUP. using backups of the offline redo log files to roll forward the lost transactions. April 2004 157 . • Recovery BRRECOVER recovers transactions lost since the database backup. BRRECOVER recovery is not based on BRBACKUP or BRARCHIVE logs in database tables. using backups of the database files. including such items as the BRBACKUP and BRARCHIVE logs and profiles. If you lose the entire database system. BRRECOVER supports database recovery after: Media errors. such as directories. because these tables are not available when you recover the database. BRARCHIVE. Features • Restore BRRESTORE restores data files that have been damaged or are missing. BRRECOVER uses the logs to find the backups of the data files and the offline redo log files.3 Approach to Oracle DBA 3.

If a media error has occurred. check the: Database alert log Trace files belonging to the background processes in the directory $ORACLE_HOME/saptrace/background. Complete Database Recovery [Page 159] Database Point-In-Time Recovery [Page 162] Tablespace Point-in-Time Recovery [Page 165] Whole Database Reset [Page 169] • Error in which all copies of redo log files are lost.. and you have enough time. you can use the tools BRBACKUP.5 Restore and Recovery • The command line In this way. 4. but the database file backup is available You performed a complete or incremental offline or consistent • 158 April 2004 .. BRRESTORE. or BRRECOVER. BRARCHIVE. To analyze the problem. If a user error has occurred. You want to reset the database to the state it was in at the most recent offline or consistent online backup. perform a complete [Page 89]. control files. Decide what kind of restore and recovery you want to perform: Scenario Aim Solution Media error such as a disk crash User or software error User or software error within one component of a multicomponent database Either of the following applies: You want to recover to the time of failure You want to recover to a selected point in time You want to recover the affected component to a selected point in time. is software or hardware mirroring available? Do you have a standby database [Page 133]? 3. 5. you must replace the affected equipment and recreate the file system as it existed before the error. offline backup [Page 87] before starting to restore and recover the database. We recommend you to use the DBA Planning Calendar for routine backup because this enables you to automatically schedule the backup. Proceed as follows to restore and recover your database: . the database is still available. see Error Analysis [Page 539]. but this requires expert knowledge. We recommend you to use the BR*Tools menus for restore and recovery because BR*Tools guides you through the necessary steps. For more information. 1.3 Approach to Oracle DBA 3. Ask yourself the following questions: 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. online redo log files? If a media error has occurred. 2.

including backup profiles and logs You want to recover as much as possible Disaster Recovery [Page 175] Only if you are very experienced. see Complete Database Recovery with BR*Tools [Page 296].5. You normally do this after a media error.dba and init<DBSID>.5 Restore and Recovery online backup immediately before the error. This section discusses how to approach complete database recovery. you might want to consider the following in an exceptional situation: • Restore of individual backup files [Page 171] • Restore and application of offline redo log files [Page 174] Be sure to consult SAP Support first if you are unsure about using these functions. either as originals or backups. 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.3 Approach to Oracle DBA 3.1 Use Complete Database Recovery This section tells you about restoring damaged or lost data files after a failure in your Oracle database. For more information on how to perform a complete database recovery. such as during a software upgrade. Restore lost data files by using appropriate backups 2. If you want to perform a point-in-time recovery – that is. such as a disk crash. 1.ora BRBACKUP Logs [Page 375] and BRARCHIVE Logs [Page 391] Restore from backup as described in Disaster Recovery [Page 175].. Loss of entire database system. The table shows what you must do if the files are not available: Missing File Type Solution if Unavailable init<DBSID>. Restore from backup as described in Disaster Recovery [Page 175]. a recovery to some time other than the time of failure – see: • • Database point-in-time recovery [Page 162] Tablespace point-in-time recovery [Page 165] Prerequisites To finish complete recovery. you must have the files shown in the following table. 3. and then recovering the database to the time of failure. Integration This function performs a complete recovery to the time of failure.. With this function you can: . April 2004 159 .

3 Approach to Oracle DBA 3. Features The following graphic shows how a complete recovery works: Detail logs back<DBSID>. if needed Determine offline redo log files needed Restore offline redo log files Apply Open offline redo database log files saparch BRRECOVER Database Activities . perform a whole database reset [Page 169] from an offline backup or an online consistent backup. Otherwise. use ALTER DATABASE to drop and recreate the group.log Check status of database files Select database backup Restore data files Apply incremental backup.. use one of the following: • • Online redo log files Database point-in-time recovery [Page 162] Whole database reset [Page 169] Copy one of the redo log file mirrors if available. Perform database point-in-time recovery [Page 162] to the most recent available redo log file. 1..log arch<DBSID>. use one of the following: • • Database files Offline redo log files Database point-in-time recovery [Page 162] Whole database reset [Page 169] These files are automatically restored and recovered during complete database recovery. Check the Status of Database Files phase 160 April 2004 . If none is available. If the non-current redo log group is involved.5 Restore and Recovery Control files Copy one of the control file mirrors if available. If the current group is involved.

) b.. 3. such as v$datafile. If you have more than 100 files to apply. online redo log files. 4. BRRECOVER also roughly checks the availability of offline redo log files. BRRECOVER logs any recorded errors in data files to the detail log created in the sapbackup directory with the crv suffix (for complete recovery. Determine Offline Redo Log Files Needed phase BRRECOVER determines the offline redo log files required for a complete recovery. The BRARCHIVE summary log file arch<DBSID>. BRRECOVER stops the database instance if started and sets the database to mount status. v$recover_file to determine the status of database files. The associated detail logs show whether the required data files were in the backup. To minimize the subsequent recovery time. However. Offline redo log files are applied to the database in groups of at most 100 files. BRRECOVER does the following: . 5. the restore and apply phases are repeated as necessary. BRRECOVER takes existing online redo log files and offline redo log files in saparch or saparch into consideration. BRRECOVER refers to entries in Oracle's v$ views. BRRECOVER automatically selects the corresponding full backup to restore missing files. April 2004 161 ..3 Approach to Oracle DBA 3. 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. BRRECOVER does not create missing sapdata directories automatically. 2. a. BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup. BRRESTORE automatically creates missing subdirectories during the Restore Data Files phase. The restore and apply phases can be executed in parallel to minimize total recovery time. Open Database phase During this phase BRRECOVER: . The data files can be compiled from various backups. In this case. To update the v$ views. 8. 7. so they must exist beforehand. You can also select an incremental backup to be restored before applying offline redo log files. c. Restore Data Files phase BRRECOVER calls BRRESTORE to restore the data files to their original location. Apply Offline Redo Log Files phase BRRECOVER calls SQLPLUS to apply offline redo log files to the database. Apply Incremental Backup phase If you selected an incremental backup during the Select Database Backups phase.log (return code 0 or 1).5 Restore and Recovery BRRECOVER checks the status of all files in the database (that is. and data files). BRRECOVER always suggests the most recent backup.. Select Database Backup phase BRRECOVER determines the eligible backups using the entries in the BRBACKUP summary log file back<DBSID>.. the control files.log lists the backups of the offline redo log files. 6.

Checks the status of database files and tablespaces 3. For more information on how to perform a database point-in-time recovery. Prerequisites • We recommend you to: Perform a full offline or online backup [Page 87]. If the database is running.2 Use Database Point-In-Time Recovery You can use this function to fully restore and then recover your Oracle database to a specified point in time (PIT). For more information. see Database Point-In-Time Recovery with BR*Tools [Page 297]. a user or software error – and you want to recover the database to the point immediately before the error. see a|-archive [Page 384]. You normally use this function when there has been a logical error – that is. control – might be unavailable on disk. Opens the database b. online redo.5. Back up all offline redo log files using BRARCHIVE.5 Restore and Recovery a. Features The following graphic shows how database point-in-time recovery works: 162 April 2004 . In this way. you minimize lost data. This section discusses how to approach database point-in-time recovery.3 Approach to Oracle DBA 3. use SAP tools. otherwise use operating system tools. • You must have the following data available: The BRBACKUP logs [Page 375] and the BRARCHIVE Logs [Page 391] 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.

log files files if needed if needed needed Restore offline redo log files Apply offline redo log files Open database saparch BRRECOVER Database Activities .5 Restore and Recovery arch<DBSID>. BRRECOVER automatically selects the corresponding full backup to restore all data files.. April 2004 163 . 3. Check Status of Database Files phase BRRECOVER checks the status of database files to determine which will be overwritten. 1.log (return code 0 or 1). You can also select an incremental backup to be restored before applying offline redo log files. BRRECOVER always suggests the most recent backup. Set Point In Time for Recovery phase You enter the recovery end-point in BRRECOVER by choosing one of the following: Point in time Redo log sequence number System change number 2. The associated detail logs show whether the required data files were in the backup..log Detail logs back<DBSID>. BRRECOVER also roughly checks the availability of offline redo log files.3 Approach to Oracle DBA 3. In this case. Select Database Backup phase BRRECOVER determines the eligible backups using the entries in the BRBACKUP summary log file back<DBSID>. 4. To minimize the subsequent recovery time. that is. The data files can be compiled from various backups.log Set point in time for recovery Select database backup Check status of database files Restore Apply Determine Restore control incremental offline redo all data files backup. Restore Control Files phase BRRECOVER calls BRRESTORE to restore control files if needed. if they are unavailable or unsuitable for the selected backups.

Checks the status of database files and tablespaces d. 8. 9. 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 164 April 2004 . the restore and apply phases are repeated as necessary. The restore and apply phases can be executed in parallel to minimize total recovery time. 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.log lists the backups of the offline redo log files. BRRECOVER takes existing online redo log files and offline redo log files in saparch or oraarch into consideration. Apply Incremental Backup phase If you selected an incremental backup during the Select Database Backups phase. Opens the database with the option RESETLOGS b. 6..5 Restore and Recovery 5. a. Creates missing temporary files c. 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. If you have more than 100 files to apply. Restore Data Files phase BRRECOVER calls BRRESTORE to restore all the data files to their original location. 10. 7. 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.3 Approach to Oracle DBA 3. Offline redo log files are applied to the database in groups of at most 100 files.. Open Database phase During this phase BRRECOVER: .

or offline) 1 Logical error for example.3 Approach to Oracle DBA 3. 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 Complete backup (on.or offline) Logical error for example. You normally use this function when there has been a logical April 2004 165 . deleted table Structure of the database changed .5 Restore and Recovery 1 Complete backup (on.5.3 Use 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). 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> 3.for example.

see Tablespace Point-In-Time Recovery with BR*Tools [Page 299]. For more information.3 Approach to Oracle DBA 3.5 Restore and Recovery error – that is. you minimize lost data. Tablespace PIT recovery is especially useful for Multiple Components in One Database (MCOD). It lets you restore the tablespaces for a single component – for example. In this way. use SAP tools. Prerequisites • We recommend you to: Perform a full offline or online backup [Page 87]. If the database is running. a user or software error – 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. • You must have the following data available: The BRBACKUP logs [Page 375] and the BRARCHIVE logs [Page 391] 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. Back up all offline redo log files using BRARCHIVE. if a component upgrade has failed – without affecting the other components in the same database. otherwise use operating system tools. see a|-archive [Page 384]. For more information on how to perform a tablespace point-in-time recovery. Features The following graphic shows how tablespace point-in-time recovery works: 166 April 2004 .

The data files can be compiled from various backups.. log files spaces if needed needed to be recovered saparch Open database and plug in exported tablespaces BRRECOVER Database Activities .log (return code 0 or 1). BRRECOVER always suggests the most recent backup. In this case.5 Restore and Recovery arch<DBSID>. BRRECOVER also roughly checks the availability of offline redo log files. To minimize the subsequent recovery time. 1. Check Tablespace Status phase BRRECOVER checks if the: April 2004 167 . 3. The associated detail logs show whether the required data files were in the backup. 2.. You can also select an incremental backup to be restored before applying offline redo log files.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. Set Point In Time and Tablespaces for Recovery phase You enter the recovery end-point in BRRECOVER by choosing one of the following: 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 multicomponent database. BRRECOVER automatically finds tablespaces containing segments belonging to this owner. Select Database Backup phase BRRECOVER determines the eligible backups using the entries in the BRBACKUP summary log file back<DBSID>.log Detail logs back<DBSID>. BRRECOVER automatically selects the corresponding full backup to restore all data files.3 Approach to Oracle DBA 3.

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 EXP tool. Offline redo log files are applied to the database in groups of at most 100 files. including the SYSTEM and rollback tablespaces. BRRECOVER takes existing online redo log files and offline redo log files in saparch or oraarch into consideration. BRRECOVER calls SQLPLUS to apply offline redo log files to the database. Creates missing temporary files c. Apply Offline Redo Log Files phase Before applying the offline redo log files. 6. 8. The restore and apply phases can be executed in parallel to minimize total recovery time.5 Restore and Recovery 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. a. 9. Determine Offline Redo Log Files Needed phase BRRECOVER determines the offline redo log files required for a recovery. Apply Incremental Backup phase Before applying an incremental backup. Restore Data Files of Tablespaces to Be Recovered phase BRRECOVER calls BRRESTORE to restore data files of the tablespaces to be recovered. Temporarily drops exported tablespaces from the database. If you have more than 100 files to apply. BRRECOVER sets the data files of the exported tablespaces to OFFLINE. Imports meta data of exported tablespaces using the Oracle IMP tool. Opens the database with the option RESETLOGS b. Sets imported tablespaces to READ/WRITE. Therefore. 4. 7.. 5. placing them in their original location. d. f. If you selected an incremental backup during the Select Database Backups phase. 10.3 Approach to Oracle DBA 3.. the restore and apply phases are repeated as necessary. The BRARCHIVE summary log file arch<DBSID>. 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. these tablespace are not recovered. if not yet done. Open Database and Plug In Exported Tablespaces phase During this phase BRRECOVER: . BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup. Checks the status of database files and tablespaces 168 April 2004 .log lists the backups of the offline redo log files. BRRECOVER sets the data files of exported tablespaces to OFFLINE. e.

see Whole Database Reset with BR*Tools [Page 300].3 Approach to Oracle DBA 3. You have the following data available: The BRBACKUP logs [Page 375] The data file backups and.5 Restore and Recovery g. otherwise use operating system tools. For more information on how to perform a whole database reset. If the database is running. With this function you can reset the database to a previous consistent state.4 Use Whole Database Reset This section tells you about resetting your Oracle database after a failure. This section discusses how to approach whole database reset.5. but the database file backup is available. Prerequisites • • We recommend you to perform a full offline backup [Page 87]. an incremental backup If restoring from a consistent online backup. the consistent end point of the backup is used. at the time of either a complete offline or a consistent online backup. the accompanying redo log files that were saved in the same BRBACKUP run Any types of database files – data. if selected. use SAP tools. If you reset from an online backup. You performed a complete offline backup or a consistent online backup immediately before the error. Deletes unnecessary files that are no longer used by the database 3. 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. Features The following graphic shows how a whole database reset works: April 2004 169 . online redo log. control – might be unavailable on disk. such as during a software upgrade.

1.3 Approach to Oracle DBA 3.5 Restore and Recovery Detail logs back<DBSID>. Apply Incremental Backup phase If you selected an incremental backup during the Select Database Backups phase. if needed Open database BRRECOVER Database Activities . At the same time.log Select database backup Check status of database files Restore control files and offline redo log files Restore data files Apply incremental backup. Restore Control Files and Offline Redo Log Files phase BRRECOVER calls BRRESTORE to restore control files. Check Status of Database Files phase BRRECOVER checks the status of database files to determine which files will be overwritten. You can also select an offline or consistent online incremental backup to be restored before applying offline redo log files. 2. Restore Data Files phase BRRECOVER calls BRRESTORE to restore all the data files to their original location. if needed Apply offline redo log files.log (return code 0 or 1)... Select Database Backup phase BRRECOVER determines the eligible backups using the entries in the BRBACKUP summary log file back<DBSID>. BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup. Apply Offline Redo Log Files phase 170 April 2004 . To minimize the subsequent recovery time. The associated detail logs show whether the required data files were in the backup. 5. 3. The selected backup must be a complete offline or a consistent online backup. BRRECOVER always suggests the most recent backup. 4. 6. In this case. offline redo log files are restored if a consistent online backup was selected. BRRECOVER automatically selects the corresponding full backup to restore all data files.

Creates missing temporary files c.5.. If the database is running. see Restore of Individual Backup Files with BR*Tools [Page 301]. For more information on how to perform a restore of individual backup files. use SAP tools.5 Use Restore of Individual Backup Files You can restore individual backups files to your Oracle database.3 Approach to Oracle DBA 3. so make sure you fully understand how it works before using it.5 Restore and Recovery If a consistent online backup was selected. otherwise use operating system tools.. This section discusses how to approach the restore of individual backup files. This is intended for experts. 7. Deletes unnecessary files which are no longer used by the database 3. Prerequisites • • We recommend you to perform a full offline or online backup [Page 87]. Open Database phase During this phase BRRECOVER: . Opens the database b. You must have the following data available: The BRBACKUP logs [Page 375] when restoring from a BRBACKUP backup or an incremental backup The data file backups and an incremental backup if required Features The following graphic shows how restore of individual backup files works: April 2004 171 . Checks the status of database files and tablespaces d. a. BRRECOVER calls SQLPLUS to apply the restored offline redo log files to the database.

5 Restore and Recovery Restore files from a BRBACKUP backup Detail logs Restore individual files from tape Restore individual files from disk back<DBSID>.log Select backup files for restore Restore specified file Select incremental backup from BRBACKUP run list Restore and apply incremental backup BRRECOVER Database 172 April 2004 .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>.3 Approach to Oracle DBA 3.

Select BRBACKUP run phase You select a BRBACKUP run from the backup list. April 2004 173 .. Restore individual files from tape a.5 Restore and Recovery Activities You can perform the following functions to restore individual backup files: • . Restore selected files phase BRRECOVER calls BRRESTORE to restore the selected files. b. Restore files from a BRBACKUP backup a. the BACKINT backup ID and optionally the restore destination. Restore the file phase To restore the file. Restore the file phase BRRECOVER calls BRRESTORE to restore the specified file. You can specify not only database files but also non-database files and directories or offline redo log files. Restore the file phase BRRECOVER calls BRRESTORE to restore the specified file..... which then calls BACKINT. Select incremental backup phase You select an incremental BRBACKUP run from the backup list.. You must specify the file position on tape and the restore destination. Restore individual files from disk a. 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 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. • .. BRRECOVER calls BRRESTORE.. Restore and apply incremental backup a. You can select a BRBACKUP run that finished with an error. b. • . Specify file for restore phase You can specify a file on a local or a remote disk. Select backup files for restore phase You select files to restore from the list of files backed up in the selected run.3 Approach to Oracle DBA 3. You can select a BRBACKUP run that finished with an error. Restore individual files from BACKINT backup a. c... • . • . b. b. You must specify the backup file name. Specify file for restore phase You can specify a file on a local or a remote tape device.

This section discusses how to approach restore and application of redo log files.5 Restore and Recovery b. use SAP tools. 3. so make sure you fully understand how it works before using it. otherwise use operating system tools. see Restore and Application of Offline Redo Log Files with BR*Tools [Page 307]. For more information. Restore and apply incremental backup phase BRRECOVER calls BRRESTORE to restore and apply the selected incremental backup. If the database is running.5. see a|-archive [Page 384]. This is intended for experts. Prerequisites • We recommend you to: Perform a full offline or online backup [Page 87]. • You must have the BRARCHIVE logs [Page 391] available.6 Files Use Restore and Application of Offline Redo Log You can restore and apply offline redo log files – called archivelog files in the BR*Tools menus – to your Oracle database.3 Approach to Oracle DBA 3. Back up all offline redo log files using BRARCHIVE. For more information on how to perform a restore and application of redo log files. Features The following graphic shows how restore and application of individual backup files works: 174 April 2004 .

Open database (optional) If required. you can open the database after applying the offline redo log files. • . 3.. b. Restore offline redo log files phase BRRECOVER calls BRRESTORE to restore the specified offline redo log files. Apply offline redo log files phase BRRECOVER calls SQLPLUS to apply the offline redo log files.. Restore offline redo log files a.. Specify offline redo log files for restore phase You specify the offline redo log files that you want to restore. Apply offline redo log files a. • . Specify offline redo log files for application phase You specify which offline redo log files you want to apply..3 Approach to Oracle DBA 3.. b.5 Restore and Recovery 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: • .7 Use Disaster Recovery April 2004 175 .5..

Select restore device type phase You select the device to be used from the following possibilities: Local tape 176 April 2004 . This section discusses how to approach disaster recovery. For more information on how to perform disaster recovery.. 2.5 Restore and Recovery If you lose your entire Oracle database system (possibly including hardware). sapdata<x> directories – exist and are configured as before the disaster Integration You can only restore profiles and log files using this function.. and how to keep data loss to a minimum by using BRRECOVER [Page 407]. This is a preparation step for subsequent database recovery with one of the following: • • Database point-in-time recovery [Page 162] Tablespace point-in-time recovery [Page 165] Features The following graphic shows how disaster recovery works: Select restore from BRBACKUP or BRARCHIVE backup Select profiles and log files Select restore device type Specify restore parameters Restore selected profiles and log files Select detail logs for restore Restore selected detail logs BRRECOVER Profile and log directories Activities . step by step. and have not taken any special security precautions – such as setting up a Standby Database [Page 133] – then you have to recover the system as much as possible. Prerequisites • • SAP and Oracle software is correctly installed The file systems – that is. You select the BRBACKUP or BRARCHIVE backup that contains the required profiles and logs.3 Approach to Oracle DBA 3. see Disaster Recovery with BR*Tools [Page 312]. Select restore from BRBACKUP or BRARCHIVE backup. 1. This section describes how to begin reinstalling the system in the event of such a disaster.

7.3 Approach to Oracle DBA 3. see util_par_file [Page 527] Detail log from one of the following: BRARCHIVE Detail Log [Page 392] BRBACKUP Detail Log [Page 377] Summary log from one of the following BRARCHIVE Summary Log [Page 392] BRBACKUP Summary Log [Page 378] BRSPACE Summary Log [Page 442] BRSPACE Structure Change Log [Page 443] BRSPACE Parameter Change Log [Page 447] 5. Restore selected detail logs phase BRRECOVER directly restores the selected detail logs from the disk or external backup tool without calling BRRESTORE. April 2004 177 . Select detail logs for restore phase You select the detail logs that you want to restore.5 Restore and Recovery Remote tape Local disk Remote disk Backup utility 3. Restore selected profiles and log files phase BRRECOVER directly restores the selected profiles and log files without calling BRRESTORE. Select profiles and log files phase You select the profiles and log files that you want to restore from the following: Backup profile [Page 488] Oracle profile [Page 42] BACKINT / mount profile – for more information. 6. Specify restore parameters phase Depending on your choice of restore device type. You can only select logs on the selected restore device type. you specify appropriate restore parameters 4. such as a disk or external backup tool (BACKINT).

error. Action patters enable you to schedule the database system check daily. This is the same functionality as used in the DBA Planning Calendar.. You check the results using CCMS and take any necessary action: You normally use the alert monitor [Extern] to check the results of the system check. By running regular checks of the database system. or exception).3 Approach to Oracle DBA 3. You can schedule regular checks in the Computing Center Management System (CCMS) of the SAP System. 3.. One-off by using the BRCONNECT command -f check [Page 472] – recommended for non-standard checks 2.6 Purpose Database System Check This section helps you develop an approach to checking the database system. preferably daily. you configure database system check using CCMS.6 Database System Check 3. by scheduling it in the DBA Planning Calendar [Extern] – recommended for normal use We recommend you to select an action pattern [Extern] in the DBA Planning Calendar. see Database System Check with BRCONNECT [Page 451]. Process Flow . you can identify potential problems and take the necessary action. using the DBA Planning Calendar. 178 April 2004 . 1. warning. see Configuring Database System Check (Oracle) [Extern]. Prerequisites For more information on how BRCONNECT performs database system check. For a detailed technical view. You can also run checks with BRCONNECT. You choose a method to run the database system check: Regularly. see Displaying Alert Messages from Database System Check [Extern]. This includes activating or deactivating conditions and changing the threshold and severity levels (that is. For more information. If required.

see SAP Note 424243. In either case. so improving database performance. Prerequisites For more information on how BRCONNECT performs update statistics. For more information. each table is processed by a single thread. the CBO might generate inappropriate access paths (such as using the wrong index).3 Approach to Oracle DBA 3. which means that update statistics runs in non-parallel – that is. You can schedule the checks in the Computing Center Management System (CCMS) of the SAP System. several hundred GB). Update statistics supports partitioned tables. it uses the rulebased optimizer. resulting in poor performance.0. For more information. see SAP Note 403713. using the DBA Planning Calendar. see SAP Note 408532. The Oracle cost-based optimizer (CBO) uses the statistics to optimize access paths when retrieving data for queries. DBMS_STATS Package There is a parallel processing option in this package that considerably reduces run times for very large tables (that is.7 Purpose Update Statistics By running update statistics regularly. From Release 4. You can use both the above types of parallel processing in the same BRCONNECT run.7 Update Statistics 3. the database system uses the cost-based optimizer. If the statistics are out-of-date. the degree of parallelism – to 4. you make sure that the database statistics are up-todate. • Oracle table monitoring With this feature. the CBO is a standard part of the SAP System.sap file Here are some examples: brconnect -c -u / -f stats -p 4 stats_parallel_degree = 4 Each of these sets the number of threads – that is. entering the results in the DBA_TAB_MODIFICATIONS April 2004 179 . Otherwise. For more information. the Oracle database system constantly updates information concerning record counts for database tables. see Update Statistics with BRCONNECT [Page 462]. serial – mode. The default is 1. Each table can be processed by several threads. If statistics are available for a table. You can improve the performance of update statistics as follows: • Parallel processing You can implement this with BRCONNECT or DBMS_STATS: BRCONNECT You can implement BRCONNECT parallel processing as follows: Command call brconnect -p <number of threads> Parameter stats_parallel_degree in the init<DBSID>.

Process Flow You choose one of the following approaches to update statistics: • DBA Planning Calendar in the Computing Center Management System (CCMS) For more information. • BRCONNECT [Page 462] 180 April 2004 .7 Update Statistics table. For more information. It only takes BRCONNECT a very short time to read this results table and determine whether update statistics is required for a given database table. We recommend you to use this approach in production operation because you can easily schedule update statistics to run automatically at regular intervals. see Update Statistics for the Cost-Based Optimizer in CCMS (Oracle) [Extern]. We recommend you to update statistics weekly. see SAP Note 408527.3 Approach to Oracle DBA 3. The DBA Planning Calendar uses the BRCONNECT commands.

BRCONNECT. and BRTOOLS. BRRECOVER. restore.4 BR*Tools for Oracle DBA 4 Use BR*Tools for Oracle DBA SAP provides the tools BRBACKUP. Although SAPDBA 6. BRSPACE. BRSPACE. BRSPACE. For more information on other tools. including the Oracle tool SQL*Plus. BRARCHIVE. BRRECOVER. we strongly recommend you to use the BR*Tools instead. BRRESTORE. BRCONNECT. Integration The BR*Tools are : • Integrated with BRTOOLS [Page 485]. This section describes how to perform Oracle DBA with BR*Tools. see Other Tools for Oracle DBA [Page 537]. BRARCHIVE. For more information on how to work out an approach to Oracle DBA. BRRECOVER. BRRESTORE.20 for Oracle is still available for Oracle 9i. and recovery tools: April 2004 181 . and BRCONNECT Available for the operating systems UNIX and Microsoft Windows • Distinguish between the following: • BR*Tools is the program package containing BRBACKUP. which is the character-based interface that calls BRBACKUP. • As an example. Therefore. BRARCHIVE. see Approach to Oracle DBA [Page 60]. it is no longer being developed. the following graphic shows the integration of the backup. BRTOOLS is the program that displays the menus from which the other BR programs are called. BRRESTORE. and BRTOOLS to manage and protect the data in your Oracle database.

and BRRESTORE for backup. BRCONNECT is called by BRBACKUP to monitor the database during a backup • 182 April 2004 . and BRCONNECT BRTOOLS and BRCONNECT Perform actions directly on the database Help • BRTOOLS is the menu program that can call all other functional tools interactively BRTOOLS and BRCONNECT are also called internally: BRTOOLS is called by BRBACKUP. BRRECOVER. We classify BR*Tools as functional. BRSPACE. restore. BRARCHIVE. batch. BRRESTORE. and verification. and interactive tools: Tool Types for BR*Tools Type Tool Description Functional BRBACKUP. help. BRARCHIVE.4 BR*Tools for Oracle DBA Oracle Database Control files Data files Online redo log files Offline redo log files BRRECOVER BRBACKUP BRRESTORE Detail log Summary log BRARCHIVE cpio/dd/rman parallel cpio/dd/rman serial Backup Media Backup Media Prerequisites The BR*Tools are installed automatically on the database server in the directory /usr/sap/<SAPSID>/SYS/exe/run.

in English or German Context-sensitive supporting information Detail and summary logs Available with operating systems UNIX and Microsoft Windows Command-line options for experts Activities For more information. and online redo log files of the database Backs up offline redo log files Restores data files. BRCONNECT BRSPACE. BRARCHIVE. tables and indexes) • Performs database administration tasks such as statistics update. control files. including GUI. see Getting Started with BR*Tools [Page 184]. Run interactively with their own menus. Interactive Features Toolset for BR*Tools Tool Purpose BRBACKUP [Page 359] BRARCHIVE [Page 382] BRRESTORE [Page 395] BRRECOVER [Page 407] BRSPACE [Page 417] BRCONNECT [Page 449] Backs up data files. and redo log files Recovers database files and restores profiles and log files Manages the database instance. control files. and BRRESTORE • BRTOOLS [Page 485] • • BRGUI Functions as a Java-based GUI. BRRESTORE. check database system. space. April 2004 183 . clean up logs and DBA tables Functions as a help tool to monitor the database during a backup Displays the menus from which the other BR programs are called Functions as an internal help tool started by BRBACKUP. BRRECOVER. BRARCHIVE.4 BR*Tools for Oracle DBA Batch BRBACKUP. adapt next extents. BRSPACE and BRRECOVER can also run in batch mode. You can call them interactively with BRTOOLS. BRTOOLS Only run on their own in batch. and segments (that is. working as the front-end display program for BR*Tools The following features apply to all the BR*Tools: • • • • • Menu-driven interface [Page 189]. without menus.

4. You start BR*Tools [Page 187]. 4. Process Flow Y.sap Changes to profile parameters become active when you start BR*Tools. You configure the UNIX command at for BR*Tools batch functions [Page 185]. You check the effects of autoextend and resize on BR*Tools [Page 186].dba [Page 488] is: UNIX: <ORACLE_HOME>/dbs/init<DBSID>.1 Configuring the Scroll Line Count for BR*Tools 184 April 2004 .1. you check BR*Tools release information [Page 199].. You configure the scroll line count for BR*Tools [Page 184]. You configure BR*Tools [Page 184]..1. You set the option to log displayed information for BRSPACE [Page 186]..1 Purpose Configuration of BR*Tools To get started with BR*Tools [Page 184]. You learn how to use BR*Tools [Page 195]. Prerequisites • You have made any required settings in the initialization profile. You learn about the BR*Tools user interface [Page 189].1 Purpose Getting Started with BR*Tools To get started with BR*Tools. 2. 5. If necessary..4 BR*Tools for Oracle DBA 4. 2. you need to configure it and learn how to use it. 1. 3.1. • You have set the environment variables when you configured the database: Environment Variables (UNIX) [Page 47] Environment Variables (Windows) [Page 48] • You are familiar with the directory structure: Directory Structure (UNIX) [Page 50] Directory Structure (Windows) [Page 54] Process Flow . Prerequisites If you are new to Oracle database administration with the SAP system. The default Initialization Profile init<DBSID>. 3.sap Windows: %<ORACLE_HOME>%\database\init<DBSID>. 4. 4. see Getting Started with Oracle and the SAP System [Page 23]. you need to configure it. 1.1 Getting Started with BR*Tools 4.

1. and so on.. Procedure . This section is not relevant for the graphical user interface. To list all at jobs. The running at process has root authorization. Make sure the proper entries have been made. view. For example. and analyzes the jobs created by BR*Tools in file /usr/spool/cron/atjobs. init<DBSID>. set the following environment variable (operating-system specific) before you start BR*Tools: BR_LINES <Number of lines for scrolling> 4. For example.1. For more information on environment variables. you must make an entry in the file /usr/lib/cron/at. and then test your configuration. This helps you avoid processes crashing due to incorrect configuration of the at command. These jobs are transparent files that you can display using UNIX commands such as vi.1 Getting Started with BR*Tools Use The BR*Tools character interface uses 20 lines for scrolling in lists. Prerequisites The environment variable BR_LINES and the parameter scroll_lines [Page 516] in the initialization parameter file..2 Configuring the UNIX Command at for BR*Tools Batch Functions Use This section tells you how to configure the UNIX command /usr/bin/at. enter the command at -l. reorganize a small table or tablespace such as PSAP<SCHEMA_ID>USR.sap. you can choose to use more than 20 lines for the scroll line count if your command windows have more than 20 lines. where you can scroll freely.4 BR*Tools for Oracle DBA 4. Prerequisites The at command has the following authorizations: r-sr-xr-x root root at To use at. April 2004 185 . see: • • Environment Variables (UNIX) [Page 47] Environment Variables (Windows) [Page 48] Procedure To select a different number for the scroll line count. Add ora<dbsid> to the list of authorized users. control the BR*Tools list display. which you can use to schedule BR*Tools functions in batch mode. 1. more.allow. You can lengthen or shorten the display. BRGUI. 2.

it is only for each class of displayed information in a BRSPACE run. Choose one of the following to set the log option: • BRTOOLS or BRGUI: a.3 Setting the Option To Log Displayed Information for BRSPACE Use You can have BRSPACE log the information displayed in a show function for BRSPACE. These options influence the BR*Tools functions below. Enter yes in Create log file. • This option is global for BRSPACE. the Oracle database system automatically takes into account the autoextends made to the data files in a database backup. Procedure . Choose Instance management → Show instance status.1. Set the option if you want to record record the displayed data in the log files. Prerequisites • Decide whether you need to set this option: 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. That is. Database System Check 186 April 2004 .1. Choose Continue. 4. Enter yes in Create log file..4 • • 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). The displayed data is not recorded in the BRSPACE log files to avoid unnecessary data. b. • Command line: Use option -l|-log of BRSPACE function dbshow.4 BR*Tools for Oracle DBA 4. and have been adjusted accordingly. or reduce their size (down to the largest used block ID of the data file).. Enter brspace -f dbshow -c dbstate –l at the command line. Choose <Management function> → <Show function>. Restore and Recovery When performing a recovery (that is. importing the offline redo log files).1.1 Getting Started with BR*Tools 4.1.

1 Getting Started with BR*Tools Parameters for checking freespace in tablespaces that take into account the Autoextend option are the following: • • TABLESPACE_FULL for absolute freespace CRITICAL_SEGMENTS for critical segments For more information. For more information. You can only use BR*Tools to manage a database system that is running on the same host system. You can also change these parameters. For more information. The parameter MAXSIZE takes into account the memory of the file system or the raw device. 4. April 2004 187 . see Altering a Data File with BR*Tools [Page 227]. The parameter MAXSIZE takes into account the memory of the file system or the raw device. see BRCONNECT Default Conditions for Database Administration [Page 453]. 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. see Extending a Tablespace with BR*Tools [Page 217] and Creating a Tablespace with BR*Tools [Page 219].4 BR*Tools for Oracle DBA 4. MAXSIZE and INCREMENT_BY. This requires the authorization for the BR*Tools program to be set accordingly (for example. see Reorganizing Tables with BR*Tools [Page 245]. for example. and perform other critical operations for the database). • You can increase or reduce the size of the data files of the tablespaces with the Resize action. you can set the Autoextend parameters MAXSIZE and INCREMENT_BY when you alter the data files. Tablespace Management • You can create the data files of the tablespaces with the parameters AUTOEXTEND ON (OFF).1. The standard Oracle user created during the installation of the SAP System is ora<dbsid> (UNIX) or <DBSID>ADM (Windows). For more information. under UNIX: rwsr_xr_x orac11 dba brtools).2 Use Starting BR*Tools You can use this procedure to start BR*Tools for Oracle. Reorganization • • The preventative freespace check includes the Autoextend option Before you reorganize a table. You can also use some BR*Tools programs if you are logged on as the SAP System user <sapsid>adm. Prerequisites • You have configured: The database system [Page 37] BR*Tools [Page 184] • Logon user You can log on as the operating system user who owns the data files of the database system.

1. Depending on the operating system the password length is limited to a certain number of places (for example. The password is not visible on the screen. If you start BR*Tools with a script. Enter the password interactively.. <user name>: Database user that you defined <password>: Password of your database user. The password appears on the screen. you have to use option -u<user>/<password>. In this case. Procedure . the password does not appear on the screen as it is entered and is not displayed in the process list. 8 characters for HP-UX. 188 April 2004 . to create data files. you must not use special characters (such as $ or #) in the user name and password. avoid starting BR*Tools with the command option -u and the immediate entry of user name and password. If BR*Tools does not find another profile. see Configuration of BR*Tools [Page 184]. 32 characters for AIX). For more information.1 Getting Started with BR*Tools BR*Tools establishes the connection to the database with a special database user who has authorization to create and delete tablespaces. as a background job or from the command line. This default user is system. Log on to the host where your database system is running. call it as follows from the command line: OS> <brtool> … For example. OS> <brtool> -u <user>/<password> Specifies a DBA user different to the default user (system/<default password>). the command line with the DBA user and its password can be displayed in the UNIX process list (for example. 2. If you want BR*Tools to log on as user system to the Oracle database. and so on (DBA privileges). The following examples illustrate different procedures for using passwords: OS> <brtool> -u system BR*Tools prompts you for the password. When you use <brtool> -u <user>. brbackup –t online … If the default password is not used. In this case. You can call BR*Tools with the following command options: OS> <brtool> -p [<path>/]<profile name> You can also specify an initialization profile that is different to the standard profile. which must be available. OS> <brtool> -u < <file name> The user and password is written to the file <file name>.4 BR*Tools for Oracle DBA 4. the system prompts you to enter a valid password. OS> <brtool> -u BR*Tools prompts you for the user and password. by using the ps command). If possible.. Access to this file can be restricted with operating system privileges.sap. it uses the values set in the default profile init<DBSID>.

3 Use 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.stop.. Call for an OPS$ user (also applies to background processing).Database statistics 8 .1 Getting Started with BR*Tools OS> <brtool> -u / . which shows the main menu: BR0280I Time stamp 2003-03-06 11.cont.refr. b . which shows the main menu: April 2004 189 . h .please make a selection ---------------------------------------------------------------BR*Tools main menu 1 = Instance management 2 . You can use BR*Tools with a: • Character-based interface. see Command options for BRSPACE [Page 418]. as in the following example. 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.Additional functions 9 . which in turn calls one of the functional BR programs.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. see the section on command options for the relevant one of the BR*Tools. for BRSPACE command options.help ---------------------------------------------------------------BR0662I Enter your choice: • GUI.back. 4.4 BR*Tools for Oracle DBA 4.Restore and recovery 6 .Segment management 4 .. For example. r . To make sure that the password is not visible in the process list.Backup and database copy 5 .Exit program Standard keys: c .30.Space management 3 . s .1. The menus are controlled by BRTOOLS. as in the following example.Check and verification 7 .

4 BR*Tools for Oracle DBA 4.1 Getting Started with BR*Tools BRGUI is the graphical interface for BR*Tools. Features User Interface The following table shows the features of the user interface: Character Interface GUI Used in Menu Types Meaning + Control Choice The action is completed Information message Display • An information message is written to the detail log in the form: BRxxxxI • Warning message Error message Not used Used for all rows in display menu A warning message is written to the detail log in the form: BRxxxxW Not used An error message is written to the detail log in the form: BRxxxxE 190 April 2004 . It displays output and gathers user input for BR*Tools.

This skips the following actions to the next normal program step. * Control Input You cannot choose or execute this now.com/dbaora stop All menus This cancels the active program. You must enter a value for this parameter. This continues to the next menu or program step. back All menus This goes back to the previous menu or program step. You can automatically open a browser window showing the Oracle / SAP home page in the SAP Service Marketplace at the following Internet address: Not used Not used service. help All menus This calls context-specific help.sap. with a yellow background. It is automatically selected if choose continue.1 Getting Started with BR*Tools – Control Choice List You can choose or execute this now. continue yes no All menus Not used = Control Choice List This is the initial default choice. Display entry. You can change this parameter – Input ~ Input You can change this optional parameter or reset its value to null (use a single space for this in the character interface).4 BR*Tools for Oracle DBA 4. Not used Not used This displays the current detail log. ? Input # None – the corresponding entry is not displayed in the Control Input You cannot: • Execute this action April 2004 191 . no input possible. It is recorded as BR0676I in the detail log.

Restore individual files from backup utility 5 .cont.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 * Apply incremental backup if needed 5 * Restore and apply archivelog files 6 * Open database 7 . s . b .Reset input values Standard keys: c .Restore individual files from disk 4 .please check/enter input values --------------------------------------------------------------- 192 April 2004 . s .Exit program 7 .Apply incremental backup 6 .Reset input values Standard keys: c .help --------------------------------------------------------------• Input This type of menu lets you enter required parameters or options. r .help --------------------------------------------------------------• Choice This type of menu lets you make an independent choice from the menu in any sequence. Here is an example: BR0657I Input menu 123 .stop.4 BR*Tools for Oracle DBA 4.please decide how to proceed --------------------------------------------------------------Restore of individual backup files 1 = Restore files from BRBACKUP backup 2 . h . Here is an example: BR0656I Choice menu 120 .cont.1 Getting Started with BR*Tools GUI • Change this parameter Menus 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.refr. h .back. b .stop.Exit program 8 . Here is an example: BR0655I Control menu 101 .back.refr.Restore individual files from tape 3 . r . You can repeat steps in the correct sequence. You can repeat the choice as often as required.

Here is an example: BR0658I List menu 121 .29 April 2004 193 ..fft 3 .42 2003-09-10 18.29 Type offline offline offline Files 110/0 112/0 112/0 Device disk tape util_onl tape util_onl 1 = bdjwhckx.stop. r .48.. [initGC2.bdjwgvvh. [util_file] 5 .BRBACKUP backup run (backup) .... [system/*******] 7 ~ Destination directory (dest_dir) .......utl] 6 # Database user/password (user) ..1 Getting Started with BR*Tools BRRESTORE main options for restore from BRBACKUP backup 1 .sdlmqobv..29 There are a number of sub-types for the list menu: List menu with optional single selection BR0658I List menu 365 – you can select one entry --------------------------------------------------------------List of BRSPACE export runs Pos...... [no] 4 .05.14 2003-01-29 16. [] 8 .fnf onl_cons 115/0 onl_cons 115/0 BR0280I Time stamp 2003-01-29 19...sap] 2 ..tbe 3 .55 2003-01-29 16.34...36 2003-09-10 20.ffd 2 ..please select one entry --------------------------------------------------------------BRBACKUP database backups for restore Pos..tbe 2003-09-11 20.4 BR*Tools for Oracle DBA 4. [bdjwgvvh.Fill-up previous restores (fillup) .16. [initGC2.Restore device type (device) .42 2003-01-29 16.tbe 2 .01.Files for restore (mode) .sdlmqimk.bdjwgwtj.28.sdlmvogy....43 2003-09-10 18.tbe 4 . h .sdlmqgin.05.refr.....help --------------------------------------------------------------• List This type of menu displays a list of items from which you select one entry..BACKINT/Mount profile (parfile) .fff 4 ..back.11-12] Standard keys: c ...BRRESTORE profile (profile) ..58.30..51 2003-01-29 17. s .fnf] 3 . Run Date Tables 1 2 2 2 Dumps 1 1 1 1 Size[KB] 2 14 5 18 1 . Rc 0 1 0 0 0 Log Start 2003-01-29 17.cont.26.bdjwhadu.fnt 5 . b . [2.bdjwgyrq..

s . r . Tablespace Files/AuExt. Total[KB] Largest[KB] 1 .refr. Type Status SegMan. 1/1 1/0 1/1 1/1 1/1 DATA ONLINE AUTO DATA ONLINE AUTO DATA ONLINE AUTO DATA ONLINE AUTO DATA ONLINE AUTO LOCAL LOCAL LOCAL LOCAL LOCAL Backup NO NO NO NO NO 1 .DRSYS 1/1 10240 1038336+:5312:64 :0:0 2 .back.06 2 1 12 Press <Rtn> to scroll. SegMan. NO 2 LOCAL 1038336 1043456 194 April 2004 .stop..INDX 1/1 5120 1043456+:5056:0: 0:0 .1 Getting Started with BR*Tools 5 .EXAMPLE 1/0 123520 93056:16128:22 40:1728:128 3 .. 'c' to continue.INDX 4 .29 ONLINE 113280 LOCAL AUTO 0 NO 5 Type Used[%] DATA 47. 2003-09-10 18.. 's' to stop scrolling.25 ONLINE 5056 LOCAL AUTO NO 1 DATA 8. Backup Free[KB] ONLINE 5376 ExtSize[KB] AUTO FreeExt. h . Tablespace Files/AuExt.50 Status ExtMan.help --------------------------------------------------------------List menu with optional multiple selection BR0659I List menu 259 + you can select one or more entries --------------------------------------------------------------List of database tablespaces Pos. List menu with multiple selection BR0659I List menu 312 + please select one or more entries --------------------------------------------------------------List of tablespaces for alter Pos.DRSYS 2 . <n> to select. DATA 1. b .EXAMPLE 3 .cont.PSAP1111D 5 .25..tbe ...PSAP1111I . ExtMan..sdlmqfmw. Standard keys: c .4 BR*Tools for Oracle DBA 4.

refr..cont...back.refr.refr. 47.......no selection possible --------------------------------------------------------------List of tables for reorganization Pos.... 1038336+:5312:64:0:0 Standard keys: c .. AUTO 5 . ONLINE 3 .stop......SAPR3 3 ... DATA 2 ..cont...Tablespace status (status) ..... but no input possible BR0692I Display menu 260 # no input possible --------------------------------------------------------------Information about tablespace DRSYS 1 .help --------------------------------------------------------------- 4. 1 7 .Maximal extension size in KB (extsize) ... NO NO NO NO NO Rows 429 1068 763 0 0 Space[KB] 64 320 256 64 64 Data[KB:%] 42:65 253:79 189:74 0:0 0:0 1 ....help --------------------------------------------------------------• Display in form of input menu. 5376 11 .. h .Number of autoextensible files (autoext) .1 Getting Started with BR*Tools Standard keys: c ..50 10 ....SAPR3 2 .. 2 13 ..4 BR*Tools for Oracle DBA 4..... 1038336 12 ...Used space in tablespace in % (used) . b ... s ..... r ... h . h ..Free space in tablespace in KB (free) ..4 Purpose How to Use BR*Tools April 2004 195 ...SAPR3 5 .......Number of free extents (freext) .stop...Number of files in tablespace (files) .cont..SAPR3 4 .. LOCAL 4 ........ 1 8 .Extent management (extent) . s . r ... b ..back.. 10240 9 .1.....help --------------------------------------------------------------List display without selection BR0660I List display 352 . s .....Tablespace type (type) .... Owner Table DBABARL DBABD DBABL DBADFL DBAERR Part...SAPR3 .. b .Segment space managenent (space) .back..Backup status (backup) ........ Standard keys: c .stop... r ... NO 6 ....Total tablespace size in KB (total) .Largest free extents (largest) ....

BRRECOVER. If you specify an object name in BRGUI or BRTOOLS.1 Getting Started with BR*Tools You can start BR*Tools [Page 181] 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 you can also use “quick mode” from the BRGUI or BRTOOLS interface or the command line. before starting to perform an action on the database. With the option –c|–confirm force. see “Quick Mode for BRSPACE” below. where there is no force option. BRARCHIVE. An exception to this is BRCONNECT. Therefore. but this is only relevant when you have completed your input and started execution to perform some action on the database. only stopping when absolutely necessary. see below. you can specify that the BR*Tool runs without operator input in unattended mode. For more information. 196 April 2004 . you can specify that BR*Tool runs in fully unattended mode. BRSPACE. All other confirmation prompts and so on are skipped. BRRESTORE. BRTOOLS passes control to BRSPACE or BRRECOVER . so that an error is generated if input is required and has not already been given.4 BR*Tools for Oracle DBA 4. BRSPACE and BRRECOVER differ in that they also have an interactive mode separate from BRGUI or BRTOOLS. there is a “quick mode” for BRSPACE. Whichever start method you use. that is in menus. However. 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. There is also an unattended or “batch” mode. BRGUI or BRTOOLS normally shows you the command that is to be executed. you might get errors if you change the command. In addition. or BRCONNECT – directly performs some action on the database. You can enter manually enter the command.” For more information. For more information. With the option –c|-confirm. Process Flow 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. see “Command Line Mode” below. at the end a functional tool – BRBACKUP. which themselves gather further input using menus.

tablespace name SYSTEM). the tool is called with the default function when you start it from the command line: • • Complete Database Recovery for BRRECOVER Show Database Information for BRSPACE Otherwise.4 BR*Tools for Oracle DBA 4. If you call BRSPACE from the command line with a function name (for example. since you can specify all necessary input before the function is executed • 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. the appropriate menus are shown for the function you select. a log is created immediately. you go straight into quick mode. see: • • -c|-confirmfor BRRECOVER -c|-confirmfor BRSPACE Be very careful with –c force because it forces default selection of all unspecified options. Quick Mode for BRSPACE You can use quick mode to skip the higher-level menus in BRSPACE. If you do not specify a function. which might lead to unexpected results. extend tablespace) and an object name (for example. the SAP tool is executed immediately to perform a function on the database. You can force the tool to run in batch mode without any interactive component by entering the option –c force.1 Getting Started with BR*Tools There are the following reasons for this: • To enable full logging of BRSPACE actions – as soon as BRGUI or BRTOOLS calls BRSPACE. as described below. even though you are still in interactive mode To enable unattended mode without operator input. For more information. including the menu to select the object of your chosen function. Calling BRSPACE and BRRECOVER from the Command Line BRSPACE and BRRECOVER have an interactive component to collect option input. You use quick mode from: • • BRGUI oor BRTOOLS menus with the title BRSPACE options for <function> The command line at operating system level April 2004 197 .

4 BR*Tools for Oracle DBA 4. in which you only use the menus in BRSPACE to enter the options required to perform a function. you see a menu displaying the different categories of information class: Show database instance information Show database space information 198 April 2004 . we recommend you to use main menu mode. The object – for example. Unless you know the object name. The alternative to quick mode is main menu mode. In quick mode.1 Getting Started with BR*Tools For quick mode. If you do not enter the class of the information to be displayed. you must specify at least the function and the object name. BRSPACE skips the menus in which you normally specify the function and the object name. They jump directly to the final input menu to let you enter the remaining required parameters and execute the function immediately. The following graphic illustrates in outline how quick mode works: Quick Mode – object selected Object Example: tablespace name optional B R G U I object not selected B R T O O L S or Initial input object selected 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. You can also enter additional options in quick mode. a tablespace name if you want to extend a tablespace – varies according to the function that you choose.

The exception to this is for the functions in segment management. because the list would be too long. the quick mode is deactivated and you can choose a new object to execute the function again. BRSPACE displays a list of objects for confirmation.5 Use Checking BR*Tools Release Information April 2004 199 . • 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. the database parameter) is specified. If you choose reset. which is Alter database parameter in this example.4 BR*Tools for Oracle DBA 4. • When you have finished executing a function and you choose back after starting BRSPACE in quick mode.1 Getting Started with BR*Tools Show database object information Choose the category and then the class that you require. The following example shows a command line entry for an alter function where the object (here. BRSPACE displays the requested information. BRSPACE prompts you to select an action before you can continue. you can go back and make a new selection. but not the action: brspace –f dbalter –p audit_trail BRSPACE starts by displaying the function main menu for the function that you entered. • Alter functions: dbalter to alter the database instance dbparam to alter database parameters tsalter to alter tablespaces dfalter to alter data files tbalter to alter tables idalter to alter indexes With these functions you should also enter an action to specify what kind of alter function you require. • Segment Management If you select multiple objects in quick mode for segment management [Page 243]. 4. The field for the object name is filled with your entry. You must first select the action before BRSPACE can display the input menu to let you execute the function.1. You can now enter all required options and execute the function immediately. If the list is not what you require. where it makes no sense to display all tables or indexes. BRSPACE restores your original object selection. If you do not enter an action in quick mode.

see the relevant command option for the tool that you are using.4 BR*Tools for Oracle DBA 4. Result BR*Tools displays the following release information: • • • BR*Tools release BR*Tools patch level BR*Tools patch date 200 April 2004 . it helps to give as much information as possible about the version you are using.. For example.. see -V|VERSION [Page 440]. brspace –V all For more information. enter the following at the command line: OS> <brtool> –V all For example. Procedure . for more information on how to display release information for BRSPACE. When you contact SAP support to register problems concerning BR*Tools. To display release information with the command option.1 Getting Started with BR*Tools You can check the BR*Tools release information.

unless you choose batch mode with the option –c force.1 Use Instance Management with BR*Tools You can manage your Oracle database instance with BR*Tools [Page 181]. Features You can perform the following functions for database instance management with BR*Tools: • • • • • • Start up the database Shut down the database Alter the database instance Alter the database parameters Show the database instance status Show database parameters Activities . If required. 3. April 2004 201 . Integration • BRGUI or BRTOOLS calls the SAP tool BRSPACE.sap [Page 488].sap and restart BRTOOLS.2 BR*Tools in Action 4. • If required. For more information on the approach to instance management. You can use quick mode if you have specified the instance name(s).2 BR*Tools in Action This section describes how you use BR*Tools to perform database administration tasks with your Oracle database. You can also manage the database instance by calling BRSPACE from the command line.2. For more information on quick mode. If required. This is because the menus in BRGUI or BRTOOLS simplify entry of the correct options. set parameters to control the screen display for BRSPACE in the Initialization Profile init<DBSID>. We recommend you to normally use BRGUI or BRTOOLS rather than BRSPACE directly.. These are scroll_lines [Page 516] and show_period [Page 516]. 4. However. see Instance Management [Page 61]. you change the default values for the parameters in the initialization profile init<DBSID>. you choose Instance Management → Reset input values to set the defaults used to the values set after you started BRGUI or BRTOOLS.4 BR*Tools for Oracle DBA 4. This section describes how you perform instance management with BR*Tools. 2.. see How to Use BR*Tools [Page 195]. You choose Instance Management in the BRGUI or BRTOOLS menus or directly from the command line. 1. BRSPACE displays menus to help you enter the required options.

iii. Choose Continue. 4. 1. Starting up the database is part of Instance Management with BR*Tools [Page 201]. Command line 202 April 2004 . Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database instance (instance) Confirmation mode (confirm) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f dbstart -i|-instance [Page 420] -c|-confirm [Page 419] -l|-language [Page 439] This shows you the BRSPACE -f dbstart [Page 420] that is to be executed using the current settings.. You check the results of the database instance management in the BRSPACE logs [Page 440]. Choose Instance Management → Start up database BRGUI or BRTOOLS displays the menu BRSPACE options for database instance startup. Start the procedure using BRGUI or BRTOOLS. or from the command line: BRGUI or BRTOOLS: i.2 BR*Tools in Action 4.” Procedure . ii. 5. This section describes how you start the database. For more information on the approach to database instance management. see Instance Management [Page 61].2. BRGUI or BRTOOLS prompts you to start BRSPACE.. where you specify the options with which you call BRSPACE. You start database instance management.4 BR*Tools for Oracle DBA 4.1 Use Starting Up the Database with BR*Tools You can use BR*Tools [Page 181] for Oracle to start up the database. These are marked “RAC only.1. iv. Choose Continue to start BRSPACE. Prerequisites Some steps in this procedure only apply if your database is an Oracle Real Application Cluster (RAC).

For more information. 3.4 BR*Tools for Oracle DBA 4. enter 1-3. enter all_down in Database instance (instance) or -i all_down on the command line. RAC only: BRSPACE displays the List of database instances for startup. To select the first three entries and the fifth.2 BR*Tools in Action You need to enter at least the following command: brspace –f dbstart You can enter more parameters. Otherwise. BRSPACE displays the menu Options for starting up database instance. Set the required options: Menu Entry Meaning Database startup to-state (state) Database open mode (mode) Force instant restart (force) -f dbstart -s|-state [Page 420] -f dbstart -m|-mode [Page 420] -f dbstart -f|-force [Page 420] April 2004 203 . enter 1. BRSPACE writes a detail log [Page 440]. or from the command line – you can take advantage of quick mode if you know the object name. the default selection. List Entry Meaning Pos Name Number Status Start time RedoSeq SapConn List sequence number Instance name Instance number Instance status Time the instance was started Log redo sequence number Number of SAP connections 4.3. RAC only: to start all database instances that are currently down. non-RAC systems). continue with step 5 (quick mode).5. These examples apply only to input in character mode. if required. in this case the instance name. If you have already entered the instance name. 2. From now on. including the instance name. enter 1-3. BRSPACE starts and you see a message that includes Start of BRSPACE processing. To select the first three entries in the list. see BRSPACE -f dbstart [Page 420]. BRSPACE automatically selects the name of the single instance for you. In normal (that is. 5. BRSPACE displays the Database instance startup main menu. To select the first and third entries. see How to Use BR*Tools [Page 195]. To select all entries. Choose Start up database. RAC only: select a database instance or multiple database instances. For more information. Whichever way you start the procedure – with BRGUI or BRTOOLS. enter 0.

where you specify the options with which you call BRSPACE. • • The summary log [Page 440] space<DBSID>...4 BR*Tools for Oracle DBA 4. Start the procedure using BRGUI or BRTOOLS. Results Check the results in the BRSPACE logs [Page 440]. choose Continue. This section describes how you shut down the database. Shutting down the database is part of Instance Management with BR*Tools [Page 201]. or from the command line: BRGUI or BRTOOLS: i. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database instance (instance) Confirmation mode (confirm) Message language (language) -p|-profile [Page 439] -u|-user [Page 439] -f dbshut –i|-instance [Page 421] -c|-confirm [Page 419] -l|-language [Page 439] 204 April 2004 . see your Oracle SQL documentation.2 BR*Tools in Action SQLPLUS command line (command) The SQL command that is to be executed using the current settings.2 Use Shutting Down the Database with BR*Tools You can use BR*Tools [Page 181] for Oracle to shut down the database. see Showing Logs and Profiles with BR*Tools [Page 353]. see Instance Management [Page 61]. 4.2. ii. For more information. 6. These are marked “RAC only.” Procedure .dbr displays the details. Prerequisites Some steps in this procedure only apply if your database is an Oracle Real Application Cluster (RAC). For more information on the approach to database instance management. 1. For more information on how to view the logs with BR*Tools.1. To start processing with the selected options.log displays the return code. Choose Instance Management → Shut down database BRGUI or BRTOOLS displays the menu BRSPACE options for database instance shutdown. The detail log [Page 440] s<encoded timestamp>.

RAC only: BRSPACE displays the List of database instances for shutdown. see BRSPACE -f dbshut [Page 421]. in this case the instance name. April 2004 205 . 3. BRSPACE displays the Database instance shutdown main menu. enter all_up in Database instance (instance) or -i all_up on the command line. To select the first three entries and the fifth. enter 0. the default selection. Choose Shut down database.4 BR*Tools for Oracle DBA 4. These examples apply only to input in character mode. List Entry Meaning Pos. Whichever way you start the procedure – with BRGUI or BRTOOLS. see How to Use BR*Tools [Page 195]. or from the command line – you can use quick mode if you know the object name. Choose Continue to start BRSPACE. For more information. BRSPACE writes a detail log [Page 440]. enter 1-3. iv. 2. BRGUI or BRTOOLS prompts you to start BRSPACE. Command line You need to enter at least the following command: brspace –f dbshut You can enter more parameters. To select all entries. For more information. iii. RAC only: to stop all database instances that are currently up and running. To select the first three entries in the list. Name Number Status Start time RedoSeq SapConn List sequence number Instance name Instance number Instance status Time the instance was started Log redo sequence number Number of SAP connections 4. From now on.3. if required. If you have already entered the instance name.2 BR*Tools in Action BRSPACE command line (command) This shows you the BRSPACE -f dbstart [Page 420] that is to be executed using the current settings. continue with step 5 (quick mode). BRSPACE displays the menu Options for shutting down database instance. To select the first and third entries. Otherwise.5. enter 1-3. RAC only: select a database instance or multiple database instances. enter 1. BRSPACE starts and you see a message that includes Start of BRSPACE processing. Choose Continue. including the instance name.

or from the command line: BRGUI or BRTOOLS: 206 April 2004 ..4 BR*Tools for Oracle DBA 4. 5.2.. Results Check the results in the BRSPACE logs [Page 440].1. BRSPACE automatically selects the name of the single instance for you. see Instance Management [Page 61]. Prerequisites Some steps in this procedure only apply if your database is an Oracle Real Application Cluster (RAC). choose Continue. see your Oracle SQL documentation. To start processing with the selected options. For more information on the approach to database instance management. 1.dbs displays the details.log displays the return code. see Showing Logs and Profiles with BR*Tools [Page 353]. For more information on how to view the logs with BR*Tools. For more information. non-RAC systems). Start the procedure using BRGUI or BRTOOLS. 6. • • The summary log [Page 440] space<DBSID>.” Procedure .3 Use Altering the Database Instance with BR*Tools You can use BR*Tools [Page 181] for Oracle to alter the database instance as follows: • • • • Switch the redo log file Force a database checkpoint Set archivelog mode Set noarchivelog mode This section describes how you alter the database instance. Set the required options: Menu Entry Meaning Database startup to-state (state) Database open mode (mode) Force instant restart (force) SQLPLUS command line (command) -f dbshut -s|-state [Page 421] -f dbshut -m|-mode [Page 421] -f dbshut -f|-force [Page 421] The SQL command that is to be executed using the current settings. These are marked “RAC only. Altering the database instance is part of Instance Management with BR*Tools [Page 201].2 BR*Tools in Action In normal (that is. 4. The detail log [Page 440] s<encoded timestamp>.

iv.. BRSPACE writes a detail log [Page 440]. or from the command line – you can use quick mode if you know the object name. where you specify the options with which you call BRSPACE. Command line: Enter at least the following command: brspace –f dbalter You can enter more parameters. Switch redo log file Force database checkpoint Set archivelog mode Set noarchivelog mode BRGUI or BRTOOLS displays the menu BRSPACE options for alter database instance. see How to Use BR*Tools [Page 195]. BRSPACE displays the Alter database instance main menu. Whichever way you start the procedure – with BRGUI or BRTOOLS. including the instance name and action. For more information. v. Choose or confirm the required action (see the list of actions in step 1 above). From now on. iii.4 BR*Tools for Oracle DBA 4. Choose the action. Choose Continue. if required.2 BR*Tools in Action i. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database instance (instance) Confirmation mode (confirm) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f dbalter -i-instance [Page 422] -c|-confirm [Page 419] -l|-language [Page 439] This shows you the BRSPACE -f dbalter [Page 422] command that is to be executed using the current settings. . Choose Instance Management → Alter database BRGUI or BRTOOLS displays the menu Alter database instance. ii. BRGUI or BRTOOLS prompts you to start BRSPACE. BRSPACE starts and you see a message that includes Start of BRSPACE processing. April 2004 207 . in this case the instance name. see BRSPACE -f dbalter [Page 422]. If you have already entered the instance name and action. continue with step 5 (quick mode). Choose Continue to start BRSPACE. For more information. 2. 3..

see your Oracle SQL documentation. BRSPACE displays the menu Options for alter of database instance.2 BR*Tools in Action If you already chose an action in step 1. BRSPACE automatically selects the name of the single instance for you. non-RAC) systems. For more information. this action is set to the default. For more information on how to view the logs with BR*Tools. Set the required options: Menu Entry Meaning Current archivelog mode (mode) – display only -f dbalter -m|-mode [Page 422] -f dbalter -a|-action [Page 422] -f dbalter -f|-force [Page 422] The SQL command that is to be executed using the current settings.1. In normal (that is. 5. Results Check the results in the BRSPACE logs [Page 440]. unless you have already entered the instance name.dba displays the details. • • The summary log [Page 442] space<DBSID>. To start processing with the selected options. RAC only: select a database instance or multiple database instances. 4. Name Number Status Start time RedoSeq SapConn List sequence number Instance name Instance number Instance status Time the instance was started Log redo sequence number Number of SAP connections 4. choose Continue. List Entry Meaning Pos. The detail log [Page 440] s<encoded timestamp>.2. RAC only: BRSPACE displays the List of database instances for alter.log displays the return code.4 Use Altering Database Parameters with BR*Tools You can use BR*Tools [Page 181] for Oracle to alter the database parameters as follows: 208 April 2004 .4 BR*Tools for Oracle DBA 4. Alter database action (action) – display only Force instance shutdown (force) SQLPLUS command line (command) 6. see Showing Logs and Profiles with BR*Tools [Page 353].

ora from spfile BRGUI or BRTOOLS displays the menu BRSPACE options for alter database parameter. BRGUI or BRTOOLS prompts you to start BRSPACE. where you specify the options with which you call BRSPACE.4 BR*Tools for Oracle DBA 4. iii. Command line: April 2004 209 . Start the procedure using BRGUI or BRTOOLS.2 BR*Tools in Action • • • Alter database parameter Reset database parameter Create init.. Choose Continue to start BRSPACE.ora profile from spfile This section describes how you alter database parameters. Choose the action: Change parameter value Reset parameter value Create init.. . For more information on the approach to database instance management. 1.. Choose Continue. ii. v. iv. see Instance Management [Page 61].. Procedure . or from the command line: BRGUI or BRTOOLS: i. BRGUI or BRTOOLS displays the menu Alter database parameter. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database parameter (parameter) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f dbparam -parameter [Page 422] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbparam [Page 422] command that is to be executed using the current settings. Choose Instance Management → Alter database parameters. Altering database parameters is part of Instance Management with BR*Tools [Page 201].

Choose or confirm the required action (see the list of actions in step 1 above). including the parameter name and action.ora from spfile. Set the required options: Menu Entry Meaning Parameter description (desc) – display only Parameter description from V$PARAMETER Current parameter value Current parameter value (parval) – display only 210 April 2004 . Whichever way you start the procedure – with BRGUI or BRTOOLS. See “Results” below. You have now finished the procedure. Parameter Modif. Select a database parameter. if required. in this case the parameter name. List sequence number Parameter name Modification attributes: no – unmodifiable yes – modifiable for the lifetime of an instance spfile – modifiable in spfile both – modifiable in spfile and for the lifetime of an instance Inst. or from the command line – you can use quick mode if you know the object name. If you have already entered the parameter name. For more information.2 BR*Tools in Action Enter at least the following command: brspace –f dbparam You can enter more parameters. BRSPACE displays the menu. Options for alter of database parameter. From now on. For more information. Value Database instance the parameter is set for: * means all instances Current parameter value 6. If you have already entered the parameter name and action. 7. BRSPACE displays the database parameter list: List Entry Meaning Pos. respond to the BRSPACE prompt asking you whether you want to start the function. 5. BRSPACE starts and you see a message that includes Start of BRSPACE processing.4 BR*Tools for Oracle DBA 4. continue with step 7 (quick mode). 4. continue with step 7 (quick mode). 2. see How to Use BR*Tools [Page 195]. see BRSPACE -f dbparam [Page 422]. BRSPACE displays the Alter database parameter main menu. 3. If you chose Create init. BRSPACE writes a detail log [Page 440].

The parameter change log [Page 447] param<DBSID>. see your Oracle SQL documentation. 8. For more information. 4.5 Use Showing Instance Status with BR*Tools You can use BR*Tools [Page 181] for Oracle to show information about the database instance status. see Showing Logs and Profiles with BR*Tools [Page 353]..2. Start the procedure using BRGUI or BRTOOLS. For more information on how to view the logs with BR*Tools.2 BR*Tools in Action Value in spfile (spfval) – display only Current value in spfile -f dbparam -v|-value [Page 422] This entry is locked if reset parameter value was chosen New parameter value (value) Scope for new value (scope) Database instance (instance) Comment on update (comment) SQLPLUS command line (command) -f dbparam -s|-scope [Page 422] -f dbparam -i|-instance [Page 422] -f dbparam -c|-comment [Page 422] The SQL command that is to be executed using the current settings. Results Check the results in the BRSPACE logs [Page 440]. Choose Instance Management → Show instance status BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information. To start processing with the selected options. • • • The summary log [Page 442] space<DBSID>.1. Set the required options: Menu Entry Equivalent BRSPACE Command Option April 2004 211 . choose Continue. 1.. or from the command line: BRGUI or BRTOOLS: i.log displays the return code.4 BR*Tools for Oracle DBA 4.” Procedure . ii. The detail log [Page 440] s<encoded timestamp>. Prerequisites Some steps in this procedure only apply if your database is an Oracle Real Application Cluster (RAC). where you specify the options with which you call BRSPACE.log logs all parameter changes. These are marked “RAC only.dbp displays the details.

BRSPACE options for showing database information. For more information.. . BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). BRSPACE starts and you see a message that includes Start of BRSPACE processing. where you specify the additional options with which you call BRSPACE. -p|-profile [Page 439] -u|-user [Page 439] -f dbshow -n|-instance [Page 423] BRGUI or BRTOOLS displays a further menu. v. Command line: Enter at least the following command: brspace –f dbshow –c dbstate You can enter more parameters if required.4 BR*Tools for Oracle DBA 4. If you started BRSPACE from the command line without the information class name (-c|-class) – that is. Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbshow -c dbstate [Page 423] command that is to be executed using the current settings. Choose Show database instance information → Show instance status. RAC only: BRSPACE displays the List of database instances: List Entry Meaning Pos. Choose Continue to start BRSPACE. RAC only: if you have already entered the name of the database instance. 2. continue with step 4. Name Number List sequence number Instance name Instance number 212 April 2004 . From now on.2 BR*Tools in Action BRSPACE profile (profile) Database user/password (user) Database instance (instance) iii. with brspace –f dbshow – BRSPACE displays the Show database information main menu. see BRSPACE -f dbshow [Page 423]. iv. Choose Continue..

To select the first three entries and the fifth. RAC only: if you specified multiple instances.5. choose Continue to scroll through. These examples apply only to input in character mode. To select the first three entries in the list. select one or more database instances. see Showing Logs and Profiles with BR*Tools [Page 353]. • • The summary log [Page 442] space<DBSID>. RAC only: to see more information.1. Results If you set the option Create log file (parameter –l|-log). enter 1-3. For more information on how to view the logs with BR*Tools. To select the first and third entries. To select all entries. enter 1-3. BRSPACE displays Information about the status of database instance: List Entry Meaning Instance number (number) Instance thread (thread) Instance status (status) Instance start time (start) Oracle version (version) Database creation time (create) Last resetlogs time (resetlogs) Archivelog mode (archmode) Archiver status (archiver) Current redo log sequence (redoseq) Current redo log SCN (redoscn) Number of SAP connections (sapcon) Instance number Instance thread number Instance status Time the instance was started Oracle database version Date and time of database creation Date and time that logs were reset Archivelog mode Status of the archiver Current redo log sequence number Current redo log system change number Number of SAP connections 4.3.4 BR*Tools for Oracle DBA 4. enter 0.log displays the return code.dbw displays the details.2 BR*Tools in Action Status Start time RedoSeq SapConn Instance status Time the instance was started Log redo sequence number Number of SAP connections 3.2. 4. check the results in the BRSPACE logs [Page 440]. The detail log [Page 440] s<encoded timestamp>. enter 1.6 Use Showing Database Parameters with BR*Tools April 2004 213 .

. Procedure . Start the procedure using BRGUI or BRTOOLS. iv.. 214 April 2004 . see BRSPACE -f dbshow [Page 423]. Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. Choose Continue to start BRSPACE. Choose Continue. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database parameter (parameter) iii. -p|-profile [Page 439] -u|-user [Page 439] -f dbshow -p|-parameter [Page 423] BRGUI or BRTOOLS displays a further menu. or from the command line: BRGUI or BRTOOLS: i. Choose Instance Management → Show database parameters BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information.. For more information.2 BR*Tools in Action You can use BR*Tools [Page 181] for Oracle to show information about database parameters. BRSPACE options for showing database information. v. where you specify the additional options with which you call BRSPACE. 1. Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbshow -c dbparam [Page 423] command that is to be executed using the current settings.. where you specify the options with which you call BRSPACE. ii. Command line: Enter at least the following command: brspace –f dbshow –c dbparam You can enter more parameters if required..4 BR*Tools for Oracle DBA 4.

in table above Current parameter value Parameter value stored in spfile Your comment on the parameter update 4. continue with step 4.4 BR*Tools for Oracle DBA 4. select one or more database parameters. enter 1-3. enter 1. string. enter 1-3. To select the first and third entries. To see more information. Value Database instance the parameter is set for: * means all instances Current parameter value 3. 2. integer.5. choose Continue to scroll through. with brspace –f dbshow – BRSPACE displays the Show database information main menu. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). BRSPACE displays Information about database parameter: List Entry Meaning Parameter description (desc) Parameter type (type) Modifiable attribut (modif) Database instance (instance) Parameter value (value) Value in spfile (spfval) Comment on update (comment) Parameter description from V$PARAMETER Type of parameter: boolean.3. BRSPACE displays the List of database parameters: List Entry Meaning Pos. To select the first three entries in the list. enter 0. If you started BRSPACE from the command line without the information class name (-c|-class) – that is. in table above See Inst. These examples apply only to input in character mode. List sequence number Parameter name Modification attributes: no – unmodifiable yes – modifiable for the lifetime of an instance spfile – modifiable in spfile both – modifiable in spfile and for the lifetime of an instance Inst. If you have already entered the parameter name. If you specified multiple parameters. April 2004 215 . To select all entries. Parameter Modif. file See Modif. To select the first three entries and the fifth. From now on. Choose Show database instance information → Show database parameters.2 BR*Tools in Action BRSPACE starts and you see a message that includes Start of BRSPACE processing.

sap [Page 488]. This is because the menus in BRGUI or BRTOOLS simplify entry of the correct options. set parameters to control the screen display for BRSPACE in the Initialization Profile init<DBSID>. unless you choose batch mode with the option –c force. You can use quick mode if you know which objects you require. 1.dbw displays the details.. 4. • • The summary log [Page 442] space<DBSID>. Features You can perform the following functions for space management with BR*Tools: • • • • • • Extend tablespace Create tablespace Drop tablespace Alter tablespace Alter data file Move data file Activities .4 BR*Tools for Oracle DBA 4.2 Use Space Management with BR*Tools You can manage the space on your Oracle database with BR*Tools [Page 181]. see Showing Logs and Profiles with BR*Tools [Page 353]. However. The detail log [Page 440] s<encoded timestamp>. see Space Management [Page 65]. You choose Space management in the BRGUI or BRTOOLS menus or directly from the command line. These are scroll_lines [Page 516] and show_period [Page 516].. You can also perform space management by calling BRSPACE from the command line. For more information on quick mode. BRSPACE displays menus to help you enter the required options.2 BR*Tools in Action Results If you set the option Create log file (parameter –l|-log). check the results in the BRSPACE logs [Page 440].log displays the return code. For more information on the approach to manage space. • If required. see BR*Tools User Interface [Page 189] 216 April 2004 . This section describes how you manage space with BR*Tools.2. For more information on how to view the logs with BR*Tools. We recommend you to normally use BRGUI or BRTOOLS rather than BRSPACE directly. Integration • BRGUI or BRTOOLS calls the SAP tool BRSPACE.

You check the results of space management in the BRSPACE logs [Page 440]. see Managing Tablespaces [Page 65]. iii. BRGUI or BRTOOLS prompts you to start BRSPACE. 3.2. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace name (tablespace) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f tsextend -t|-tablespace [Page 425] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f tsextend [Page 425] command that is to be executed using the current settings.. you change the default values for the parameters in the initialization profile init<DBSID>.1 Use Extending a Tablespace with BR*Tools You can use BR*Tools [Page 181] for Oracle to extend a tablespace by adding a data file. This section describes how you extend a tablespace with BR*Tools. Choose Continue to start BRSPACE. ii. Command line You need to enter at least the following command: April 2004 217 .sap and restart BRGUI or BRTOOLS. you choose Space Management → Reset input values to set the defaults used to the values set after BRGUI or BRTOOLS initialization. Start the procedure using BRGUI or BRTOOLS. If required. Procedure .2. For more information on the approach to extending a tablespace. If required. Choose Continue.4 BR*Tools for Oracle DBA 4.. You start space management.2 BR*Tools in Action 2. Choose Space Management → Extend tablespace BRGUI or BRTOOLS displays the menu BRSPACE options for tablespace extension. 4. or from the command line: BRGUI or BRTOOLS: i. 5. 4. 1. where you specify the options with which you call BRSPACE. iv.

in this case the tablespace name. 3. Select a tablespace. including the tablespace name. For more information.2 BR*Tools in Action brspace –f tsextend You can enter more parameters. or from the command line – you can take advantage of quick mode if you know the object name.4 BR*Tools for Oracle DBA 4. BRSPACE starts and you see a message that includes Start of BRSPACE processing. 5. Whichever way you start the procedure – with BRGUI or BRTOOLS. see How to Use BR*Tools [Page 195]. Choose Extend tablespace. BRSPACE writes a detail log [Page 440]. see your Oracle SQL documentation. continue with step 5 (quick mode). List sequence number Tablespace name Number of data files / number of data files with autoextend Total size of all data files of the tablespace Percentage of space in tablespace that is used Amount of space in tablespace that is free Maximal size that the tablespace can be autoextended BRSPACE displays the menu Options for extension of tablespace. BRSPACE displays the list of tablespaces: List Entry Meaning Pos Tablespace Files/AuExt Total [KB] Used[%] Free [KB] ExtSize [KB] 4. BRSPACE displays the Tablespace extension main menu. Last added file size in MB (lastsize) – display only New file to be added (file) Raw disk / link destination (rawlink) Size of the new file in MB (size) File autoextend mode (autoextend) Maximal file size in MB (maxsize) File increment size in MB (incrsize) SQL command (command) 218 April 2004 . Set the required options: Menu Entry Meaning Last added file name (lastfile) – display only The name of the last file that was added to the tablespace The size of the last file that was added to the tablespace -f tsextend -f|-file [Page 425] -f tsextend -r|-rawlink [Page 425] -f tsextend -s|-size [Page 425] -f tsextend -a|-autoextend [Page 425] -f tsextend -m|-maxsize [Page 425] -f tsextend -i|-incrsize [Page 425] The SQL command that is to be executed using the current settings. For more information. From now on. if required. If you have already entered the tablespace name. see BRSPACE -f tsextend [Page 425]. For more information. 2.

6. For more information on how to view the logs with BR*Tools. or just sapdata<N> to specify in which sapdata directory the file is to be located. • • • The summary log [Page 442] space<DBSID>. To start processing with the selected options. but also the sapdata path name..2. BRSPACE automatically extends the incomplete file name to the full path name according to the SAP naming convention [Page 44]. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace name (tablespace) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) -p|-profile [Page 439] -u|-user [Page 439] -f tscreate -t|-tablespace [Page 426] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] April 2004 219 . For more information on the approach to creating a tablespace. Choose Space Management → Create tablespace. BRGUI or BRTOOLS displays the menu BRSPACE options for tablespace extension. choose Continue.4 BR*Tools for Oracle DBA 4. or from the command line: BRGUI or BRTOOLS: i. ii. Procedure . 4. you can enter not only full path names.log displays the return code. 1..2 BR*Tools in Action For the file option. where you specify the options with which you call BRSPACE. see Managing Tablespaces [Page 65]. Results Check the results in the BRSPACE logs [Page 440].2 Use Creating a Tablespace with BR*Tools You can use BR*Tools [Page 181] for Oracle to create a new tablespace. Start the procedure using BRGUI or BRTOOLS.log logs all structure changes.tse displays the details. The detail log [Page 440] s<encoded timestamp>. This section describes how you create a tablespace with BR*Tools. The structure change log [Page 443] struc<DBSID>. see Showing Logs and Profiles with BR*Tools [Page 353].2.

Choose Continue. Command line You need to enter at least the following command: brspace –f tscreate You can enter more parameters. Choose Create tablespace. Set the required options: Menu Entry Meaning 220 April 2004 .4 BR*Tools for Oracle DBA 4. 2. see SAP Naming Conventions for Tablespaces and Data Files [Page 44]. BRGUI or BRTOOLS prompts you to start BRSPACE. see BRSPACE -f tscreate [Page 426]. see How to Use BR*Tools [Page 195]. For more information. iii. 6. BRSPACE displays the menu Space options for creation of tablespace. BRSPACE displays the Tablespace creation main menu. Set the required options: Menu Entry Meaning Tablespace name (tablespace) Tablespace contents (contents) Segment space management (space) SAP owner of tablespace (owner) Data type in tablespace (data) Joined index/table tablespace (join) -f tscreate -t|-tablespace [Page 426] -f tscreate -c|-contents [Page 426] -f tscreate -s|-space [Page 426] -f tscreate -o|-owner [Page 426] -f tscreate -d|-data [Page 426] -f tscreate -j|-join [Page 426] For more information on naming the new tablespace. 5. 4. if required. BRSPACE starts and you see a message that includes Start of BRSPACE processing. or from the command line – you can take advantage of quick mode if you know the object name. From now on.2 BR*Tools in Action BRSPACE command line (command) This shows you the BRSPACE -f tscreate [Page 426] command that is to be executed using the current settings. If you have already entered the tablespace name. Choose Continue to start BRSPACE. 3. including the tablespace name. Whichever way you start the procedure – with BRGUI or BRTOOLS. Choose Continue. in this case the tablespace name. BRSPACE writes a detail log [Page 440]. BRSPACE displays the menu Main options for creation of tablespace. continue with step 4 (quick mode). iv. For more information.

you can enter not only full path names. or just sapdata<N> to specify in which sapdata directory the file is to be located. see -f tscreate -f|-file [Page 426]. BRSPACE automatically extends the incomplete file name to the full path name according to the SAP naming convention [Page 44]. set the required options for the joined index tablespace: Menu Entry Meaning Index tablespace file name (xfile) Raw disk / link destination (xrawlink) File size in MB (xsize) File autoextend mode (xautoextend) Maximal file size in MB (xmaxsize) File increment size in MB (xincrsize) -f tscreate -xf|-xfile [Page 426] -f tscreate -xr|-xrawlink [Page 426] -f tscreate -xs|-xsize [Page 426] -f tscreate –xa|-xautoextend [Page 426] -f tscreate -xm|-xmaxsize [Page 426] -f tscreate -xi|-xincrsize [Page 426] For the xfile option. BRSPACE automatically extends the incomplete file name to the full path name according to the SAP naming convention [Page 44]. BRSPACE displays the menu Space options for creation of index tablespace.2 BR*Tools in Action Tablespace file name (file) Unless you specified it at the command line. Results April 2004 221 . 8. 7. see your Oracle SQL documentation. To start processing with the selected options. If Data type in tablespace is table. you can enter not only full path names. or just sapdata<N> to specify in which sapdata directory the file is to be located. choose Continue. For the file option.4 BR*Tools for Oracle DBA 4. If Data type in tablespace is table. but also the sapdata path name. but also the sapdata path name. BRSPACE automatically enters the file name according to the SAP naming convention. Raw disk / link destination (rawlink) File size in MB (size) File autoextend mode (autoextend) Maximal file size in MB (maxsize) File increment size in MB (incrsize) SQL command (command) -f tscreate -r|-rawlink [Page 426] -f tscreate -s|-size [Page 426] -f tscreate -a|-autoextend [Page 426] -f tscreate -m|-maxsize [Page 426] -f tscreate -i|-incrsize [Page 426] The SQL command that is to be executed using the current settings. For more information. For more information. BRSPACE creates the table and index tablespaces together.

Procedure .2. iii. Command line You need to enter at least the following command: 222 April 2004 .. Choose Continue to start BRSPACE. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace name (tablespace) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f tsdrop -t|-tablespace [Page 428] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f tsdrop [Page 428] command that is to be executed using the current settings.tsc displays the details..3 Use Dropping a Tablespace with BR*Tools You can use BR*Tools [Page 181] for Oracle to drop a tablespace. BRGUI or BRTOOLS prompts you to start BRSPACE. see Showing Logs and Profiles with BR*Tools [Page 353]. see Managing Tablespaces [Page 65]. • • • The summary log [Page 442] space<DBSID>. 1. For more information on how to view the logs with BR*Tools. Start the procedure using BRGUI or BRTOOLS. For more information on the approach to dropping a tablespace. iv.2 BR*Tools in Action Check the results in the BRSPACE logs [Page 440]. 4. This section describes how you drop a tablespace with BR*Tools. ii. or from the command line: BRGUI or BRTOOLS: i.4 BR*Tools for Oracle DBA 4.log logs all structure changes. Choose Space Management → Drop tablespace BRGUI or BRTOOLS displays the menu BRSPACE options for drop tablespace.log displays the return code. The detail log [Page 440] s<encoded timestamp>. The structure change log [Page 443] struc<DBSID>. Choose Continue. where you specify the options with which you call BRSPACE.2.

choose Continue. • The summary log [Page 442] space<DBSID>. in this case the tablespace name. From now on. If you have already entered the tablespace name. see BRSPACE -f tsdrop [Page 428]. 3. List Entry Meaning Pos Tablespace Files/AuExt Total [KB] Used[%] Free [KB] ExtSize [KB] 4. continue with step 5 (quick mode). Choose Drop tablespace.2 BR*Tools in Action brspace –f tsdrop You can enter more parameters. Set the required options: Menu Entry Meaning Number of files in tablespace (files) – display only Number of files in the tablespace Total tablespace size in MB (size) – display only Total tablespace size -f tsdrop -f|-force [Page 428] The SQL command that is to be executed using the current settings. see your Oracle SQL documentation. Select a tablespace. including the tablespace name. 5. or from the command line – you can take advantage of quick mode if you know the object name. Results Check the results in the BRSPACE logs [Page 440]. see How to Use BR*Tools [Page 195].4 BR*Tools for Oracle DBA 4. BRSPACE displays the Tablespace drop main menu. For more information. Force tablespace drop (force) SQL command (command) 6. BRSPACE starts and you see a message that includes Start of BRSPACE processing. if required. To start processing with the selected options. BRSPACE displays the list of tablespaces. For more information. Whichever way you start the procedure – with BRGUI or BRTOOLS. List sequence number Tablespace name Number of data files / number of data files with autoextend Total size of all data files of the tablespace Percentage of space in tablespace that is used Amount of space in tablespace that is free Maximal size that the tablespace can be autoextended BRSPACE displays the menu Options for dropping of tablespace. For more information. BRSPACE writes a detail log [Page 440]. 2.log displays the return code. April 2004 223 .

see Showing Logs and Profiles with BR*Tools [Page 353]. Choose Space Management → Alter tablespace.4 BR*Tools for Oracle DBA 4. The structure change log [Page 443] struc<DBSID>. For more information on how to view the logs with BR*Tools. or from the command line: BRGUI or BRTOOLS: i. see Managing Tablespaces [Page 65]. iii.tsd displays the details.. Choose the action: Set tablespace online Set tablespace offline Set backup status Reset backup status Coalesce free extents BRGUI or BRTOOLS displays the menu BRSPACE options for alter tablespace. where you specify the options with which you call BRSPACE. BRGUI or BRTOOLS displays the menu Alter tablespace. ii.log logs all structure changes.2.2 BR*Tools in Action • • The detail log [Page 440] s<encoded timestamp>. 1. Procedure .2. 4. For more information on the approach to altering a tablespace. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace names (tablespace) -p|-profile [Page 439] -u|-user [Page 439] -f tsalter -t|-tablespace [Page 429] 224 April 2004 ..4 Use Altering a Tablespace with BR*Tools You can use BR*Tools [Page 181] for Oracle to alter a tablespace as follows: • • • • • Set tablespace online Set tablespace offline Set backup status Reset backup status Coalesce free extents This section describes how you alter a tablespace with BR*Tools. Start the procedure using BRGUI or BRTOOLS.

PSAPRAWD is a valid entry. if required. v. PSAPRAWI. List sequence number Tablespace name Number of data files / number of data files with autoextend set April 2004 225 . If you have entered multiple tablespaces. in this case the tablespace name. but you cannot use wildcards. BRSPACE displays the tablespace list: List Entry Meaning Pos. or from the command line – you can use quick mode if you know the object name. If required. .4 BR*Tools for Oracle DBA 4. 4. If required. continue with step 6 (quick mode). BRSPACE displays as confirmation a List of tablespaces for alter. including the tablespace name and action. 3. If you have already entered the tablespace name. Choose or confirm the required action (see the list of actions in step 1 above). in Tablespace names you can enter the names of multiple tablespaces. but PSAPRAW* is not a valid entry.2 BR*Tools in Action Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f tsalter [Page 429] command that is to be executed using the current settings. Continue with step 6 (quick mode). go back and make a new selection. Command line: Enter at least the following command: brspace –f tsalter You can enter more parameters. You cannot make a selection from this list. BRGUI or BRTOOLS prompts you to start BRSPACE. BRSPACE starts and you see a message that includes Start of BRSPACE processing. Choose Continue to start BRSPACE. Choose Continue. For more information. BRSPACE displays the Alter tablespace main menu. Whichever way you start the procedure – with BRGUI or BRTOOLS. iv. continue with step 6 (quick mode).. From now on. 2. For more information. see How to Use BR*Tools [Page 195]. Tablespace Files/AuExt.. For example. BRSPACE writes a detail log [Page 440]. see BRSPACE -f tsalter [Page 429]. If you have already entered the tablespace name and action.

To start processing with the selected options. temp or undo Tablespace status – online or offline Segment space management – auto or manual Tablespace extent management – local or dictionary Tablespace backup status BRSPACE only displays the tablespaces that can be processed by your chosen action. choose Continue. Backup Tablespace type: data. enter 1. To select all entries. Current backup status (backup) – display only Alter tablespace action (action) – display only Set offline mode (mode) Force offline mode (force) SQLPLUS command line (command) 7.4 BR*Tools for Oracle DBA 4.5.3. To select the first three tablespaces in the list. 5. To select the first and third tablespaces. if you choose Set tablespace online. enter 1-3. enter 0. Results Check the results in the BRSPACE logs [Page 440]. ExtMan. For more information on how to view the logs with BR*Tools. see your Oracle SQL documentation. For more information.2 BR*Tools in Action Type Status SegMan. These examples apply only to input in character mode. enter 1-3.log displays the return code. only the tablespaces that are currently offline are displayed. • • The summary log [Page 442] space<DBSID>. 6. see Showing Logs and Profiles with BR*Tools [Page 353]. Set the required options: Menu Entry Meaning Current tablespace status (status) – display only Current status of the tablespace Current backup status of the tablespace The action that you selected above -f tsalter -m|-mode [Page 429] -f tsalter -f|-force [Page 429] The SQL command that is to be executed using the current settings.tsa displays the details. Select a tablespace or multiple tablespaces. For example. The detail log [Page 440] s<encoded timestamp>. BRSPACE displays the menu. 226 April 2004 . To select the first three tablespaces and the fifth. Options for alter of tablespace.

Start the procedure using BRGUI or BRTOOLS. BRGUI or BRTOOLS displays the menu Alter data file. iii. ii. 1..2.2. see Managing Data Files [Page 68] Procedure .2 BR*Tools in Action 4. For more information on the approach to altering a data file..4 BR*Tools for Oracle DBA 4.5 Use Altering a Data File with BR*Tools You can use BR*Tools [Page 181] for Oracle to alter a data file as follows: • • • • • Set data file online Set data file offline Switch on and maintain autoextend Switch off autoextend Resize data file This section describes how you alter a data file with BR*Tools. or from the command line: BRGUI or BRTOOLS: i. Choose Space Management → Alter data file. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Data file names (file) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f dfalter -f|-file [Page 429] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dfalter [Page 429] command that is to be executed using the April 2004 227 . Choose the action: Set data file online Set data file offline Maintain autoextend Switch off autoextend Resize data file BRGUI or BRTOOLS displays the menu BRSPACE options for alter data file. where you specify the options with which you call BRSPACE.

Choose or confirm the required action (see the list of actions in step 1 above). From now on. Continue with step 6 (quick mode). You can also enter Oracle file IDs instead of path names.data1 is a valid entry. including the data file name and action. If required.. 2. go back and make a new selection. If you have already entered the data file name. 3. BRSPACE displays the Alter data file main menu. see How to Use BR*Tools [Page 195]. If you have already entered the data file name and action. 4. If required.2 BR*Tools in Action current settings. Whichever way you start the procedure – with BRGUI or BRTOOLS. File List sequence number Tablespace name for the data file Data file status – online. Choose Continue to start BRSPACE. see BRSPACE -f dfalter [Page 429]. BRSPACE displays as confirmation a List of data files for alter. For more information. Tablespace Status Type Size AuExt. If you have entered multiple data files. iv. but you cannot use wildcards. BRGUI or BRTOOLS prompts you to start BRSPACE. but /oracle/GC2/sapdata* is not a valid entry. offline. /oracle/GC2/sapdata3/users_1/users. BRSPACE starts and you see a message that includes Start of BRSPACE processing. BRSPACE writes a detail log [Page 440].data1. v.. /oracle/GC2/sapdata4/xdb/xdb.4 BR*Tools for Oracle DBA 4. For more information. in this case the data file name. continue with step 6 (quick mode). in Data file names you can enter the names of multiple data files. Command line: Enter at least the following command: brspace –f dfalter You can enter more parameters. For example. continue with step 6 (quick mode). or from the command line – you can use quick mode if you know the object name. if required. You cannot make a selection from this list. Choose Continue. BRSPACE displays the data file list: List Entry Meaning Pos. . system or recover Data file type – regular or raw disk Data file size Autoextend setting File name 228 April 2004 .

enter 1. To select the first and third data files. The detail log [Page 440] s<encoded timestamp>. enter 1-3.dfa displays the details. April 2004 229 . enter 1-3. Options for alter of data file. only the data files that are currently offline are displayed. For example. Select a data file or multiple data files. 5. choose Continue. • • • The summary log [Page 442] space<DBSID>. Set the required options: Menu Entry Meaning Current data file status (status) – display only Current status of the data file Current size of the data file The action that you selected above -f dfalter -f|-force [Page 429] -f dfalter -m|-maxsize [Page 429] -f dfalter -i|-incrsize [Page 429] -f dfalter -s|-size [Page 429] The SQL command that is to be executed using the current settings. For more information.2 BR*Tools in Action BRSPACE only displays the data files that can be processed by your chosen action. see your Oracle SQL documentation. Results Check the results in the BRSPACE logs [Page 440].3. 6.log displays the return code. To start processing with the selected options.log logs all structure changes. For more information on how to view the logs with BR*Tools. Current datafile size in MB (currsize) – display only Alter data file action (action) – display only Force offline mode (force) Maximal file size in MB (maxsize) File increment size in MB (incrsize) New data file size in MB (size) SQLPLUS command line (command) 7.2.4 BR*Tools for Oracle DBA 4. These examples apply only to input in character mode. To select the first three data files in the list. see Showing Logs and Profiles with BR*Tools [Page 353].2.6 Use Moving a Data File with BR*Tools You can use BR*Tools [Page 181] for Oracle to move a data file. 4.5. BRSPACE displays the menu. The structure change log [Page 443] struc<DBSID>. To select the first three data files and the fifth. if you choose Set data file online.

. including the data file. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Data file names (file) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f dfmove -f|-file [Page 430] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dfmove [Page 430] command that is to be executed using the current settings. Choose Continue. where you specify the options with which you call BRSPACE. if required. iv. see Managing Data Files [Page 68] Procedure . Choose Space Management → Move data file. in 230 April 2004 . Whichever way you start the procedure – with BRGUI or BRTOOLS. For more information.2 BR*Tools in Action This section describes how you move a data file with BR*Tools. but /oracle/GC2/sapdata* is not a valid entry. but you cannot use wildcards. iii. If required. /oracle/GC2/sapdata4/xdb/xdb. For example.. For more information on the approach to moving a data file. . BRGUI or BRTOOLS displays the menu BRSPACE options for move data file. or from the command line – you can use quick mode if you know the object name. see BRSPACE -f dfmove [Page 430].4 BR*Tools for Oracle DBA 4. Command line: Enter at least the following command: brspace –f dfmove You can enter more parameters.. or from the command line: BRGUI or BRTOOLS: i.. in Data file names you can enter the names of multiple data files. Choose Continue to start BRSPACE. 1. ii. /oracle/GC2/sapdata3/users_1/users. BRGUI or BRTOOLS prompts you to start BRSPACE. Start the procedure using BRGUI or BRTOOLS.data1. You can also enter Oracle file IDs instead of path names.data1 is a valid entry.

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

this case the data file name. For more information, see How to Use BR*Tools [Page 195]. BRSPACE starts and you see a message that includes Start of BRSPACE processing. From now on, BRSPACE writes a detail log [Page 440]. BRSPACE displays the Move data file main menu. 2. If you have already entered the data file name, continue with step 5 (quick mode).

If you have entered multiple data files, BRSPACE displays as confirmation a List of data files for moving. You cannot make a selection from this list. If required, go back and make a new selection. Continue with step 5 (quick mode). 3. Choose Move data file. BRSPACE displays the data file list:
List Entry Meaning

Pos. Tablespace Status Type Size File

List sequence number Tablespace name for the data file Data file status – online, offline, system, or recover Data file type – regular or raw disk Data file size File name

4. Select a data file or multiple data files.

These examples apply only to input in character mode. To select the first three data files in the list, enter 1-3. To select the first and third data files, enter 1,3. To select the first three data files and the fifth, enter 1-3,5. To select all entries, enter 0. BRSPACE displays the menu, Options for moving data file. 5. Set the required options:
Menu Entry Meaning

Current datafile size in MB (currsize)
– display only

Current data file size Destination of link to a raw disk or to a non-sapdata directory, if any -f dfmove -d|-destination [Page 430] -f dfmove -r|-rawlink [Page 430] -f dfmove -p|-parallel [Page 430] -f dfmove -f|-force [Page 430] The SQL command that is to be executed using the current settings. For more information, see your Oracle SQL

Current link destination (currlink)
– display only

Move destination (destination) Raw disk / link destination (rawlink) Parallel copy processes (parallel) Force instance shutdown (force) SQLPLUS command line (command)

April 2004

231

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

documentation. 6. To start processing with the selected options, choose Continue.

Results
Check the results in the BRSPACE logs [Page 440].

• • •

The summary log [Page 442] space<DBSID>.log displays the return code. The detail log [Page 440] s<encoded timestamp>.dfm displays the details. The structure change log [Page 443] struc<DBSID>.log logs all structure changes.

For more information on how to view the logs with BR*Tools, see Showing Logs and Profiles with BR*Tools [Page 353].

4.2.2.7
Use

Showing Tablespaces with BR*Tools

You can use BR*Tools [Page 181] for Oracle to show information about tablespaces.

Procedure
...

1. Start the procedure using BRGUI or BRTOOLS, or from the command line: BRGUI or BRTOOLS: i. Choose Space management → Additional space functions → Show tablespaces. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information, where you specify the options with which you call BRSPACE. ii. Set the required options:
Menu Entry Equivalent BRSPACE Command Option

BRSPACE profile (profile) Database user/password (user) Database tablespace (tablespace)
iii. Choose Continue.

-p|-profile [Page 439] -u|-user [Page 439] -f dbshow -t|-tablespace [Page 423]

BRGUI or BRTOOLS displays a further menu, BRSPACE options for showing database information, where you specify the additional options with which you call BRSPACE.
Menu Entry Equivalent BRSPACE Command Option

Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language)

-f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439]

232

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

BRSPACE command line (command)

This shows you the BRSPACE –f dbshow –c tsinfo [Page 423] command that is to be executed using the current settings.

iv. v.
...

Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. Choose Continue to start BRSPACE.

Command line: Enter at least the following command:

brspace –f dbshow –c tsinfo
You can enter more parameters if required. For more information, see BRSPACE -f dbshow [Page 423]. BRSPACE starts and you see a message that includes Start of BRSPACE processing. From now on, BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). If you started BRSPACE from the command line without the information class name (-c|-class) – that is, with brspace –f dbshow – BRSPACE displays the Show database information main menu. Choose Show database space information → Show tablespaces. 2. If you have already entered the tablespace name, continue with step 4. BRSPACE displays the List of database tablespaces:
List Entry Meaning

Pos. Tablespace Type Status ExtMan. SegMan. Backup Files/AuExt. Total[KB] Used[%] Free[KB] ExtSize[KB] FreeExt Largest[KB]

List sequence number Tablespace name Tablespace type: data, temp or undo Tablespace status: online or offline Tablespace extent management: local or dictionary Segment space management: auto or manual Tablespace backup status Number of data files / number of data files with autoextend set Total tablespace size Used space in tablespace Free space in tablespace Maximal size the tablespace can be extended Number of free extents in tablespace Size of largest free extents in tablespace

3. To see more information, select one or more tablespaces.

April 2004

233

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

These examples apply to input in character mode. To select the first three entries in the list, enter 1-3. To select the first and third entries, enter 1,3. To select the first three entries and the fifth, enter 1-3,5. To select all entries, enter 0. BRSPACE displays Information about tablespace:
List Entry Meaning

Tablespace type (type) Tablespace status (status) Extent management (extent) Segment space management (space) Backup status (backup) Number of files in tablespace (files) Number of autoextensible files (autoext) Total tablespace size in KB (total) Used space in tablespace in % (used) Free space in tablespace in KB (free) Maximal extension size in KB (extsize) Number of free extents (freext) Largest free extents (largest)

Tablespace type: data, temp or undo Tablespace status: online or offline Tablespace extent management – local or dictionary Segment space management – auto or manual Tablespace backup status Number of data files in tablespace Number of data files with autoextend set Total tablespace size Used space in tablespace Free size in tablespace Maximal size the tablespace can be extended Number of free extents in tablespace Size of largest extents in tablespace in KB

4. If you specified multiple tablespaces, choose Continue to scroll through.

Results
If you set the option Create log file (parameter –l|-log), check the results in the BRSPACE logs [Page 440].

• •

The summary log [Page 442] space<DBSID>.log displays the return code. The detail log [Page 440] s<encoded timestamp>.dbw displays the details.

For more information on how to view the logs with BR*Tools, see Showing Logs and Profiles with BR*Tools [Page 353].

4.2.2.8

Showing Data Files with BR*Tools

234

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

Use
You can use BR*Tools [Page 181] for Oracle to show information about data files.

Procedure
...

1. Start the procedure using BRGUI or BRTOOLS, or from the command line: BRGUI or BRTOOLS: i. Choose Space management → Additional space functions → Show data files. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information, where you specify the options with which you call BRSPACE. ii. Set the required options:
Menu Entry Equivalent BRSPACE Command Option

BRSPACE profile (profile) Database user/password (user) Database tablespace (tablespace) Database file (file)
iii. Choose Continue.

-p|-profile [Page 439] -u|-user [Page 439] -f dbshow -s|-tablespace [Page 423] -f dbshow -f|-file [Page 423]

BRGUI or BRTOOLS displays a further menu, BRSPACE options for showing database information, where you specify the additional options with which you call BRSPACE.
Menu Entry Equivalent BRSPACE Command Option

Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command)

-f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE –f dbshow -c dfinfo [Page 423] command that is to be executed using the current settings.

iv. v.
...

Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. Choose Continue to start BRSPACE.

Command line: Enter at least the following command:

brspace –f dbshow –c dfinfo
You can enter more parameters if required. For more information, see BRSPACE -f dbshow [Page 423].

April 2004

235

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

BRSPACE starts and you see a message that includes Start of BRSPACE processing. From now on, BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). If you started BRSPACE from the command line without the information class name (-c|-class) – that is, with brspace –f dbshow – BRSPACE displays the Show database information main menu. Choose Show database space information → Show data files. 2. If you have already entered the data file name, continue with step 4. BRSPACE displays the List of database files:
List Entry Meaning

Pos. Tablespace Status Type File Id. Size[KB] Device Back. AuExt. MaxSize[KB] IncrSize[KB]

List sequence number Tablespace name for the data file Data file status: online, offline, system or recover Data file type: raw device or file system Data file name Data file ID Data file size Disk device ID Backup status Whether data file has autoextend set Maximum size of the data file Data file increment size

3. To see more information, select one or more data files.

These examples apply only to input in character mode. To select the first three entries in the list, enter 1-3. To select the first and third entries, enter 1,3. To select the first three entries and the fifth, enter 1-3,5. To select all entries, enter 0. BRSPACE displays Information about data file:
List Entry Meaning

Data file Id (Id) Data file status (status) Tablespace name (tablespace) Backup status (backup) Data file type (type) Disk device Id (device)

Data file ID Data file status: online, offline, system or recover Tablespace name for the data file Backup status Data file type: raw device or file system Disk device ID

236

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

Data file size in KB (size) File autoextend mode (autoextend) Maximal file size in KB (maxsize) File increment size in KB (incrsize)

Data file size Whether data file has autoextend set Maximum size of the data file Data file increment size

4. If you specified multiple data files, choose Continue to scroll through.

Results
If you set the option Create log file (parameter –l|-log), check the results in the BRSPACE logs [Page 440].

• •

The summary log [Page 442] space<DBSID>.log displays the return code. The detail log [Page 440] s<encoded timestamp>.dbw displays the details.

For more information on how to view the logs with BR*Tools, see Showing Logs and Profiles with BR*Tools [Page 353]

4.2.2.9
Use

Showing Redo Log Files with BR*Tools

You can use BR*Tools [Page 181] for Oracle to show information about online redo log files.

Procedure
...

1. Start the procedure using BRGUI or BRTOOLS, or from the command line: BRGUI or BRTOOLS: i. Choose Space management → Additional space functions → Show redolog files. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information, where you specify the options with which you call BRSPACE. ii. Set the required options:
Menu Entry Equivalent BRSPACE Command Option

BRSPACE profile (profile) Database user/password (user) Database file (file)
iii. Choose Continue.

-p|-profile [Page 439] -u|-user [Page 439] -f dbshow -f|-file [Page 423]

BRGUI or BRTOOLS displays a further menu, BRSPACE options for showing database information, where you specify the additional options with which you call BRSPACE.

April 2004

237

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action Menu Entry Equivalent BRSPACE Command Option

Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command)

-f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbshow -c rfinfo [Page 423] command that is to be executed using the current settings.

iv. v.
...

Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. Choose Continue to start BRSPACE.

Command line: Enter at least the following command:

brspace –f dbshow –c rfinfo
You can enter more parameters if required. For more information, see BRSPACE -f dbshow [Page 423]. BRSPACE starts and you see a message that includes Start of BRSPACE processing. From now on, BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). If you started BRSPACE from the command line without the information class name (-c|-class) – that is, with brspace –f dbshow – BRSPACE displays the Show database information main menu. Choose Show database space information → Show redolog files. 2. If you have already entered the redo log file name, continue with step 4. BRSPACE displays the List of database online redolog files:
List Entry Meaning

Pos. Status Group Thread Size[KB] Device Type File

List sequence number Redo log file status Redo log group number Redo log thread number Redo log file size Disk device ID for the redo log file Redo log file type: raw device or file system Redo log file name

3. To see more information, select one or more redo log files.

These examples apply only to input in character mode.

238

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

To select the first three entries in the list, enter 1-3. To select the first and third entries, enter 1,3. To select the first three entries and the fifth, enter 1-3,5. To select all entries, enter 0. BRSPACE displays Information about online redolog file:
List Entry Meaning

Redolog group number (group) Redolog thread number (thread) Redolog file status (status) Redolog file type (type) Disk device Id (device) Redolog file size in KB (size)

Redo log group number Redo log thread number Redo log file status Redo log file type: raw device or file system Disk device ID for the redo log file Redo log file size

4. If you specified multiple redo log files, choose Continue to scroll through.

Results
If you set the option Create log file (parameter –l|-log), check the results in the BRSPACE logs [Page 440].

• •

The summary log [Page 442] space<DBSID>.log displays the return code. The detail log [Page 440] s<encoded timestamp>.dbw displays the details.

For more information on how to view the logs with BR*Tools, see Showing Logs and Profiles with BR*Tools [Page 353]

4.2.2.10
Use

Showing Control Files with BR*Tools

You can use BR*Tools [Page 181] for Oracle to show information about control files.

Procedure
...

1. Start the procedure using BRGUI or BRTOOLS, or from the command line: BRGUI or BRTOOLS: i. Choose Space management → Additional space functions → Show control files. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information, where you specify the options with which you call BRSPACE. ii. Set the required options:
Menu Entry Equivalent BRSPACE Command Option

BRSPACE profile (profile) Database user/password (user)

-p|-profile [Page 439] -u|-user [Page 439]

April 2004

239

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

Database file (file)
iii. Choose Continue.

-f dbshow -f|-file [Page 423]

BRGUI or BRTOOLS displays a further menu, BRSPACE options for showing database information, where you specify the additional options with which you call BRSPACE.
Menu Entry Equivalent BRSPACE Command Option

Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command)

-f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbshow -c cfinfo [Page 423] command that is to be executed using the current settings.

iv. v.
...

Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. Choose Continue to start BRSPACE.

Command line: Enter at least the following command:

brspace –f dbshow –c cfinfo
You can enter more parameters if required. For more information, see BRSPACE -f dbshow [Page 423]. BRSPACE starts and you see a message that includes Start of BRSPACE processing. From now on, BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). If you started BRSPACE from the command line without the information class name (-c|-class) – that is, with brspace –f dbshow – BRSPACE displays the Show database information main menu. Choose Show database space information → Show control files. 2. If you have already entered the control file name, continue with step 4. BRSPACE displays the List of database control files:
List Entry Meaning

Pos. Size Device Type File

List sequence number Control file size Disk device ID for the control file Control file type: raw device or file system Control file name

3. To see more information, select one or more control files.

240

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

These examples apply only to input in character mode. To select the first three entries in the list, enter 1-3. To select the first and third entries, enter 1,3. To select the first three entries and the fifth, enter 1-3,5. To select all entries, enter 0. BRSPACE displays Information about control file:
List Entry Meaning

Control file type (type) Device device Id (device) Control file size (size)

Control file type: raw device or file system Disk device ID for the control file Control file size

4. If you specified multiple control files, choose Continue to scroll through.

Results
If you set the option Create log file (parameter –l|-log), check the results in the BRSPACE logs [Page 440].

• •

The summary log [Page 442] space<DBSID>.log displays the return code. The detail log [Page 440] s<encoded timestamp>.dbw displays the details.

For more information on how to view the logs with BR*Tools, see Showing Logs and Profiles with BR*Tools [Page 353]

4.2.2.11
Use

Showing Disk Volumes with BR*Tools

You can use BR*Tools [Page 181] for Oracle to show information about database disk volumes.

Procedure
...

1. Start the procedure using BRGUI or BRTOOLS, or from the command line: BRGUI or BRTOOLS: i. Choose Space management → Additional space functions → Show disk volumes. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information, where you specify the options with which you call BRSPACE. ii. Set the required options:
Menu Entry Equivalent BRSPACE Command Option

BRSPACE profile (profile) Database user/password (user)
iii. Choose Continue.

-p|-profile [Page 439] -u|-user [Page 439]

April 2004

241

Choose Continue to start BRSPACE. These examples apply only to input in character mode. iv. BRSPACE displays the List of database disk volumes: List Entry Meaning Pos. Device Total[KB] Used[%] Free[KB] Directory/raw disk List sequence number Disk device ID for the disk volume Total space on volume Used space on volume Free space on volume Name of directory or raw disk where volume is located 2.4 BR*Tools for Oracle DBA 4. From now on. select one or more disk volumes. . Command line: Enter at least the following command: brspace –f dbshow –c dvinfo You can enter more parameters if required. To select the first three entries in the list.. BRSPACE starts and you see a message that includes Start of BRSPACE processing. see BRSPACE -f dbshow [Page 423]. Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbshow -c dvinfo [Page 423] command that is to be executed using the current settings. If you started BRSPACE from the command line without the information class name (-c|-class) – that is. For more information. 242 April 2004 . BRSPACE options for showing database information. Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. where you specify the additional options with which you call BRSPACE. enter 1-3. Choose Show database space information → Show disk volumes.2 BR*Tools in Action BRGUI or BRTOOLS displays a further menu. To see more information.. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). with brspace –f dbshow – BRSPACE displays the Show database information main menu. v.

5. check the results in the BRSPACE logs [Page 440]. For more information on how to view the logs with BR*Tools.dbw displays the details. • If required. Integration • BRGUI or BRTOOLS calls the SAP tool BRSPACE. • • The summary log [Page 442] space<DBSID>. To select the first three entries and the fifth. To select all entries.2. Results If you set the option Create log file (parameter –l|-log). enter 0.3 Use Segment Management with BR*Tools You can manage the segments – that is. You can also manage segments by calling BRSPACE from the command line. tables and indexes – on your Oracle database with BR*Tools [Page 181]. BRSPACE displays menus to help you enter the required options. set the following parameters for BRSPACE in the Initialization Profile init<DBSID>. If you specified multiple disk volumes.log displays the return code.2 BR*Tools in Action To select the first and third entries. including space reserved for superuser 3. see Segment Management [Page 70]. enter 1-3. BRSPACE displays Information about disk volume: List Entry Meaning Device Id (device) Total space in KB (total) Used space in % (used) Free space in KB (free) All free space in KB (afree) Disk device ID for the disk volume Total space on volume Used space on volume Free space on volume All free space on volume. to control the screen display April 2004 243 .sap [Page 488]: scroll_lines [Page 516] and show_period [Page 516].3. This is because the menus in BRGUI or BRTOOLS simplify entry of the correct options. This section describes how you manage segments with BR*Tools. enter 1. We recommend you to normally use BRGUI or BRTOOLS rather than BRSPACE. The detail log [Page 440] s<encoded timestamp>. unless you choose batch mode with the option –c force. choose Continue to scroll through. see Showing Logs and Profiles with BR*Tools [Page 353] 4.4 BR*Tools for Oracle DBA 4. However. For more information on the approach to manage segments.

4. the tables or indexes – for segment management functions in one or more of the following ways: • • • By specifying tables or indexes directly by name By specifying a tablespace name – all objects in the specified tablespace are selected By specifying the owner name – all objects with the specified owner are selected. you choose Segment Management → Reset input values to set the defaults used to the values set after BRGUI or BRTOOLS initialization. you can use wildcards or a parameter in the initialization profile init<DBSID>. This is useful for systems with Multiple Components in One Database (MCOD). You choose Segment management in the BRGUI or BRTOOLS menus or directly from the command line. If required.. You start segment management..sap and restart BRGUI or BRTOOLS. 1. Selecting Objects You can select the objects – that is.4 BR*Tools for Oracle DBA 4. If required. Selecting Multiple Objects When specifying tables or indexes directly by name. You check the results of segment management in the BRSPACE logs [Page 440]. see BR*Tools User Interface [Page 189] 2. you change the default values for the parameters in the initialization profile init<DBSID>. You can use quick mode if you know which objects you require.sap [Page 488] to select multiple tables or indexes. you can use one of the following types of wildcard: Final selection wildcard. BRSPACE selects all tables or indexes beginning with the characters “dba.” 244 April 2004 . using the character “*” If you enter dba*.2 BR*Tools in Action reorg_table [Page 510] to specify a list of tables for reorganization rebuild_index [Page 508] to specify a list of indexes for rebuild exp_table [Page 503] to specify a list of tables for export imp_table [Page 503] to specify a list of tables for import Features You can perform the following functions for segment management with BR*Tools: • • • • • • Reorganize tables Rebuild indexes Export tables Import tables Alter tables Alter indexes Activities . or call BRSPACE from the command line. • Wildcards When you use BRGUI or BRTOOLS. 3. For more information on quick mode.

For more information on the approach to table reorganization. If you use wildcards on the final object to select multiple objects in quick mode. For example. for the function “Alter index” you can only make a final selection with a wildcard by entering “*” or “<prefix>*” in the index name field. You can make a final selection with wildcards only on the final object for the function. April 2004 245 . For example. That is.sap [Page 488] to specify a long list of object names: reorg_table [Page 510] specifies a list of tables to reorganize rebuild_index [Page 508] specifies a list of indexes to rebuild exp_table [Page 503] specifies a list of tables to export imp_table [Page 503] specifies a list of tables to import 4. export. Pre-selection wildcard. BRSPACE preselects all tables or indexes beginning with the characters “dba. Note the following features when using wildcards: • • • You must always put the wildcard at the end. you can only use wildcards to directly specify groups of tables or indexes.2 BR*Tools in Action BRSPACE displays a list of tables or indexes meeting your selection criterion.2. • • You can use the following parameters from the initialization profile init<DBSID>. or index for the function alter or rebuild indexes.” this is treated as a pre-selection wildcard.1 Use Reorganizing Tables with BR*Tools You can use BR*Tools [Page 181] for Oracle to reorganize tables online. if required. This section describes how you reorganize a table with BR*Tools. dba* is valid. but this is only for confirmation. but db*a is not valid. The final object is the one specified in the function name – that is.” BRSPACE displays a list of tables or indexes meeting your selection criterion. see: • • Reorganization [Page 72] Reorganization Case Study [Page 76] Prerequisites You cannot perform online reorganization for tables with LONG or LONG RAW fields. or alter tables. Wildcards are not valid for tablespaces or owners.3.4 BR*Tools for Oracle DBA 4. You can now make a further selection from this list. table for the functions reorganize. import. BRSPACE displays a list of objects for confirmation. using the character “%” If you enter dba%. You cannot make a further selection. If you enter “*” or “<prefix>*” in the table name field for “Alter index.

see BRSPACE -f tbreorg [Page 431].4 BR*Tools for Oracle DBA 4. For more information.. If required. Start the procedure using BRGUI or BRTOOLS. 246 April 2004 . Choose Continue to start BRSPACE.. where you specify the options with which you call BRSPACE. including the table names.. in Table names you can enter the names of multiple tables. BRGUI or BRTOOLS displays the menu BRSPACE options for reorganization of tables.. You can use wildcards. or from the command line: BRGUI or BRTOOLS: i. BRSPACE processes all the tables in the specified tablespace name(s) or all tables belonging to the specified table owner(s). you can specify multiple objects but you cannot use wildcards. 1. Command line: Enter at least the following command: brspace –f tbreorg You can enter more parameters. In Tablespace names and Table owner. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace names (tablespace) Table owner (owner) Table names (table) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f tbreorg -s|-tablespace [Page 431] -f tbreorg -o|-owner [Page 431] -f tbreorg -t|-table [Page 431] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f tbreorg [Page 431] command that is to be executed using the current settings. You can also specify a list of tables to be processed with reorg_table [Page 510] in the initialization profile init<DBSID>.2 BR*Tools in Action Procedure .sap. . Choose Segment Management → Reorganize tables. BRGUI or BRTOOLS prompts you to start BRSPACE. For more information. ii. iv. iii. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. if required. Choose Continue.

BRSPACE writes a detail log [Page 440]. enter 1-3. From now on. To select all tables. which contains multiple procedures. If you have entered multiple tables. 2. April 2004 247 . or from the command line – you can use quick mode if you know the final object names. 3. Select a table or multiple tables. continue with step 5 (quick mode). BRSPACE displays as confirmation a List of tables for reorganization. BRSPACE displays the Table reorganization main menu.3. enter 1-3.5. To select the first three tables and the fifth. BRSPACE displays the table list: List Entry Meaning Pos. Owner Table Part. To start processing with the selected options. BRSPACE starts and you see a message that includes Start of BRSPACE processing. BRSPACE displays the menu.2 BR*Tools in Action Whichever way you start the procedure – with BRGUI or BRTOOLS. choose Continue. If you have not already made a final selection. see How to Use BR*Tools [Page 195]. enter 1.4 BR*Tools for Oracle DBA 4. Choose Reorganize tables. Set the required options: Menu Entry Meaning New destination tabelspace (newts) Separate index tablespace (indts) Parallel threads (parallel) Create DDL statements (DDL) -f tbreorg -n|-newts [Page 431] -f tbreorg -i|-indts [Page 431] -f tbreorg -p|-parallel [Page 431] -f tbreorg -d|-ddl [Page 431] There is no SQL command line here because the reorganization is performed in several steps by an Oracle package. Options for reorganization of tables. enter 0. in this case the table names. 5. These examples only apply to input in character mode. If you have already entered the table names. you can make a selection from this list. To select the first and third tables. 6. For more information. Continue with step 5 (quick mode). Rows Space [KB] Data [KB:%] List sequence number Table owner Table name Partitioned Number of rows Space occupied by the table Amount of data in the table: percentage of occupied space 4. To select the first three tables in the list.

2 Use Rebuilding Indexes with BR*Tools You can use BR*Tools [Page 181] for Oracle to rebuild indexes. The file ddl.4 BR*Tools for Oracle DBA 4. • • The summary log [Page 442] space<DBSID>. ii. Choose Segment Management → Rebuild indexes.sql is created in the subdirectory <encoded timestamp> of the directory $SAPDATA_HOME/sapreorg if the option –d|-ddl is set to a value other than no. 4. If the – d|-ddl option is set to only. Start the procedure using BRGUI or BRTOOLS. or from the command line: BRGUI or BRTOOLS: i.tbr displays the details. 248 April 2004 . Procedure . where you specify the options with which you call BRSPACE. BRGUI or BRTOOLS displays the menu BRSPACE options for rebuild of indexes.2 BR*Tools in Action Results Check the results in the BRSPACE logs [Page 440]..3.log displays the return code. then only DDL statements are created and the actual reorganization is not performed. The detail log [Page 440] s<encoded timestamp>. For more information. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace names (tablespace) Index owner (owner) Table names (table) Index names (index) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f idrebuild -s|-tablespace [Page 432] -f idrebuild -o|-owner [Page 432] -f idrebuild -t|-table [Page 432] -f idrebuild -i|-index [Page 432] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f idrebuild [Page 432] command that is to be executed using the current settings.. see Showing Logs and Profiles with BR*Tools [Page 353]. see Reorganization [Page 72]. The file contains the Data Definition Language (DDL) statements used for the creation of interim tables during the reorganization. For more information on how to view the logs with BR*Tools.2. 1.

. If you have not already made a final selection.sap. you can enter the names of multiple objects in Index names or Table names. BRSPACE writes a detail log [Page 440]. BRSPACE displays the index list: List Entry Meaning Pos. continue with step 5 (quick mode). you can specify multiple objects but you cannot use wildcards. You can also use wildcards. Continue with step 5 (quick mode). Choose Rebuild indexes. Owner Table Index Part. BRSPACE processes all the indexes in the specified tablespace name(s).2 BR*Tools in Action If required.. BRSPACE starts and you see a message that includes Start of BRSPACE processing. you can make a selection from this list. iv. In Tablespace names and Index owner. see BRSPACE -f idrebuild [Page 432].4 BR*Tools for Oracle DBA 4. iii. For more information. you can only finally select indexes by entering a wildcard with “*” or “<prefix>*” in the Index name. Whichever way you start the procedure – with BRGUI or BRTOOLS. Choose Continue. Command line: Enter at least the following command: brspace –f idrebuild You can enter more parameters. From now on. or from the command line – you can use quick mode if you know the final object names. in this case the index names. Choose Continue to start BRSPACE. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. However. For more information.. BRGUI or BRTOOLS prompts you to start BRSPACE. If you have already entered the index names. For more information. if required. BRSPACE displays the Rebuild indexes main menu. Tablespace List sequence number Index owner Table name Index name Partitioned Tablespace name April 2004 249 . 2. If you enter “*” or “<prefix>*” in Table name. or all indexes belonging to the specified index owner(s) or tables. including the indexes names. If you have entered multiple indexes. see How to Use BR*Tools [Page 195]. it is treated as a preselection. 3. not a final selection. You can also specify a list of indexes to be processed with rebuild_index [Page 508] in the initialization profile init<DBSID>. BRSPACE displays as confirmation a List of indexes for rebuild.

4 BR*Tools for Oracle DBA 4. 1. enter 1-3.2. enter 1-3. To select the first three indexes in the list.3 Use Exporting Tables with BR*Tools You can use BR*Tools [Page 181] for Oracle to export tables to an operating system file. These examples only apply to input in character mode. Procedure .2 BR*Tools in Action 4. enter 0. This section describes how you export tables with BR*Tools. choose Continue. enter 1. To select the first three indexes and the fifth. The detail log [Page 440] s<encoded timestamp>. To select the first and third indexes. For more information on how to view the logs with BR*Tools. ii. To select all indexes.3. • • The summary log [Page 442] space<DBSID>. Do not use this procedure for the transport of database objects between databases. Do not use this procedure for restore.5. 5. Select an index or multiple indexes. BRGUI or BRTOOLS displays the menu BRSPACE options for export tables. Start the procedure using BRGUI or BRTOOLS. or from the command line: BRGUI or BRTOOLS: i. 4. BRSPACE displays the menu Options for rebuild of indexes. Choose Segment Management → Export tables.. For more information on the approach to table export. see Export/Import [Page 75].3. where you specify the options with which you call BRSPACE. Set the required options: Menu Entry Meaning New tablespace (newts) Parallel threads (parallel) SQL command (command) -f idrebuild -n|-newts [Page 432] -f idrebuild -i|-indts [Page 432] This shows you the SQL command that is to be executed using the current settings. 6. see Showing Logs and Profiles with BR*Tools [Page 353].log displays the return code. Set the required options: 250 April 2004 . To start processing with the selected options. Results Check the results in the BRSPACE logs [Page 440]..idr displays the details.

see How to Use BR*Tools [Page 195]. BRSPACE starts and you see a message that includes Start of BRSPACE processing. in Table names you can enter the names of multiple tables. For more information. Whichever way you start the procedure – with BRGUI or BRTOOLS. iii. Choose Continue to start BRSPACE. For more information. BRSPACE writes a detail log [Page 440]. You can also specify the dump directory using the parameter exp_dump_dir [Page 503] in the initialization profile init<DBSID>. .2 BR*Tools in Action Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace names (tablespace) Table owner (owner) Table names (table) Export dump directory Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f tbexport -s|-tablespaces [Page 433] -f tbexport -o|-owner [Page 433] -f tbexport -t|-tables [Page 433] -f tbexport -u|-dumpdir [Page 433] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the -BRSPACE -f -tbexport [Page 433] command that is to be executed using the current settings. If required. BRGUI or BRTOOLS prompts you to start BRSPACE.. if required. In Tablespace names and Table owner. including the table names. you can specify multiple objects but you cannot use wildcards. If you have already entered the table names. For more information. but the entry you make on the screen overwrites the profile parameter. You can use wildcards. iv. From now on. see -BRSPACE -f -tbexport [Page 433]. BRSPACE processes all the tables in the specified tablespace name(s) or all tables belonging to the specified table owner(s).4 BR*Tools for Oracle DBA 4.sap. Command line: Enter at least the following command: brspace –f tbexport You can enter more parameters. in this case the table names. continue with step 5 (quick mode). 2. April 2004 251 . Choose Continue.. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. or from the command line – you can use quick mode if you know the final object names.

3. Main options for export of tables. enter 1-3. enter 1.5. 5. These examples only apply to input in character mode: To select the first three tables in the list. select 0. Additional options for export of tables. Continue with step 5 (quick mode). BRSPACE displays the Export tables main menu. BRSPACE displays the table list: List Entry Meaning Pos. if any The table owner that you selected above. choose Continue BRSPACE displays the menu. To select all tables. Set the required options: Menu Entry Meaning Tablespaces for export (tablespaces) – display only The tablespace that you selected above.4 BR*Tools for Oracle DBA 4. if any -f tbexport -r|-rows [Page 433] -f tbexport -i|-indexes [Page 433] -f tbexport -c|-constraints [Page 433] -f tbexport -g|-grants [Page 433] -f tbexport -t|-triggers [Page 433] Owners for export (owner) – display only Export table rows (rows) Export table indexes (indexes) Export table constraints (constraints) Export table grants (grants) Export table triggers (triggers) 6. Choose Export tables. Rows Space [KB] Data [KB:%] List sequence number Table owner Table name Partitioned Number of rows Space occupied by the table Amount of data in the table: percentage of occupied space 4. Menu Entry Meaning Use direct path (direct) -f tbexport -d|-direct [Page 433] 252 April 2004 . When you have set the required options. BRSPACE displays as confirmation a List of tables for export.2 BR*Tools in Action If you have entered multiple tables. BRSPACE displays the menu. Select a table or multiple tables. you can make a selection from this list. enter 1-3. If you have not already made a final selection. To select the first and third tables. To select the first three tables and the fifth. Owner Table Part. 3.

It contains the parameters for the Oracle export tool. 7. Do not use this procedure for restore.4 Use Importing Tables with BR*Tools You can use BR*Tools [Page 181] for Oracle to import tables from an operating system file. Choose Segment Management → Import tables.log displays the return code. expdat. Results Check the results in the BRSPACE logs [Page 440]. BRGUI or BRTOOLS displays the menu BRSPACE options for import tables. Start the procedure using BRGUI or BRTOOLS.. 4. 1. April 2004 253 . see Export/Import [Page 75].tbe displays the details. • • The summary log [Page 442] space<DBSID>. For more information. To start processing with the selected options. Two files are created during the export: • • The export dump file. EXP.2 BR*Tools in Action Export buffer size in KB (buffer) Compress table extents (compress) Consistent export (consistent) Max. The detail log [Page 440] s<encoded timestamp>. Procedure . or from the command line: BRGUI or BRTOOLS: i. This section describes how you import tables with BR*Tools.. see your Oracle documentation. The parameter file parfile. is created in subdirectory <encoded timestamp>. Do not use this procedure for the transport of database objects between databases.4 BR*Tools for Oracle DBA 4. choose Continue.dmp. For more information on how to view the logs with BR*Tools. For more information on the approach to table import. where you specify the options with which you call BRSPACE.3.2. size of dump file in MB (filesize) Force table export (force) EXP command -f tbexport -b|-buffer [Page 433] -f tbexport -m|-compress [Page 433] -f tbexport -n|-consistent [Page 433] -f tbexport -z|-filesize [Page 433] -f tbexport -f|-force [Page 433] The EXP command that is to be executed using the current settings. see Showing Logs and Profiles with BR*Tools [Page 353].exp is created in subdirectory <encoded timestamp> of the directory $SAPDATA_HOME/sapreorg.edd of the dump directory.

including the table names. see BRSPACE -f tbimport [Page 435]. If you have already entered the BRSPACE export run or the export file name. For more information.2 BR*Tools in Action ii. iv. BRGUI or BRTOOLS prompts you to start BRSPACE. From now on.4 BR*Tools for Oracle DBA 4. 3. BRSPACE displays the list of BRSPACE exports for import: List Entry Meaning Pos. in this case the name of the BRSPACE export run or the export file name. Choose Import tables.. Run Date Tables Dumps List sequence number BRSPACE export identifier – BRSPACE log name Export date Number of tables in export Number of export dump files 254 April 2004 . Choose Continue. or from the command line – you can use quick mode if you know the final object names. BRSPACE starts and you see a message that includes Start of BRSPACE processing. BRSPACE writes a detail log [Page 440]. continue with step 5 (quick mode). For more information. . Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) BRSPACE export run / dump file (export) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f tbimport -x|-export [Page 435] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f tbimport [Page 435] command that is to be executed using the current settings. Command line: Enter at least the following command: brspace –f tbimport You can enter more parameters. BRSPACE displays the Import tables main menu. if required. Whichever way you start the procedure – with BRGUI or BRTOOLS. 2. iii. Choose Continue to start BRSPACE.. see How to Use BR*Tools [Page 195].

choose Continue BRSPACE displays the menu Additional options for import. is created in subdirectory <encoded timestamp> of the directory $SAPDATA_HOME/sapreorg. For more information. BRSPACE displays the menu Main options for import. see menu entry BRSPACE export run / dump file above. -f tbimport -b|-buffer [Page 435] -f tbimport -m|-commit [Page 435] -f tbimport -n|-ignore [Page 435] -f tbimport -z|-filesize [Page 435] Force table import (force) IMP command -f tbimport -f|-force [Page 435] The IMP command that is to be executed using the current settings. The parameter file. April 2004 255 .tbi displays the details. For more information. Results Check the results in the BRSPACE logs [Page 440].4 BR*Tools for Oracle DBA 4.IMP. size of dump file in MB (filesize) – input only possible if the dump file is not from BRSPACE. For more information on how to view the logs with BR*Tools. IMP. When you have set the required options. To start processing with the selected options. The detail log [Page 440] s<encoded timestamp>. see Showing Logs and Profiles with BR*Tools [Page 353]. 5. choose Continue. Menu Entry Meaning Import buffer size in KB (buffer) Commit after each array insert (commit) Ignore creation errors (ignore) Max. Set the required options: Menu Entry Meaning Import type (type) Owners for export (owner) Tables for import (tables) Import table rows (rows) Import table indexes (indexes) Import table constraints (constraints) Import table grants (grants) -f tbimport -t|-type [Page 435] -f tbimport -o|-owner [Page 435] -f tbimport -t|-tables [Page 435] -f tbimport -r|-rows [Page 435] -f tbimport -i|-indexes [Page 435] -f tbimport -c|-constraints [Page 435] -f tbimport -g|-grants [Page 435] 6.log displays the return code. It contains the parameters for the Oracle import tool. see your Oracle documentation. • • The summary log [Page 442] space<DBSID>.2 BR*Tools in Action Size [KB] Total size of the export dump file(s) 4. Select an export run. PARFILE. 7.

3. Start the procedure using BRGUI or BRTOOLS. ii. where you specify the options with which you call BRSPACE. see Segment Management [Page 70]..4 BR*Tools for Oracle DBA 4. 256 April 2004 . Choose Segment Management → Alter tables.2 BR*Tools in Action 4.2. BRGUI or BRTOOLS displays the menu Alter tables.. For more information on the approach to altering tables. Procedure . or from the command line: BRGUI or BRTOOLS: i. iii. 1. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace names (tablespace) Table owner (owner) Table names (table) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f tbalter -s|-tablespace [Page 436] -f tbalter -o|-owner [Page 436] -f tbalter -t|-table [Page 436] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f tbalter [Page 436] command that is to be executed using the current settings. Choose the action: Switch on table monitoring Switch off table monitoring Set parallel degree BRGUI or BRTOOLS displays the menu BRSPACE options for alter tables.5 Use Altering Tables with BR*Tools You can use BR*Tools [Page 181] for Oracle to alter tables as follows: • • • Switch on table monitoring Switch off table monitoring Set parallel degree This section describes how you alter tables with BR*Tools.

If you have already entered the table names and action. You can also use wildcards. Choose Continue to start BRSPACE. BRSPACE displays as confirmation a List of tables for alter.. continue with step 6 (quick mode). if required. . or from the command line – you can use quick mode if you know the final object names. Paral. If you have already entered the table names. BRSPACE starts and you see a message that includes Start of BRSPACE processing. For more information. BRSPACE displays the Alter tables main menu. Owner Table Part. 3. Choose or confirm the required action (see the list of actions in step 1 above). in Table names you can enter the names of multiple tables. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. BRGUI or BRTOOLS prompts you to start BRSPACE. BRSPACE writes a detail log [Page 440]. you can specify multiple objects but you cannot use wildcards. in this case the table names. BRSPACE processes all the tables in the specified tablespace name(s) or all tables belonging to the specified table owner(s). If you have not already made a final selection. continue with step 6 (quick mode). For more information. Choose Continue. Continue with step 6 (quick mode). Parts Monit. v. 2. List sequence number Table owner Table name Partitioned Number of partitions Table monitoring setting Parallel degree April 2004 257 . If you have entered multiple tables. iv. see BRSPACE -f tbalter [Page 436]. From now on. see How to Use BR*Tools [Page 195]. 4. In Tablespace names and Table owner.2 BR*Tools in Action If required.4 BR*Tools for Oracle DBA 4. Command line: Enter at least the following command: brspace –f tbalter You can enter more parameters. BRSPACE displays the table list: List Entry Meaning Pos.. Whichever way you start the procedure – with BRGUI or BRTOOLS. you can make a selection from this list. including the table names and action. For more information.

choose Continue.5. To select all tables. enter 1-3.2. For more information. see your Oracle SQL documentation. only the tables that currently have table monitoring on are displayed. 6.tba displays the details. enter 0. • • The summary log [Page 442] space<DBSID>. enter 1-3.3. see Showing Logs and Profiles with BR*Tools [Page 353]. Set the required options: Menu Entry Meaning Current monitoring status (monitoring) – display only Current monitoring status of the table Current parallel degree of the table The action that you selected above -f tbalter -d|-degree [Page 436] The SQL command that is to be executed using the current settings.6 Use Altering Indexes with BR*Tools You can use BR*Tools [Page 181] for Oracle to alter indexes as follows: • • Coalesce index Set degree of parallelism 258 April 2004 . The detail log [Page 440] s<encoded timestamp>.4 BR*Tools for Oracle DBA 4. if you choose Switch off table monitoring. To select the first three tables and the fifth. For more information on how to view the logs with BR*Tools. Results Check the results in the BRSPACE logs [Page 440]. 5. Options for alter of tables. To select the first and third tables. To start processing with the selected options.log displays the return code. Select a table or multiple tables. 4.2 BR*Tools in Action BRSPACE only displays the tables that can be processed by your chosen action. Current parallel degree (currdeg) – display only Alter table action (action) – display only New parallel degree (degree) SQL command line (command) 7. enter 1. For example. These examples only apply to input in character mode. To select the first three tables in the list.3. BRSPACE displays the menu.

iii. in Table names and Index names you can enter the names of multiple objects.. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. BRGUI or BRTOOLS prompts you to start BRSPACE. where you specify the options with which you call BRSPACE. you can specify multiple objects but you cannot use wildcards. For more information on the approach to altering indexes. 1. Choose Continue. or from the command line: BRGUI or BRTOOLS: i. In Tablespace names and Table owner. ii. see Segment Management [Page 70]. For more information. Choose Segment Management → Alter indexes.4 BR*Tools for Oracle DBA 4. iv. April 2004 259 . Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Tablespace names (tablespace) Index owner (owner) Table names (table) Index names (index) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -p|-profile [Page 439] -u|-user [Page 439] -f idalter -s|-tablespace [Page 437] -f idalter -o|-owner [Page 437] -f idalter -t|-table [Page 437] -f idalter -i|-index [Page 437] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f idalter [Page 437] command that is to be executed using the current settings.2 BR*Tools in Action This section describes how you alter indexes with BR*Tools.. BRSPACE processes all the indexes in the specified tablespace(s) or all indexes belonging to the specified index owner(s) or table(s). Start the procedure using BRGUI or BRTOOLS. BRGUI or BRTOOLS displays the menu Alter indexes. Procedure . You can also use wildcards. Choose the action: Coalesce index Set parallel degree BRGUI or BRTOOLS displays the menu BRSPACE options for alter indexes. If required.

enter 1. 2. BRSPACE displays as confirmation a List of indexes for alter. Set the required options: 260 April 2004 . continue with step 6 (quick mode). enter 1-3. Choose or confirm the required action (see the list of actions in step 1 above). Whichever way you start the procedure – with BRGUI or BRTOOLS. If you have not already made a final selection.5. 6. Continue with step 6 (quick mode)... To select the first three indexes in the list. enter 1-3. Command line: Enter at least the following command: brspace –f idalter You can enter more parameters. BRSPACE displays the Alter indexes main menu. 4. If you have entered multiple indexes. or from the command line – you can use quick mode if you know the object names. For more information. To select the first and third indexes. 3. For more information. you can make a selection from this list. in this case the index names. if required. BRSPACE starts and you see a message that includes Start of BRSPACE processing. Parts Paral. enter 0. To select all indexes. including the index names and action. continue with step 6 (quick mode). . These examples only apply to input in character mode. BRSPACE displays the menu. Select an index or multiple indexes. Options for alter of indexes. see BRSPACE -f idalter [Page 437]. Owner Table Index Part. To select the first three indexes and the fifth. List sequence number Index owner Table name Index name Partitioned Number of partitions Parallel degree 5. BRSPACE displays the index list: List Entry Meaning Pos. If you have already entered the index names and action.2 BR*Tools in Action v. If you have already entered the index names. From now on. see How to Use BR*Tools [Page 195]. Choose Continue to start BRSPACE.3. BRSPACE writes a detail log [Page 440].4 BR*Tools for Oracle DBA 4.

Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database tablespace (tablespace) Database owner (owner) Database table (table) -p|-profile [Page 439] -u|-user [Page 439] -f dbshow -s|-tablespace [Page 423] -f dbshow -o|-owner [Page 423] -f dbshow -t|-table [Page 423] April 2004 261 .4 BR*Tools for Oracle DBA 4. For more information. see your Oracle SQL documentation. For more information on how to view the logs with BR*Tools. Alter index action (action) – display only New parallel degree (degree) SQL command line (command) 7... BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information. The detail log [Page 440] s<encoded timestamp>. Choose Segment management → Additional segment functions → Show tables.2 BR*Tools in Action Menu Entry Meaning Current parallel degree (currdeg) – display only Current parallel degree of the index The action that you selected above -f idalter -d|-degree [Page 437] The SQL command that is to be executed using the current settings.7 Use Showing Tables with BR*Tools You can use BR*Tools [Page 181] for Oracle to show information about tables. To start processing with the selected options. Start the procedure using BRGUI or BRTOOLS. • • The summary log [Page 442] space<DBSID>. 4.2. ii. 1.log displays the return code.ida displays the details.3. see Showing Logs and Profiles with BR*Tools [Page 353]. choose Continue. Procedure . or from the command line: BRGUI or BRTOOLS: i. where you specify the options with which you call BRSPACE. Results Check the results in the BRSPACE logs [Page 440].

. Choose Show database segment information → Show tables.. iv. Command line: Enter at least the following command: brspace –f dbshow –c tbinfo You can enter more parameters if required. For more information. Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE –f dbshow -c tbinfo [Page 423] command that is to be executed using the current settings.. in Database table you can enter the names of multiple tables by using wildcards. where you specify the additional options with which you call BRSPACE. continue with step 4. BRSPACE starts and you see a message that includes Start of BRSPACE processing. For more information. BRSPACE options for showing database information. In Database tablespace and Database owner. If you started BRSPACE from the command line without the information class name (-c|-class) – that is. you can specify multiple objects but you cannot use wildcards. with brspace –f dbshow – BRSPACE displays the Show database information main menu. 2. BRSPACE displays the List of database tables: List Entry Meaning Pos. see BRSPACE -f dbshow [Page 423]. If you have already entered a single table name. Owner Table List sequence number Table owner Table name 262 April 2004 . Choose Continue to start BRSPACE. iii. v. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log).4 BR*Tools for Oracle DBA 4. BRGUI or BRTOOLS displays a further menu. BRSPACE processes all the tables in the specified tablespace(s) or all tables belonging to the specified owner(s).2 BR*Tools in Action If required. From now on. Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. Choose Continue. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243].

enter 1-3.2 BR*Tools in Action Part. To select the first three entries in the list. select one or more tables. Inds Tablespace Analyzed Rows Space[KB] Used[KB:%] Data [KB:%] Partitioned: yes or no Number of partitions for partitioned table Monitoring attribute Degree of parallelism Number of indexes Tablespace name Date last analyzed by update statistics Number of rows Total space allocated to the table Used space in table: percentage of total space used Amount of data in the table: percentage of total space for data 3. enter 0. To select all entries. BRSPACE displays Information about table: List Entry Meaning Partitioned table (partitioned) Number of partitions (partitions) Monitoring attribute (monitoring) Parallel degree (parallel) Number of indexes (indexes) Tablespace name (tablespace) Last analyzed (analyzed) Sample size (sample) Number of rows (rows) Allocated space in KB (space) Used space in KB / % (used) Pure data in KB / % (data) Number of chained rows (chained) Next extent size in KB (next) Partitioned: yes or no Number of partitions for partitioned table Monitoring attribute Degree of parallelism Number of indexes Tablespace name Date last analyzed by update statistics Sample size of update statistics Number of rows Total space allocated to the table Used space in table / percentage of total space used Amount of data in the table / percentage of total space for data Number of chained rows Next extent size April 2004 263 .5.3. To select the first and third entries. These examples only apply to input in character mode.4 BR*Tools for Oracle DBA 4. enter 1. Parts Monit. To select the first three entries and the fifth. enter 1-3. To see more information. Paral.

For more information. • • The summary log [Page 442] space<DBSID>. Results If you set the option Create log file (parameter –l|-log). BRSPACE processes all the indexes in the specified tablespace(s). see Showing Logs and Profiles with BR*Tools [Page 353]. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information. check the results in the BRSPACE logs [Page 440].. 264 April 2004 .8 Use Showing Indexes with BR*Tools You can use BR*Tools [Page 181] for Oracle to show information about indexes. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database tablespace (tablespace) Database owner (owner) Database table (table) Database index (index) -p|-profile [Page 439] -u|-user [Page 439] -f dbshow -s|-tablespace [Page 423] -f dbshow -o|-owner [Page 423] -f dbshow -t|-table [Page 423] -f dbshow -i|-index [Page 423] If required.dbw displays the details.3. you can enter the names of multiple objects in Database index or Database table by using wildcards. For more information on how to view the logs with BR*Tools.2. Procedure . or from the command line: BRGUI or BRTOOLS: i. 4..4 BR*Tools for Oracle DBA 4. you can specify multiple objects but you cannot use wildcards. If you specified multiple tables. In Database tablespace and Database owner. choose Continue to scroll through. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. or all indexes belonging to the specified owner(s) or table(s). Choose Segment management → Additional segment functions → Show indexes.log displays the return code. Start the procedure using BRGUI or BRTOOLS. 1. where you specify the options with which you call BRSPACE. The detail log [Page 440] s<encoded timestamp>. ii.2 BR*Tools in Action Maximal number of extents (maxexts) Maximum number of extents possible 4.

BRGUI or BRTOOLS displays a further menu. with brspace –f dbshow – BRSPACE displays the Show database information main menu. continue with step 4. From now on. v. Choose Show database segment information → Show indexes. Tablespace Analyzed List sequence number Table owner Table name Index name Number of partitions for partitioned table Degree of parallelism Tablespace name Date last analyzed by update statistics April 2004 265 . If you have already entered a single index name. . Command line: Enter at least the following command: brspace –f dbshow –c idinfo You can enter more parameters if required. If you started BRSPACE from the command line without the information class name (-c|-class) – that is. BRSPACE options for showing database information. Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE –f dbshow -c idinfo [Page 423] command that is to be executed using the current settings.2 BR*Tools in Action iii. Choose Continue to start BRSPACE. where you specify the additional options with which you call BRSPACE... Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. BRSPACE displays the List of database indexes: List Entry Meaning Pos. see BRSPACE -f dbshow [Page 423].4 BR*Tools for Oracle DBA 4. BRSPACE starts and you see a message that includes Start of BRSPACE processing. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). Choose Continue. 2. For more information. iv. Owner Table Index Parts Paral.

2 BR*Tools in Action Rows Space[KB] Used[KB:%] Data [KB:%] Number of rows Total space allocated to the index Used space in index: percentage of total space used Amount of data in index: percentage of total space for data To see more information. BRSPACE displays Information about index: List Entry Meaning Unique index (unique) Bitmap index (bitmap) Partitioned index (partitioned) Number of partitions (partitions) Parallel degree (parallel) Table name (table) Tablespace name (tablespace) Last analyzed (analyzed) Sample size (sample) Number of rows (rows) Allocated space in KB (space) Used space in KB / % (used) Pure data in KB / % (data) Next extent size (next) Maximal number of extents (maxextents) Unique index: yes or no Bitmap index: yes or no Partitioned index: yes or no Number of partitions for partitioned index Degree of parallelism Table name Tablespace name Date last analyzed by update statistics Sample size of update statistics Number of rows Total space allocated to the index Used space in index: percentage of total space used Amount of data in index: percentage of total space for data Next extent size Maximum number of extents possible 3. select one or more indexes. choose Continue to scroll through. 266 April 2004 . To select the first three entries and the fifth.3.4 BR*Tools for Oracle DBA 4. To select all entries.log displays the return code. check the results in the BRSPACE logs [Page 440]. enter 0. • • The summary log [Page 442] space<DBSID>. enter 1-3. The detail log [Page 440] s<encoded timestamp>. enter 1-3. Results If you set the option Create log file (parameter –l|-log).dbw displays the details. If you specified multiple indexes. To select the first three entries in the list. enter 1. These examples only apply to input in character mode.5. To select the first and third entries.

2. where you specify the additional options with which you call BRSPACE.2 BR*Tools in Action For more information on how to view the logs with BR*Tools. BRGUI or BRTOOLS displays a further menu. ii. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. Choose Continue. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information. In Database tablespace and Database owner. Procedure . Start the procedure using BRGUI or BRTOOLS. in Database table you can enter the names of multiple tables by using wildcards. see Showing Logs and Profiles with BR*Tools [Page 353].3. or from the command line: BRGUI or BRTOOLS: i.4 BR*Tools for Oracle DBA 4.. BRSPACE options for showing database information. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database tablespace (tablespace) Database owner (owner) Database table (table) -p|-profile [Page 439] -u|-user [Page 439] -f dbshow -s|-tablespace [Page 423] -f dbshow -o|-owner [Page 423] -f dbshow -t|-table [Page 423] If required.9 Use Showing Table Partitions with BR*Tools You can use BR*Tools [Page 181] for Oracle to show information about table partitions. 1. Choose Segment management → Additional segment functions → Show table partitions. where you specify the options with which you call BRSPACE. BRSPACE processes all the table partitions in the specified tablespace or all table partitions belonging to the specified owner(s) or table(s). For more information. iii. you can specify multiple objects but you cannot use wildcards.. Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] April 2004 267 . 4.

List sequence number Partition owner Table name Partition name Tablespace name Date last analyzed by update statistics Number of rows Total space allocated to the table partition Used space in table partition: percentage of total space used (“high-water mark”) Amount of data in table partition: percentage of total space for data To see more information. For more information. iv. Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. BRSPACE starts and you see a message that includes Start of BRSPACE processing. To select the first three entries in the list. enter 1-3. v. Choose Continue to start BRSPACE. To select the first and third entries.5.3.. BRSPACE displays the List of database table partitions: List Entry Meaning Pos.2 BR*Tools in Action Message language (language) BRSPACE command line (command) -l|-language [Page 439] This shows you the BRSPACE –f dbshow -c tpinfo [Page 423] command that is to be executed using the current settings. . If you started BRSPACE from the command line without the information class name (-c|-class) – that is. continue with step 4. enter 1. If you have already entered a single table name. Choose Show database segment information → Show table partitions. Command line: Enter at least the following command: brspace –f dbshow –c tpinfo You can enter more parameters if required. select one or more table partitions. with brspace –f dbshow – BRSPACE displays the Show database information main menu. To select the first three entries and the fifth. From now on. enter 1-3. see BRSPACE -f dbshow [Page 423]. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). 2. 268 April 2004 ..4 BR*Tools for Oracle DBA 4. Owner Table Partition Tablespace Analyzed Rows Space[KB] Used[KB:%] Data [KB:%] 3.

If you specified multiple table partitions. Choose Segment management → Additional segment functions → Show index partitions. 1. The detail log [Page 440] s<encoded timestamp>. see Showing Logs and Profiles with BR*Tools [Page 353]. Procedure . ii. choose Continue to scroll through. 4. Start the procedure using BRGUI or BRTOOLS.2 BR*Tools in Action To select all entries. Set the required options: April 2004 269 . enter 0.2.dbw displays the details.. For more information on how to view the logs with BR*Tools. where you specify the options with which you call BRSPACE.4 BR*Tools for Oracle DBA 4. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information. • • The summary log [Page 442] space<DBSID>. Results If you set the option Create log file (parameter –l|-log).10 Use Showing Index Partitions with BR*Tools You can use BR*Tools [Page 181] for Oracle to show information about index partitions. BRSPACE displays Information about table partition: List Entry Meaning Hash partition (hash) Tablespace name (tablespace) Last analyzed (analyzed) Sample size (sample) Number of rows (rows) Allocated space in KB (space) Used space in KB / % (used) Pure data in KB / % (data) Number of chained rows (chained) Next extent size in KB (next) Maximal number of extents (maxexts) Hash partitions: yes or no Tablespace name Date last analyzed by update statistics Sample size of update statistics Number of rows Total space allocated to the table Used space in table / percentage of total space used (“high-water mark”) Amount of data in the table / percentage of total space for data Number of chained rows Next extent size Maximum number of extents possible 4..3. or from the command line: BRGUI or BRTOOLS: i.log displays the return code. check the results in the BRSPACE logs [Page 440].

For more information. BRGUI or BRTOOLS displays a further menu.2 BR*Tools in Action Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database tablespace (tablespace) Database table (table) Database index (index) -p|-profile [Page 439] -u|-user [Page 439] -f dbshow -s|-tablespace [Page 423] -f dbshow -t|-table [Page 423] -f dbshow -i|-index [Page 423] If required. 270 April 2004 . or index(es). BRSPACE starts and you see a message that includes Start of BRSPACE processing. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243].4 BR*Tools for Oracle DBA 4. Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. BRSPACE options for showing database information. where you specify the additional options with which you call BRSPACE. Choose Continue to start BRSPACE. Choose Continue. Command line: Enter at least the following command: brspace –f dbshow –c ipinfo You can enter more parameters if required. table(s). In Database tablespace. Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbshow -c ipinfo [Page 423] command that is to be executed using the current settings. iii. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). iv. .. From now on. BRSPACE processes all the index partitions in the specified tablespace(s).. see BRSPACE -f dbshow [Page 423]. or the index partitions belonging to the specified owner(s). in Database table you can enter the names of multiple tables or indexes by using wildcards. v. you can specify multiple objects but you cannot use wildcards. For more information.

enter 0. If you have already entered a single index name. April 2004 271 .3. enter 1. Choose Show database segment information → Show index partitions. enter 1-3. List sequence number Partition owner Table name Index name Partition name Tablespace name Date last analyzed by update statistics Number of rows Next extent size Maximum number of extents possible To see more information. To select the first and third entries. check the results in the BRSPACE logs [Page 440]. To select the first three entries in the list. To select all entries.5. BRSPACE displays the List of index partitions: List Entry Meaning Pos. 2. If you specified multiple index partitions. choose Continue to scroll through. select one or more index partitions. with brspace –f dbshow – BRSPACE displays the Show database information main menu. Results If you set the option Create log file (parameter –l|-log). BRSPACE displays Information about index partition: List Entry Meaning Hash partition (hash) Table name (table) Tablespace name (tablespace) Last analyzed (analyzed) Sample size (sample) Number of rows (rows) Next extent size in KB (next) Maximal number of extents (maxexts) Hash partition: yes or no Table name Tablespace name Date last analyzed by update statistics Sample size of update statistics Number of rows Next extent size Maximum number of extents possible 4. These examples only apply to input in character mode. Owner Table Index Partition Tablespace Analyzed Rows NextExt[KB] MaxExts 3. continue with step 4. enter 1-3. To select the first three entries and the fifth.4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action If you started BRSPACE from the command line without the information class name (-c|-class) – that is.

BRGUI or BRTOOLS displays a further menu. The detail log [Page 440] s<encoded timestamp>. For more information.2 BR*Tools in Action • • The summary log [Page 442] space<DBSID>. In Database tablespace and Database owner. 4. in Database table or Database index you can enter the names of multiple tables or indexes by using wildcards.. Menu Entry Equivalent BRSPACE Command Option 272 April 2004 . ii.log displays the return code. BRSPACE options for showing database information. iii.dbw displays the details. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information. where you specify the options with which you call BRSPACE. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. For more information on how to view the logs with BR*Tools.4 BR*Tools for Oracle DBA 4. Start the procedure using BRGUI or BRTOOLS.11 Use Showing Segments with BR*Tools You can use BR*Tools [Page 181] for Oracle to show information about database segments. 1. BRSPACE processes all the segments in the specified tablespace(s). Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database tablespace (tablespace) Database owner (owner) Database table (table) Database index (index) -p|-profile [Page 439] -u|-user [Page 439] -f dbshow -s|-tablespace [Page 423] -f dbshow -o|-owner [Page 423] -f dbshow -t|-table [Page 423] -f dbshow -i|-index [Page 423] If required. you can specify multiple objects but you cannot use wildcards.3. Choose Segment management → Additional segment functions → Show segments. Procedure . where you specify the additional options with which you call BRSPACE. or index(es).2. or from the command line: BRGUI or BRTOOLS: i.. table(s). see Showing Logs and Profiles with BR*Tools [Page 353]. Choose Continue. or all segments belonging to the specified owner(s).

From now on. For more information. indpart. rollback. tabpart. with brspace –f dbshow – BRSPACE displays the Show database information main menu. lobind. temp. Command line: Enter at least the following command: brspace –f dbshow –c sginfo You can enter more parameters if required. select one or more segments. If you started BRSPACE from the command line without information class name (-c|-class) – that is. These examples only apply to input in character mode. April 2004 273 .. v. Choose Show database segment information → Show segments. Owner Type Segment Partition Tablespace Size[KB] Extents NextExt[KB] MaxExts 2. cluster. . Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE.4 BR*Tools for Oracle DBA 4.. BRSPACE displays the List of database segments: List Entry Meaning Pos. index. lobseg. cache Segment name Partition name if applicable Tablespace name Segment size Number of extents Next extent size Maximum number of extents possible To see more information.2 BR*Tools in Action Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE –f dbshow -c sginfo [Page 423] command that is to be executed using the current settings. see BRSPACE -f dbshow [Page 423]. List sequence number Segment owner Segment type: table. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). Choose Continue to start BRSPACE. iv. BRSPACE starts and you see a message that includes Start of BRSPACE processing.

1. cluster.2.2 BR*Tools in Action To select the first three entries in the list. 4. lobseg. Procedure . enter 1-3..dbw displays the details. BRSPACE displays Information about segment: List Entry Meaning Segment type (type) Segment type: table.3. To select all entries.5.log displays the return code. To select the first three entries and the fifth. indpart. where you specify the options with which you call BRSPACE.4 BR*Tools for Oracle DBA 4. tabpart. check the results in the BRSPACE logs [Page 440]. For more information on how to view the logs with BR*Tools.12 Use Showing Segment Extents with BR*Tools You can use BR*Tools [Page 181] for Oracle to show information about segment extents.. ii. Start the procedure using BRGUI or BRTOOLS. rollback. Results If you set the option Create log file (parameter –l|-log). enter 0. • • The summary log [Page 442] space<DBSID>. see Showing Logs and Profiles with BR*Tools [Page 353]. enter 1-3. If you specified multiple segments. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) -p|-profile [Page 439] 274 April 2004 . Choose Segment management → Additional segment functions → Show segment extents. cache Tablespace name Segment size Number of extents Next extent size Maximum number of extents possible Tablespace name (tablespace) Segment size in KB (size) Number of extents (extents) Next extent size in KB (next) Maximal number of extents (maxext) 3.3. choose Continue to scroll through. temp. or from the command line: BRGUI or BRTOOLS: i. lobind. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information. The detail log [Page 440] s<encoded timestamp>. enter 1. To select the first and third entries. index.

4 BR*Tools for Oracle DBA 4. In Database tablespace. iv.. in Database table or Database Index you can enter the names of multiple tables or indexes by using wildcards. . Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. Choose Continue to start BRSPACE.2 BR*Tools in Action Database user/password (user) Database tablespace (tablespace) Database file (file) Database owner (owner) Database table (table) Database index (index) -u|-user [Page 439] -f dbshow -s|-tablespace [Page 423] -f dbshow -f|-file [Page 423] -f dbshow -o|-owner [Page 423] -f dbshow -t|-table [Page 423] -f dbshow -i|-index [Page 423] If required. see “Selecting Objects“ in Segment Management with BR*Tools [Page 243]. For more information. and Database owner. iii. see BRSPACE -f dbshow [Page 423]. Command line: Enter at least the following command: brspace –f dbshow –c seinfo You can enter more parameters if required. For more information. v. Database file. where you specify the additional options with which you call BRSPACE. April 2004 275 . you can specify multiple objects but you cannot use wildcards. BRGUI or BRTOOLS displays a further menu. BRSPACE starts and you see a message that includes Start of BRSPACE processing. BRSPACE processes all segment extents for the specified objects. BRSPACE options for showing database information.. Choose Continue. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbshow -c seinfo [Page 423] command that is to be executed using the current settings. From now on.

tabpart.2 BR*Tools in Action If you started BRSPACE from the command line without the information class name (-c|-class) – that is. lobind.4 BR*Tools for Oracle DBA 4. enter 0. tabpart. Owner Type Partition Tablespace Extent Id File Id Block Id Size[KB] List sequence number Segment owner Segment type: table. temp. with brspace –f dbshow – BRSPACE displays the Show database information main menu. BRSPACE displays Information about extent of segment: List Entry Meaning Segment type (type) Tablespace name (tablespace) Data file (file) Extent Id. To select the first three entries in the list. 276 April 2004 . enter 1. Choose Show database segment information → Show segment extents. rollback. lobseg. To select the first three entries and the fifth. index. index. enter 1-3. enter 1-3. If you specified multiple segment extents. temp. cache Partition name if applicable Tablespace name Extent ID File ID Block ID Extent size 2. To select the first and third entries. • The summary log [Page 442] space<DBSID>. lobseg. lobind. choose Continue to scroll through. To see more information.5. cluster. BRSPACE displays the List of segment extents: List Entry Meaning Pos. cluster.3. rollback. indpart. (block_id) Extent size in KB (size) Segment type: table. (extent_id) File Id. select one or more segment extents. These examples only apply to input in character mode. To select all entries. check the results in the BRSPACE logs [Page 440]. indpart. cache Tablespace name Data file name Extent ID File ID Relative file number Block ID Extent size 3. (file_id) Relative file number (file_no) Block Id. Results If you set the option Create log file (parameter –l|-log).log displays the return code.

see Showing Logs and Profiles with BR*Tools [Page 353].. Set the required options: Menu Entry Equivalent BRSPACE Command Option BRSPACE profile (profile) Database user/password (user) Database tablespace (tablespace) Database file (file) -p|-profile [Page 439] -u|-user [Page 439] -f dbshow -s|-tablespace [Page 423] -f dbshow -f|-file [Page 423] If required..dbw displays the details. BRSPACE processes all free extents for the specified objects. Choose Segment management → Additional segment functions → Show free extents. 4. iii. ii. BRGUI or BRTOOLS displays the menu BRSPACE options for showing database information. BRSPACE options for showing database information. where you specify the options with which you call BRSPACE. 1. Menu Entry Equivalent BRSPACE Command Option Create log file (log) Confirmation mode (confirm) Scrolling line count (scroll) Message language (language) BRSPACE command line (command) -f dbshow -l|-log [Page 423] -c|-confirm [Page 419] -s|-scroll [Page 439] -l|-language [Page 439] This shows you the BRSPACE -f dbshow -c feinfo [Page 423] command that is to be executed April 2004 277 . Choose Continue.3. where you specify the additional options with which you call BRSPACE. you can specify multiple objects but you cannot use wildcards. or from the command line: BRGUI or BRTOOLS: i. Procedure . Start the procedure using BRGUI or BRTOOLS. BRGUI or BRTOOLS displays a further menu.4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action • The detail log [Page 440] s<encoded timestamp>.13 Use Showing Free Extents with BR*Tools You can use BR*Tools [Page 181] for Oracle to show information about free extents. in Database tablespace and Database file. For more information on how to view the logs with BR*Tools.2.

If you specified multiple free extents. To select all entries. iv. enter 1.3. To select the first three entries and the fifth. (file_id) Relative file number (file_no) Block Id. BRSPACE displays Information about free extent: List Entry Meaning Tablespace name (tablespace) Data file (file) File Id. enter 0. with brspace –f dbshow – BRSPACE displays the Show database information main menu.. To select the first and third entries. Choose Continue BRGUI or BRTOOLS prompts you to start BRSPACE. enter 1-3. From now on..2 BR*Tools in Action using the current settings. 278 April 2004 . Choose Show database segment information → Show free extents.5. . see BRSPACE -f dbshow [Page 423]. BRSPACE writes a detail log [Page 440] if you set the option Create log file (parameter –l|-log). (block_id) Extent size in KB (size) Tablespace name Data file name File ID Relative file number Block ID Extent size 3. BRSPACE displays the List of free extents: List Entry Meaning Pos. Tablespace File Id Block Id Size[KB] List sequence number Tablespace name File ID Block ID Extent size 2. v. enter 1-3. choose Continue to scroll through. select one or more free extents. To select the first three entries in the list. BRSPACE starts and you see a message that includes Start of BRSPACE processing. These examples only apply to input in character mode. Command line: Enter at least the following command: brspace –f dbshow –c feinfo You can enter more parameters if required. To see more information.4 BR*Tools for Oracle DBA 4. If you started BRSPACE from the command line without the information class name (-c|-class) – that is. Choose Continue to start BRSPACE. For more information.

the backup files are essential. The detail log [Page 440] s<encoded timestamp>.2 BR*Tools in Action Results If you set the option Create log file (parameter –l|-log). 4. you must have access to all offline redo log files that have been written since the database backup. • For routine backups. you ought to back up the database to make the recovery procedure easier. For more information on how to view the logs with BR*Tools. You typically use BR*Tools for a one-off backup of the: • Database files. You can also make a database copy and back up non-database files and directories. see Showing Logs and Profiles with BR*Tools [Page 353]. after moving a data file. You can also perform a backup directly by calling BRBACKUP or BRARCHIVE from the command line. • • The summary log [Page 442] space<DBSID>. we strongly recommend you to: • • Run the database in ARCHIVELOG mode with automatic archival turned on.dbw displays the details. so creating the offline redo log files.log displays the return code. Offline redo log files. Therefore. Oracle copies the online redo log files to the archiving directory.4 Use Backup and Database Copy with BR*Tools You can back up the database files and offline redo log files of your Oracle database with BR*Tools. For more information. For example. check the results in the BRSPACE logs [Page 440]. If you have lost data and want to recover it. If you are performing an offline backup of the whole database.2. the temporary files and online redo log files are also backed up. one copy is often sufficient. April 2004 279 . Integration • BRTOOLS normally calls the SAP tool BRBACKUP or BRARCHIVE to perform the backup. In test systems. Otherwise you can only recover the database to the point in time of the last available redo log. Make two copies of the offline redo log files. such as after a structure change to the database. you must always back up the offline redo log files after a database backup. we recommend one of the following: • • • DBA Planning Calendar to schedule a backup and then view its log A scheduler offered by a supplier of the BACKINT interface The scheduler cron for UNIX or at for Windows If you need to recover your database. and immediately after an online backup.4 BR*Tools for Oracle DBA 4. In production systems. see Setting Up Archiving.

280 April 2004 . This situation is called “archiver stuck.." see SAP Note 316642. To avoid archiver stuck. the Oracle database system saves the online redo log files automatically as offline redo log files.sap. You can back up the offline redo log files regardless of the current status of the database and the SAP system. Unless you have changed the standard profile init<DBSID>. see Setting Up Archiving.” If this occurs you must back up the offline redo log files and delete them from the archive directory as soon as possible.4 BR*Tools for Oracle DBA 4. How often you do this depends on the amount of activity in your SAP System.. Features You can perform the following backup functions with BR*Tools: • • • • • • • Database backup Archivelog backup (that is. but the archiving process cannot save the online redo log files because the archiving directory is full. backup of the offline redo log files) Database copy Non-database backup Verification of database backup Verification of archivelog backup Additional functions Update of compression rates Preparation of RMAN backups Deletion of database disk backups Deletion of archivelog disk backups Controlling of BRARCHIVE run Initialization of BRBACKUP tape volumes Initialization of BRARCHIVE tape volumes BRTOOLS calls BRRESTORE for the verification functions.ora. • “Archiver stuck” problem The Oracle database hangs if it is operated in ARCHIVELOG mode. When necessary. be sure to constantly monitor the archive directory. For more information about avoiding "archiver stuck. If you have configured your system according to the SAP recommendations. save and delete the offline redo log files. For more information. If a lot of redo log entries are written. the offline redo log files are stored in the archive directory <SAPDATA_HOME>/saparch or <SAPDATA_HOME>/oraarch. Activities . • • Make sure the necessary parameters have been set for BRBACKUP and BRARCHIVE in the Initialization Profile init<DBSID>.2 BR*Tools in Action We recommend you to normally use BRTOOLS rather than BRBACKUP or BRARCHIVE. This is because the BRTOOLS menus simplify entry of the correct parameters. and the redo log files are frequently switched. back up the offline redo log files regularly to tape.

Prerequisites • • • Make sure the database is running in ARCHIVELOG mode.sap. see Volume Management. For more information. see Setting Up Archiving. which are set in the initialization profile init<DBSID>. You call the backup function in BRTOOLS and check the displayed backup parameters.2 BR*Tools in Action 1. BRTOOLS only lets you change certain parameters for the backup. then the backup is monitored and an estimation is made of the backup time. Allow enough time for the backup. changing them as required. are as follows: For database backup. Make sure you have set the necessary BRBACKUP parameters in the initialization profile init<DBSID>. there is no corresponding parameter in the initialization profile. 4.4 BR*Tools for Oracle DBA 4. 3. • April 2004 281 . based on the elapsed time and the size of the files that still have to be backed up. For certain input values. 4. you change the default values for the backup parameters in the initialization profile init<DBSID>. in which case the default value from the BRTOOLS program is used. offline redo log) file backup.2. Remember that the SAP system is not available for production work during an offline backup.sap and restart BRTOOLS. the default is a first copy backup of offline redo log files without deletion to a local tape device without file compression. You also see success or error messages. You start the backup. Hardware compressioncan halve the backup time. you can perform an online backup when the database system and SAP system are running. 5. Make sure you have the right backup volumes. BRBACKUP performs the backup. For more information.sap. because BRTOOLS uses these when it calls BRBACKUP. make sure that you have read the notes on managing and initializing the tapes. since the database is closed. You check the results of the backup in the BRBACKUP logsor BRARCHIVE Logs. This means that the online redo log files and control file are backed up as well as the data files. 2.sap.sap profile manually and then restart BRTOOLS. For archivelog (that is. you must change the init<DBSID>. If required. you choose Backup and Database Copy → Reset input values to set the defaults used to the values in the initialization profile init<DBSID>. The default parameter values. the default is an offline whole database backup to a local tape device without file compression.1 Use Backing Up the Database with BR*Tools You can use BR*Tools for Oracle to back up the database. However. If required. When you back up to tape.4. If the backup is being made locally or remotely to tapes or disks. If you have to make other changes.

. 282 April 2004 .4 BR*Tools for Oracle DBA 4. choose Continue.2. BRARCHIVE performs the backup. see Showing Logs with BR*Tools. The detail logb<encoded timestamp>. 3. 1. The summary logback<DBSID>. 4.2 Backing Up the Offline Redo Log Files with BR*Tools Use You can use BR*Tools to back up the offline redo log files. Start BRGUI or BRTOOLS. Choose Backup and database copy → Database Backup. For more information on how to view the logs.<ext> displays the progress. To start the backup with the selected options.log displays the return code. 2.4. 5. Set the required options: Menu Entry Equivalent BRBACKUP Command Option BRBACKUP profile (profile) Backup device type (device) Tape volumes for backup (volume) BACKINT/ Mount profile (parfile) Database user/password (user) Backup type (type) Back up disk backup (backup) Delete disk backup (delete) Files for backup (mode) Confirmation mode (confirm) Query mode (query) Compression mode (compress) Verification mode (verify) Fill-up previous backups (fillup) Parallel execution (execute) Additional output (output) Message language (language) BRBACKUP command line (command) -p|-profile -d|-device -v|-volume -r|-parfile -u|-user -t|-type -b|-backup -bd|-backup_delete m|-mode -c|-confirm -q|-query -k|-compress -w|-verify -f|-fillup -e|-execute -o|-output -l|-language This shows you the BRBACKUP command that is to be executed using the current settings. 4.. Check the results in the BRBACKUP logs.2 BR*Tools in Action Procedure .

3. • . see Volume Management.. see Setting Up Archiving.. Start BRGUI or BRTOOLS. Hardware compressioncan halve the backup time. Prerequisites • • • Make sure the database is running in ARCHIVELOG mode. 4.sap.. Procedure . Allow enough time for the backup. To start processing with the selected options. Choose Backup and database copy → Archivelog backup.2 BR*Tools in Action The offline redo log files are called the archivelogs in the BRTOOLS menus to save space. 2. delay apply (modify) Additional output (output) Message language (language) BRARCHIVE command line (command) -p|-profile -s|-sc|-ds|-dc|-sd|-scd|-ss|-ssd|-cs|cds -d|-device -v|-volume -r|-parfile -u|-user -n|-number -a|-archive -c|-confirm -q|-query -k|-compress -w|-verify -f|-fill -m|-modify -o|-output -l|-language This shows you the BRARCHIVE command that is to be executed using the current settings. make sure that you have read the notes on managing and initializing the tapes. Make sure you have the right backup volumes. choose Continue. For more information. For more information. April 2004 283 . Set the required options: Menu Entry Equivalent BRARCHIVE Command Option BRARCHIVE profile (profile) BRARCHIVE function (function) Backup device type (device) Tape volume for backup (volume) BACKINT/Mount profile (parfile) Database user/password (user) Maximum number of files (number) Back up disk backup (archive) Confirmation mode (confirm) Query mode (query) Compression mode (compress) Verification mode (verify) Fill mode. When you back up to tape. 1. because BRTOOLS uses these when it calls BRARCHIVE.4 BR*Tools for Oracle DBA 4. group size (fill) Modify mode. Make sure you have set the necessary BRARCHIVE parameters in the initialization profile init<DBSID>.

because BRTOOLS uses these when it calls BRBACKUP. 2. Choose Backup and database copy → Database copy. The summary logarch<DBSID>. 1. 4. For more information on how to view the logs. Check the results in the BRBACKUP logs [Page 375]. see Showing Logs with BR*Tools. Start BRGUI or BRTOOLS. Set the required options: Menu Entry Equivalent BRBACKUP Command Option BRBACKUP profile (profile) Backup device type (device) Database user/password (user) Backup type (type) Files for backup (mode) Confirmation mode (confirm) Query mode (query) Verification mode (verify) Fill-up previous backups (fillup) Parallel execution (execute) Additional output (output) Message language (language) BRBACKUP command line (command) -p|-profile [Page 371] -d|-device [Page 366] -u|-user [Page 374] -t|-type [Page 373] m|-mode [Page 369] -c|-confirm [Page 364] -q|-query [Page 371] -w|-verify [Page 375] -f|-fillup [Page 367] -e|-execute [Page 367] -o|-output [Page 371] -l|-language [Page 369] This shows you the BRBACKUP -d disk_copy or stage_copy [Page 366] command that is to be executed using the current settings. 3.. To start the copy with the selected options.2 BR*Tools in Action 5. The detail loga<encoded timestamp>.. 5. Procedure . The summary log [Page 378] back<DBSID>. choose Continue.2. BRBACKUP performs the database copy.<ext> displays progress.4 BR*Tools for Oracle DBA 4.3 Use Copying the Database with BR* Tools You can use BR*Tools [Page 181] for Oracle to copy the database.sap [Page 488]. Check the results in the BRARCHIVE logs. Prerequisites Make sure that you have set the necessary BRBACKUP parameters in the initialization profile init<DBSID>.log displays the backed up archive log files and the return code. 4.4.log displays the return code. 284 April 2004 .

see Volume Management [Page 96]. because BRTOOLS uses these when it calls BRBACKUP. BRBACKUP performs the backup. Choose Backup and database copy → Non-database backup.2 BR*Tools in Action The detail log [Page 377] b<encoded timestamp>. 4. 2. Start BRGUI or BRTOOLS.4 Use Non-Database Backup with BR*Tools You can use BR*Tools [Page 181] for Oracle to perform a non-database backup of specified files. • • Procedure . Allow enough time for the backup. see Showing Logs with BR*Tools [Page 353].. For more information on how to view the logs. When you back up to tape.sap [Page 488]. Hardware compression [Page 106] can halve the backup time. Make sure you have the right backup volumes.2. make sure that you have read the notes on managing and initializing the tapes.4. Set the required options: Menu Entry Equivalent BRBACKUP Command Option BRBACKUP profile (profile) Backup device type (device) Tape volumes for backup (volume) BACKINT/ Mount profile (parfile) Database user/password (user) Backup type (type) Backup disk backup (backup) Files for backup (mode) Confirmation mode (confirm) Query mode (query) Compression mode (compress) Verification mode (verify) Fill-up previous backups (fillup) Parallel execution (execute) -p|-profile [Page 371] -d|-device [Page 366] -v|-volume [Page 374] -r|-parfile [Page 372] -u|-user [Page 374] -t|-type [Page 373] -b|-backup [Page 364] m|-mode [Page 369] -c|-confirm [Page 364] -q|-query [Page 371] -k|-compress [Page 368] -w|-verify [Page 375] -f|-fillup [Page 367] -e|-execute [Page 367] April 2004 285 . 1.<ext> displays the progress.. For more information.4 BR*Tools for Oracle DBA 4. Prerequisites • Make sure you have set the necessary BRBACKUP parameters in the initialization profile init<DBSID>. 3.

2. 5. For more information about database verify. For more information on how to view the logs. Set the required options: Menu Entry Equivalent BRRESTORE Command Option BRRESTORE profile (profile) BRBACKUP backup run (backup) Verification device type (device) BACKINT/ Mount profile (parfile) Database user /password (user) Use DBVERIFY (use_dbv) Files for verification (mode) Confirmation mode (confirm) -p|-profile [Page 404] -b|-backup|b1|backup1 [Page 400] -d|-device [Page 400] -r|-parfile [Page 405] -u|-user [Page 405] -w|-verify [Page 405] -m|-mode [Page 402] -c|-confirm [Page 400] 286 April 2004 . BRRESTORE performs the verify. • Procedure . 4. Start BRGUI or BRTOOLS. 1. The summary log [Page 378] back<DBSID>. 4. Select the BRBACKUP database backup that you want to verify.. choose Continue. 4. Check the results in the BRBACKUP logs [Page 375].5 Use Verifying a Database Backup with BR*Tools You can use BR*Tools [Page 181] for Oracle to verify a database backup.2.because BRTOOLS uses these when it calls BRRESTORE. 3.4.4 BR*Tools for Oracle DBA 4..log displays the return code. To start processing with the selected options. Choose Backup and database copy → Verification of database backup. see Showing Logs with BR*Tools [Page 353]. The detail log [Page 377] b<encoded timestamp>.2 BR*Tools in Action Additional output (output) Message language (language) BRBACKUP command line (command) -o|-output [Page 371] -l|-language [Page 369] This shows you the BRBACKUP -m command [Page 369] that is to be executed using the current settings.sap [Page 488]. Make sure you have the correct volumes for the verify. see Backup Verify [Page 122].<ext> displays the progress. Prerequisites • Make sure that you have set the necessary BRRESTORE parameters in the initialization profile init<DBSID>.

Make sure you have the correct volumes for the verify.6 Verifying an Offline Redo Log Backup with BR*Tools Use You can use BR*Tools [Page 181] for Oracle to verify an offline redo log backup. 2. Select the BRARCHIVE offline redo log file backup that you want to verify. 4. Choose Backup and database copy → Verification of archivelog backup.log displays the return code.because BRTOOLS uses these when it calls BRRESTORE.2 BR*Tools in Action Query mode (query) Compression mode (compress) Parallel execution (execute) Additional output (output) Message language (language) BRRESTORE command line (command) -q|-query [Page 404] -k|-compress [Page 402] -e|-execute [Page 401] -o|-output [Page 404] -l|-language [Page 402] This shows you the BRRESTORE -b w [Page 397] command that is to be executed using the current settings.2. BRRESTORE performs the verify. To start the verification with the selected options. see Backup Verify [Page 122]. 1... Prerequisites • Make sure that you have set the necessary BRRESTORE parameters in the initialization profile init<DBSID>. that is. For more information on how to view the logs. For more information about database verify. Check the results in the BRRESTORE logs [Page 406]. Set the required options: Menu Entry Equivalent BRRESTORE Command Option BRRESTORE profile (profile) First sequence number (first_seq) Last sequence number (last_seq) -p|-profile [Page 404] -a|-archive|-a1|-archive1 <log_no1> [Page 399] -a|-archive|-a1|-archive1 <log_no2> [Page 399] April 2004 287 . 4. The detail log [Page 406] r<encoded timestamp>.<ext> displays progress. Start BRGUI or BRTOOLS. choose Continue. an archivelog backup. 3. 6.4 BR*Tools for Oracle DBA 4.sap [Page 488]. • Procedure .. The summary log [Page 407] rest<DBSID>.4. see Showing Logs with BR*Tools [Page 353]. 5.

Check results in the BRRESTORE logs [Page 406].2 BR*Tools in Action Verification device type (device) BACKINT/ Mount profile (parfile) Database user /password (user) Verify second copy (sec_copy) Confirmation mode (confirm) Query mode (query) Compression mode (compress) Additional output (output) Message language (language) BRRESTORE command line (command) -d|-device [Page 400] -r|-parfile [Page 405] -u|-user [Page 405] -a2|-archive2 [Page 399] -c|-confirm [Page 400] -q|-query [Page 404] -k|-compress [Page 402] -o|-output [Page 404] -l|-language [Page 402] This shows you the BRRESTORE -a w [Page 397] command that is to be executed using the current settings. Prerequisites 288 April 2004 .4 BR*Tools for Oracle DBA 4. In this case. choose Continue. The following menu options refer to the sequence numbers of the first and last offline redo log file to be verified: • First sequence number (first_seq) • Last sequence number (last_seq) BRRESTORE sets these according to the BRARCHIVE run that you selected. The detail log [Page 406] r<encoded timestamp>. Updating Compression Rates with BR*Tools Use You can use BR*Tools [Page 181] for Oracle to update compression rates.7 Additional Functions for Backup and Database Copy with BR*Tools The following sections describe additional functions for backup and database copy with BR*Tools. If required. see Showing Logs and Profiles with BR*Tools [Page 353]. 5. 6. To start processing with the selected options. The summary log [Page 407] rest<DBSID>. If you use devices with hardware compression [Page 361]. we recommend updating compression rates monthly. BRBACKUP performs the update. the corresponding backups must all have been made to the same device type.log displays the return code.2. 4.<ext> displays the progress.4. as this helps BRBACKUP to make the most efficient use of your tape volumes. For more information on how to view the logs with BR*Tools. you can set these manually.

Choose Backup and database copy → Additional functions → Update of compression rates. 5. Choose the required options: Menu Entry Equivalent BRBACKUP Command Option BRBACKUP profile (profile) Database user/password (user) Backup type (type) Files for compression (mode) Confirmation mode (confirm) Query mode (query) Parallel execution (execute) Additional output (output) Message language (language) BRBACKUP command line (command) -p|-profile [Page 371] -u|-user [Page 374] -t|-type [Page 373] m|-mode [Page 369] -c|-confirm [Page 364] -q|-query [Page 371] -e|-execute [Page 367] -o|-output [Page 371] -l|-language [Page 369] This shows you the BRBACKUP -k only [Page 368] command that is to be executed using the current settings.sap [Page 488]. You check the results in the BRBACKUP logs [Page 375]. The summary log [Page 378]back<DBSID>. It determines the optimal distribution of files to save sets for an RMAN backup.2 BR*Tools in Action Make sure that you have set the necessary BRBACKUP parameters in the initialization profile init<DBSID>. Start BRGUI or BRTOOLS. because BRTOOLS uses these when it calls BRBACKUP.. 2.. To start processing with the selected options. we recommend that you perform this procedure once a month. Preparing RMAN Backups with BR*Tools Use You can use BR*Tools [Page 181] for Oracle to prepare RMAN backups. because BRTOOLS uses these when it calls BRBACKUP. The detail log [Page 377]b<encoded timestamp>. For more information on how to view the logs. see Showing Logs with BR*Tools [Page 353]. Prerequisites Make sure that you have set the necessary BRBACKUP parameters in the initialization profile init<DBSID>.4 BR*Tools for Oracle DBA 4. choose Continue. Procedure . If you back up with the Oracle Recovery Manager (RMAN) [Page 560]. 1.log displays the return code. BRBACKUP performs the preparation.sap [Page 488]. 4. April 2004 289 .<ext> displays progress. 3.

. Start BRGUI or BRTOOLS.log displays the return code.. Prerequisites Make sure that you have set the necessary BRBACKUP parameters in the initialization profile init<DBSID>. 1. before you delete them with this procedure. To start processing with the selected options. Set the required options: Menu Entry Equivalent BRBACKUP Command Option BRBACKUP profile (profile) Database user/password (user) Backup type (type) Files for preparation (mode) Confirmation mode (confirm) Query mode (query) Parallel execution (execute) Additional output (output) Message language (language) BRBACKUP command line (command) -p|-profile [Page 371] -u|-user [Page 374] -t|-type [Page 373] m|-mode [Page 369] -c|-confirm [Page 364] -q|-query [Page 371] -e|-execute [Page 367] -o|-output [Page 371] -l|-language [Page 369] This shows you the BRBACKUP –d rman_prep [Page 366] command that is to be executed using the current settings.sap [Page 488].4 BR*Tools for Oracle DBA 4. For more information on how to view the logs.. Procedure . The summary log [Page 378] back<DBSID>. Make sure that you copy disk backup files to another storage medium. such as tape. Deleting Database Disk Backups with BR*Tools Use You can use BR*Tools [Page 181] for Oracle to delete database disk backups.<ext> displays progress. 4. BRBACKUP performs the deletion. The detail log [Page 377] b<encoded timestamp>. 5. because BRTOOLS uses these when it calls BRBACKUP. 290 April 2004 .. 2. Choose Backup and database copy → Additional functions → Preparation of RMAN backups. You check the results in the BRBACKUP logs [Page 375]. 3. Start BRGUI or BRTOOLS. 1. see Showing Logs with BR*Tools [Page 353]. choose Continue.2 BR*Tools in Action Procedure ..

For more information on how to view the logs. 6.sap [Page 488]. see Showing Logs with BR*Tools [Page 353]. before you delete them with this procedure. Deleting Offline Redo Log Backups on Disk with BR*Tools Use You can use BR*Tools [Page 181] for Oracle to delete disk backups of the offline redo log files (that is. Select the BRBACKUP backup that you want to delete. such as tape. 4. Procedure April 2004 291 . 3. because BRTOOLS uses these when it calls BRARCHIVE.log displays the return code. unless you restrict this by setting the Maximum number of files (see the table below). BRARCHIVE deletes all available disk backups of offline redo log backups when you perform this procedure. The detail log [Page 377] b<encoded timestamp>. Prerequisites Make sure that you have set the necessary BRARCHIVE parameters in the initialization profile init<DBSID>.2 BR*Tools in Action 2. choose Continue. BRARCHIVE performs the deletion.<ext> displays progress. Set the required options: Menu Entry Equivalent BRBACKUP Command Option BRBACKUP profile (profile) Database user/password (user) BRBACKUP backup run (backup) Confirmation mode (confirm) Query mode (query) Additional output (output) Message language (language) BRBACKUP command line (command) -p|-profile [Page 371] -u|-user [Page 374] -b|-backup [Page 364] -c|-confirm [Page 364] -q|-query [Page 371] -o|-output [Page 371] -l|-language [Page 369] This shows you the BRBACKUP –db [Page 365] command that is to be executed using the current settings. Make sure that you copy disk backup files to another storage medium. Choose Backup and database copy → Additional functions → Deletion of database disk backups. the archivelogs). To start processing with the selected options. You check the results in the BRBACKUP logs [Page 375]. The summary log [Page 378] back<DBSID>.4 BR*Tools for Oracle DBA 4. 5.

Set the required options: Menu Entry Equivalent BRARCHIVE Command Option BRARCHIVE profile (profile) Database user/password (user) Backup device type (device) Delete after second copy (sec_copy) Maximum number of files (number) Confirmation mode (confirm) Query mode (query) Additional output (output) Message language (language) BRARCHIVE command line (command) -p|-profile [Page 388] -u|-user [Page 390] -d|-device [Page 385] -dc [Page 389] -n|-number [Page 388] -c|-confirm [Page 385] -q|-query [Page 388] -o|-output [Page 388] -l|-language [Page 387] This shows you the BRARCHIVE -a ds|dc [Page 389] command that is to be executed using the current settings.sap [Page 488].. Choose Backup and database copy → Additional functions → Archivelog backup. . 1. Prerequisites Make sure you have set the necessary BRARCHIVE parameters in the initialization profile init<DBSID>.log displays the return code. For more information on how to view the logs. 2. 1. 4.. Procedure ..2 BR*Tools in Action . Set the required options: Menu Entry Equivalent BRARCHIVE Command Option 292 April 2004 .4 BR*Tools for Oracle DBA 4.. see Showing Logs with BR*Tools [Page 353]. Controlling of BRARCHIVE Run with BR*Tools Use You can use BR*Tools [Page 181] to continuously back up the offline redo log files (that is. Start BRGUI or BRTOOLS. The detail log [Page 392] a<encoded timestamp>. choose Continue. The summary log [Page 392] arch<DBSID>. 3. 3. the archivelog files).<ext> displays progress. Choose Backup and database copy → Additional functions → Deletion of archivelog disk backups. Start BRGUI or BRTOOLS. You check the results in the BRARCHIVE logs [Page 391].. BRARCHIVE performs the continuous backup. To start processing with the selected options. because BRTOOLS uses these when it calls BRARCHIVE. 2. 5.

To start processing with the selected options. see Volume Management [Page 96]. make sure that you have read the notes on managing and initializing the tapes. because BRTOOLS uses these when it calls BRBACKUP. 5. You check the results in the BRARCHIVE logs [Page 391]. Initializing BRBACKUP Tape Volumes with BR*Tools Use You can use BR*Tools [Page 181] for Oracle to initialize BRBACKUP tape volumes. Choose Backup and database copy → Additional Functions → Initialization of BRBACKUP tape volumes. Start BRGUI or BRTOOLS. When you back up to tape.<ext> displays progress.4 BR*Tools for Oracle DBA 4. choose Continue.2 BR*Tools in Action BRARCHIVE profile (profile) Run control function (function) Confirmation mode (confirm) Message language (language) BRARCHIVE command line (command) -p|-profile [Page 388] -f|-fill stop|suspend|resume [Page 386] -c|-confirm [Page 385] -l|-language [Page 387] This shows you the BRARCHIVE –f command [Page 386] that is to be executed using the current settings. 1. see Showing Logs with BR*Tools [Page 353]. For more information on how to view the logs. BRBACKUP performs the initialization. 2. Make sure you have the right backup volumes. Set the required options: Menu Entry Equivalent BRBACKUP Command Option BRBACKUP profile (profile) Initialization type (initialize) Number of volumes (number) Confirmation mode (confirm) Message language (language) Tape volume names (volume) -p|-profile [Page 371] -i|-initialize [Page 368] -n|-number [Page 370] -c|-confirm [Page 364] -l|-language [Page 369] -v|-volume [Page 374] April 2004 293 . 4. The summary log [Page 392] arch<DBSID>. Prerequisites • Make sure you have set the necessary BRBACKUP parameters in the initialization profile init<DBSID>..sap [Page 488]. 3.log displays the return code. • Procedure . For more information. The detail log [Page 392] a<encoded timestamp>..

5.. For more information on how to view the logs. To start the initialization with the selected options.because BRTOOLS uses these when it calls BRARCHIVE.sap [Page 488]. choose Continue. 4. 4. Make sure you have the right backup volumes. 3. The summary log [Page 378] back<DBSID>. For more information. Start BRGUI or BRTOOLS. make sure that you have read the notes on managing and initializing the tapes. 5. Choose Backup and database copy → Additional Functions → Initialization of BRARCHIVE tape volumes. 1. see Volume Management [Page 96]. • Procedure . 294 April 2004 .4 BR*Tools for Oracle DBA 4. The detail log [Page 377] b<encoded timestamp>. To start processing with the selected options. 2. When you back up to tape.2 BR*Tools in Action BRBACKUP command line (command) This shows you the BRBACKUP -i [Page 368] command that is to be executed using the current settings. Prerequisites • Make sure you have set the necessary BRARCHIVE parameters in the initialization profile init<DBSID>. Initializing BRARCHIVE Tape Volumes with BR*Tools Use You can use BR*Tools [Page 181] for Oracle to initialize BRARCHIVE tape volumes..log displays the return code. You check the results in the BRBACKUP logs [Page 375].<ext> displays the progress. You check the results in the BRARCHIVE Logs [Page 391]. Set the required options: Menu Entry Equivalent BRARCHIVE Command Option BRARCHIVE profile (profile) Initialization type (initialize) Number of volumes (number) Confirmation mode (confirm) Message language (language) Tape volume names (volume) BRARCHIVE command line (command) -p|-profile [Page 388] -i|-initialize [Page 387] -n|-number [Page 388] -c|-confirm [Page 385] -l|-language [Page 387] -v|-volume [Page 390] This shows you the BRARCHIVE -i [Page 387] command that is to be executed using the current settings. BRARCHIVE performs the initialization. see Showing Logs with BR*Tools [Page 353]. choose Continue.

You can also perform restore and recovery with SQLPLUS [Page 538]. This means that you have to log on as ora<sid> (UNIX) or <sid>adm (Windows). using the Oracle default settings April 2004 295 .. The default parameter values. 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. which are set in the initialization profile init<DBSID>. Make sure that you have set the necessary parameters for BRRECOVER in the Initialization Profile init<DBSID>. you have to enter parameters as the recovery runs.sap [Page 488]. Serial recoveryfor applying offline redo logs. For more information on the approach to restore and recovery. when prompted by BRRECOVER. are as follows: Recovery typeis complete database recovery. The detail log [Page 392] a<encoded timestamp>.2 BR*Tools in Action The summary log [Page 392] arch<DBSID>. see Restore and Recovery [Page 156]. 4.4 BR*Tools for Oracle DBA 4.2. Integration • • • • BRTOOLS calls the SAP tool BRRECOVER. offline redo log) files Disaster recovery Activities . but only if you are an expert.5 Use Restore and Recovery with BR*Tools You can restore and recover your Oracle database with BR*Tools [Page 181]. You call the restore and recovery function in BRTOOLS and check the displayed parameters. You have to have SYSDBA privilege to let BRRECOVER connect to the database.sap [Page 488]. changing them as required. 1.. The recovery is normally attended.<ext> displays the progress. that is.log displays the return code. This section discusses how to perform restore and recovery. For more information on how to view the logs. see Showing Logs with BR*Tools [Page 353].

4. BRRECOVER calls BRRESTORE as necessary to perform restore functions. You start BRGUI or BRTOOLS. in which case the default value from the BRTOOLS program is used. You choose Restore and recovery → Complete database recovery. You can do one of the following: Set the required entries now and run the recovery in unattended mode Wait for BRRECOVER to prompt you during the recovery. If required. 3. If required. you choose Restore and recovery → Reset input values to set the defaults used to the values in the initialization profile init<DBSID>. 5.sap and restart BRTOOLS. displaying sub-menus as required. Scrollingof 20 lines for the list menus.sap profile manually and then restart BRTOOLS.2 BR*Tools in Action Interval of 30 days for the displayed backups to be restored. there is no corresponding parameter in the initialization profile. This me ans that only backups from the last 30 days can be selected by default. BRRECOVER performs the recovery. 4. BRRECOVER takes you through the recovery step by step.1 Purpose Complete Database Recovery with BR*Tools You can use BR*Tools [Page 181] for Oracle to perform a complete database recovery. For certain input values. 2.5. see Complete Database Recovery [Page 159].2. you must change the init<DBSID>. Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>. • • Process Flow . BRRECOVER calls SQLPLUS as necessary to apply offline redo log files. 2. 1. If you have to make other changes.. only relevant for character-mode menus BRTOOLS only lets you change certain parameters for the backup. For more information on how to approach a complete database recovery.because BRTOOLS uses these when it calls BRRECOVER. You start the restore or recovery. This section discusses how to perform a complete database recovery. You check the results in the BRRECOVER logs [Page 414]. run the recovery in attended mode We recommend you to normally run the recovery in attended mode.4 BR*Tools for Oracle DBA 4.sap [Page 488]. that is. you change the default values for the restore and recovery parameters in the initialization profile init<DBSID>.sap.. 296 April 2004 .

Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>.sap [Page 488]. 4. This section discusses how to perform a database PIT recovery. see Showing Logs with BR*Tools [Page 353].2. see Database Point-In-Time Recovery [Page 162].because BRTOOLS uses these when it calls BRRECOVER.2 Purpose Database Point-In-Time Recovery with BR*Tools You can use BR*Tools [Page 181] for Oracle to perform a database point-in-time (PIT) recovery. BRRECOVER calls BRRESTORE as necessary to perform restore functions. BRRECOVER starts the recovery. 11. You check the status of the database files [Page 319]. 4.4 BR*Tools for Oracle DBA 4. 10. You restore data files [Page 331]. For more information on how to view the logs.2 BR*Tools in Action 3. BRRECOVER guides you through the recovery. You perform the following steps with BRRECOVER. The detail log [Page 414] v<encoded timestamp>. 5.log displays the return code The detail log [Page 406] r<encoded timestamp>.<ext> displays the progress.log displays the return code. You select database backups [Page 321]. • April 2004 297 . 6. prompting you as necessary.crv displays the progress. BRRESTORE logs [Page 406] for the restore functions: The summary log [Page 407] rest<DBSID>. you choose Continue. You check the results in the BRRECOVER and BRRESTORE logs: BRRECOVER logs [Page 414]: The summary log [Page 416] recov<DBSID>. You restore and apply the online redo log – that is. If you are using attended mode. You open the database [Page 341]. To start the recovery. 8. you restore and apply an incremental backup [Page 335]. you choose Continue and select force in Confirmation mode (confirm). 9. BRRECOVER performs the recovery. archivelog – files [Page 336]. For more information on how to approach a database PIT recovery.5. If required. 7. If you want to run the recovery in unattended mode.

. BRRECOVER guides you through the recovery. If required. 1. You check the results in the BRRECOVER and BRRESTORE logs: BRRECOVER logs [Page 414]: The summary log [Page 416] recov<DBSID>. You select database backups [Page 321].4 BR*Tools for Oracle DBA 4. BRRECOVER starts the recovery. For more information on how to view the logs. that is. 10. You perform the following steps with BRRECOVER: If you are using attended mode. You start BRGUI or BRTOOLS. you choose Continue. 6. for a routine database copy – you can run the recovery in unattended mode. 5. you restore and apply an incremental backup [Page 335]. You can do one of the following: Set the required entries now and run the recovery in unattended mode Wait for BRRECOVER to prompt you during the recovery. 8. The detail log [Page 414] v<encoded timestamp>. If required. archivelog – files [Page 336] 12. you choose Continue and select force in Confirmation mode (confirm). If you are sure of the required entries – for example. you restore the control files [Page 330]. 9. run the recovery in attended mode We recommend you to normally run the recovery in attended mode.2 BR*Tools in Action • BRRECOVER calls SQLPLUS as necessary to apply offline redo log files.. You check the status of the database files [Page 322]. 3. You restore and apply the online redo log – that is. 2.log displays the return code The detail log [Page 406] r<encoded timestamp>. Process Flow . You set a point in time for the recovery [Page 317]. 7. BRRESTORE logs [Page 406] for the restore functions: The summary log [Page 407] rest<DBSID>. 4. You open the database [Page 341]. You choose Restore and recovery → Database point-in-time recovery. see Showing Logs with BR*Tools [Page 353]. 13. prompting you as necessary. If you want to run the recovery in unattended mode. To start the recovery. 11. 298 April 2004 . You restore data files [Page 331].log displays the return code.<ext> displays the progress.dpt displays the progress.

2 BR*Tools in Action 4. 1. You choose Restore and recovery → Tablespace point-in-time recovery.. BRRECOVER starts the recovery. that is.because BRTOOLS uses these when it calls BRRECOVER. This section discusses how to perform a tablespace PIT recovery. BRRECOVER performs the recovery.sap [Page 488]. BRRECOVER always recovers the SYSTEM and ROLLBACK tablespaces in addition to the tablespaces that you select. For more information on how to approach a tablespace PIT recovery. Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>. you must be able to open the database.3 Purpose Tablespace Point-In-Time Recovery with BR*Tools You can use BR*Tools [Page 181] for Oracle to perform a tablespace point-in-time (PIT) recovery. To start the recovery.2. BRRECOVER calls SQLPLUS as necessary to apply offline redo log files. run the recovery in attended mode We recommend you to normally run the recovery in attended mode. 4. If you want to run the recovery in unattended mode. the database is unavailable. BRRECOVER calls the Oracle EXP and IMP tools to export and import the tablespaces that are not to be recovered.5. BRRECOVER calls BRRESTORE as necessary to perform restore functions. Tablespace PIT recovery is especially useful for Multiple Components in One Database (MCOD). you choose Continue and select force in Confirmation mode (confirm). You can do one of the following: Set the required entries now and run the recovery in unattended mode Wait for BRRECOVER to prompt you during the recovery.4 BR*Tools for Oracle DBA 4. you choose Continue. if a component upgrade has failed – without affecting the other components in the same database. For SAP systems. 3.. To start this procedure. see Tablespace Point-in-Time Recovery [Page 165]. You perform the following steps with BRRECOVER. You start BRGUI or BRTOOLS. It allows you to restore the tablespaces for a single component – for example. April 2004 299 . 2. only the database administrator (DBA) can access the database. BRRECOVER opens the database in RESTRICT mode – that is. • • • • • • Process Flow . including all other components installed in the same database.

6.sap [Page 488]. • • Process Flow 300 April 2004 .4 Purpose Whole Database Reset with BR*Tools You can use BR*Tools [Page 181] for Oracle to perform a whole database reset. BRRECOVER calls SQLPLUS as necessary to apply offline redo log files. 5.tpt displays the progress. see Whole Database Reset [Page 169]. BRRESTORE logs [Page 406] for the restore functions: The summary log [Page 407] rest<DBSID>. 10.log displays the return code The detail log [Page 406] r<encoded timestamp>. BRRECOVER performs the reset.log displays the return code.5. You restore the data files [Page 331]. BRRECOVER calls BRRESTORE as necessary to perform restore functions. archivelog – files [Page 336] 12. You check the results in the BRRECOVER and BRRESTORE logs: BRRECOVER logs [Page 414]: The summary log [Page 416] recov<DBSID>. The detail log [Page 414] v<encoded timestamp>. see Showing Logs with BR*Tools [Page 353]. 7. You open the database and plug in the previously exported tablespaces [Page 341].2 BR*Tools in Action If you are running in attended mode.2. You restore and apply the online redo log – that is. you restore and apply an incremental backup [Page 335].because BRTOOLS uses these when it calls BRRECOVER. 4. This section discusses how to perform a whole database reset. If required. For more information on how to view the logs. You select database backups [Page 321]. 8. For more information on how to approach a whole database reset. You check the status of the tablespaces [Page 324]. prompting you as necessary. BRRECOVER guides you through the recovery. You export the tablespaces that are not required for the recovery [Page 327]. 9. Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>. You set a point in time and tablespaces for the recovery [Page 317]. 13. 11.<ext> displays the progress.4 BR*Tools for Oracle DBA 4.

run the reset in attended mode We recommend you to normally run the reset in attended mode. prompting you as necessary. 8. You start BRGUI or BRTOOLS. You can do one of the following: Set the required entries now and run the reset in unattended mode Wait for BRRECOVER to prompt you during the reset.. If required. To start the reset.log displays the return code. that is. 6.log displays the return code The detail log [Page 406] r<encoded timestamp>. 7. you choose Continue. You perform the following steps with BRRECOVER. 11. For more information on how to view the logs. 2. 3.5.drs displays the progress. You check the status of the database files [Page 322].<ext> displays the progress. You restore the control files and the offline redo log files [Page 330]. If you want to run the reset in unattended mode. You only restore the offline redo log files if you selected a consistent online backup. You apply the online redo log – that is. The detail log [Page 414] v<encoded timestamp>. see Showing Logs with BR*Tools [Page 353]. If you are running in attended mode. If you are sure of the required entries – for example. 9. 12. You choose Restore and recovery → Whole database reset. you apply an incremental backup [Page 335]. 4. for a routine database copy – you can run the reset in unattended mode. 4. BRRECOVER guides you through the reset. BRRECOVER starts the reset..2 BR*Tools in Action . You select a consistent database backup [Page 321]. You restore data files [Page 331].4 BR*Tools for Oracle DBA 4. 5. archivelog – files [Page 336] if they were restored in step 7. BRRESTORE logs [Page 406] for the restore functions: The summary log [Page 407] rest<DBSID>. 10. You check the results in the BRRECOVER and BRRESTORE logs: BRRECOVER logs [Page 414]: The summary log [Page 416] recov<DBSID>.5 Restore of Individual Backup Files with BR*Tools April 2004 301 . 1. you choose Continue and select force in Confirmation mode (confirm). You open the database [Page 341].2.

because BRTOOLS uses these when it calls BRRECOVER. You can only apply incremental backup.4 BR*Tools for Oracle DBA 4. You cannot restore files from an rman_util backup. not by BRARCHIVE. BRBACKUP summary and detail logs required No logs required No logs required No logs required BRBACKUP summary and detail logs required For all procedures.sap [Page 488]. The database is closed for the shortest time possible. 302 April 2004 . Only perform this procedure if you are an expert in Oracle database administration. You can choose individual actions independently. • • You must meet the following prerequisites before starting the restore: Procedure Limitations BRBACKUP logs Restore files from BRBACKUP backup Restore individual files from tape Restore individual files from disk Restore individual files from backup utility Restore and apply incremental backup You can only restore files saved by BRBACKUP. You cannot restore directories from a disk backup. Process Flow . Since this function is designed for experts. This section discusses how to perform a restore of individual backup files. we recommend that you first try other types of recovery supported by BR*Tools.2 BR*Tools in Action Purpose You can use BR*Tools [Page 181] for Oracle to restore individual backup files. If you are not an expert... BRRECOVER does not guide you step by step through restore and recovery. You cannot restore files from an RMAN backup. the usual safeguards are not present: There is no database status check. see Restore of Individual Backup Files [Page 171]. You might lose data and cause downtime to fix the problem. the backup medium with the required backup files must obviously be present. You have less guidance than otherwise: BRRECOVER does not always use the BR*Tools logs to guide you. Even as an expert. Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>. For more information on how to approach restore of individual backup files. BRRECOVER calls BRRESTORE to perform the restore. not offline redo log files. you might severely damage the database if you use this procedure.

a. You start BRGUI or BRTOOLS. 5. This does not apply to Restore and apply incremental backup. 3. BRRECOVER starts the restore. You select the files that you want to restore. you are effectively performing a copy at operating-system level.log displays the return code. You select a single database backup [Page 321].rif displays the progress. If you are performing Restore files from BRBACKUP backup. b. because changes to all data files are stored in one incremental save set. You cannot use these procedures to restore an RMAN backup. You choose the required procedure from the list shown in the above table. If you chose Restore files from BRBACKUP backup or Apply incremental backup: a. You check the results in the BRRECOVER and BRRESTORE logs: BRRECOVER logs [Page 414]: The summary log [Page 416] recov<DBSID>. If a disk or backup utility is involved in the restore. you can select a backup that terminated with errors. 2. Processing now depends on which procedure you chose. You choose Restore and recovery → Restore of individual backup files. BRRECOVER displays a list of data files in the selected backup. With these procedures. 4. April 2004 303 . The detail log [Page 414] v<encoded timestamp>. You perform the restore. If you chose one of the remaining procedures: You need to know exactly which file to restore and where it is. You restore data files [Page 331] or restore and apply incremental backup [Page 335]. If you are sure it contains the data that you require.2 BR*Tools in Action 1. b. which uses the following main BRRESTORE parameters: -n|-number [Page 403] for Restore individual files from tape -n2|-number2 [Page 404] for Restore individual files from disk -b2|-back2 [Page 400] for Restore individual files from backup utility 6. c. you can also specify the destination for the restore.4 BR*Tools for Oracle DBA 4. 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. you must specify the full path to the file that you want to restore.

cont. see Showing Logs with BR*Tools [Page 353].back.25 BR663I Your choice: 'c' BR259I Program execution will be continued.fff util_onl 0 304 April 2004 .. BR655I Choice menu 120 .14 2003-01-29 16.51 2003-01-29 17..Reset input values Standard keys: c .log ..Restore individual files from backup utility 5 . r .Restore individual files from tape 3 .please select one entry -----------------------------------------------------------------BRBACKUP database backups for restore Pos. BR280I Time stamp 2003-01-29 19.bdjwgyrq.4 BR*Tools for Oracle DBA 4.stop.Apply incremental backup 6 .help -----------------------------------------------------------------BR662I Enter your choice: BR280I Time stamp 2003-01-29 19. Log Device Rc Start 2003-01-29 17.48.25 BR658I List menu 121 .05.30. h .05. Example This example shows the contents of the BRRECOVER detail log file for Restore files from BRBACKUP backup.Restore individual files from disk 4 .ffd disk 0 2 .please decide how to proceed -----------------------------------------------------------------Restore of individual backup files 1 = Restore files from BRBACKUP backup 2 .05.Exit program 7 .log displays the return code The detail log [Page 406] r<encoded timestamp>.. For more information on how to view the logs.fft tape 1 3 . b .42 Type offline offline offline Files 0/0 0/0 0/0 1 = bdjwhckx.refr.bdjwhadu. BR699I Reading log file /oracle/GC2/sapbackup/backGC2.2 BR*Tools in Action BRRESTORE logs [Page 406] for the restore functions: The summary log [Page 407] rest<DBSID>. s .rif displays the progress.

bdjwgvvh. .29 2003-01-28 17.55 2003-01-29 16.fnf] 3 . BR280I Time stamp 2003-01-29 19.dbf /oracle/GC2/saparch/1_8. b ..data1 1 . 9 .data2 /oracle/GC2/sapdata5/testi_1/testi.... 2003-01-29 16.05.fff util_onl 0 .Restore device type (device) .bdjvdblz...fnt tape 0 5 . h . 18 19 . [initGC2.. [util_file] April 2004 305 ..PSAPTESTD 11 ..bdjwcgfm..05.16.03 onl_cons onl_cons offline offline 0/0 0/0 17/17 0/0 BR280I Time stamp 2003-01-29 19.cont. [bdjwgvvh..data1 /oracle/GC2/sapdata6/testd_2/testd..4 BR*Tools for Oracle DBA 4....PSAPTESTI .fnf ..36 BR663I Your selection: '9-11' BR280I Time stamp 2003-01-29 19.data1 Tablespace Id.stop.05.dbf 2 12 11 /oracle/GC2/sapdata6/testd_1/testd.archive_log 0 /oracle/GC2/sapbackup/cntrlGC2.Fill-up previous restores (fillup) .ffd disk 0 7 ...help -----------------------------------------------------------------BR662I Enter your selection: BR280I Time stamp 2003-01-29 19.. s ..2 BR*Tools in Action 4 .48.29 BR663I Your selection: '5' BR699I Reading log file /oracle/GC2/sapbackup/bdjwgvvh.sap] 2 .fnf util_onl 0 6 ..please check/enter input values ------------------------------------------------------------------BRRESTORE main options for restore from BRBACKUP backup 1 ...BRRESTORE profile (profile) ...26. r .archive_log 20 ..refr.52.back.05.bdjwgwtj.54 2003-01-23 14.dbf /oracle/GC2/saparch/1_9...PSAPTESTD 10 ..29 BR659I List menu 122 + please select one or more entries -----------------------------------------------------------------Backup files for restore Pos.DRSYS Standard keys: c .BRBACKUP backup run (backup) .36 BR657I Input menu 123 . Name 3 /oracle/GC2/sapdata1/drsys_1/drsys.. [no] 4 ....

..fnf -d util_file -r /oracle/GC2/dbs/initGC2..05..stop..11-12 l E' BR280I Time stamp 2003-01-29 19. [no] 6 ..05....sap -b bdjwgvvh..11-12 l E] Standard keys: c . r ...back. 's[top]' to abort: BR280I Time stamp 2003-01-29 19.utl] 6 # Database user/password (user) .cont....utl -m 2...06..fnf -d util_file -r /oracle/GC2/dbs/initGC2....help ------------------------------------------------------------------BR662I Enter your choice: BR280I Time stamp 2003-01-29 19..utl -m 2...Query mode (query) . [yes] 2 ...... [0] 5 ...Message language (language) . [-p initGC2....stop..refr. h .help -------------------------------------------------------------------BR662I Enter your choice: BR280I Time stamp 2003-01-29 19..37 BR663I Your choice: 'c' BR259I Program execution will be continued.Files for restore (mode) .49 BR670I Enter 'c[ont]' to continue. b .04 BR257I Your reply: 'c' 306 April 2004 .refr. h ..BACKINT/Mount profile (parfile) . [no] 3 # Compression mode (compress) .. b .. s . [initGC2.. [no] 4 # Parallel execution (execute) .... s . [2. BR280I Time stamp 2003-01-29 19..39 BR663I Your choice: 'c' BR259I Program execution will be continued. BR342I Database instance GC2 is open BR064I Database instance GC2 will be shut down now ....37 BR657I Input menu 124 ... 'b[ack]' to go back..05.....BRRESTORE command line (command) .11-12] Standard keys: c ..Confirmation mode (confirm) ...sap -b bdjwgvvh.Additional output (output) .05.. [E] 7 .cont. [system/*******] 7 ~ Destination directory (dest_dir) .please check/enter input values -----------------------------------------------------------------Additional BRRESTORE options for restore from BRBACKUP backup 1 .... BR291I BRRESTORE will be started with options '-p initGC2.4 BR*Tools for Oracle DBA 4....2 BR*Tools in Action 5 ..back. r . [] 8 ...

1043853566 BR280I Time stamp 2003-01-29 19.data2 will be overwritten BR428W File /oracle/GC2/sapdata5/testi_1/testi..06. /oracle/GC2/sapdata6/testd_1/testd.08.2..04 #FILE.04 BR403I BRRESTORE terminated successfully with warnings ================================================================= 4....05 BR257I Your reply: 'c' BR259I Program execution will be continued.08.04 BR256I Enter 'c[ont]' to continue.08. .06..04 #FILE... 's[top]' to cancel the program: BR280I Time stamp 2003-01-29 19.. BR280I Time stamp 2003-01-29 19.06.data1 #RESTORED. 1043853591 BR280I Time stamp 2003-01-29 19..04 BR374I 3 of 3 files restored by backup utility BR230I Backup utility called successfully BR406I End of file restore: rdjwhkwq.04 BR428W File /oracle/GC2/sapdata6/testd_1/testd.06 BR229I Calling backup utility..data1 will be overwritten BR280I Time stamp 2003-01-29 19...08...5.04 BR280I Time stamp 2003-01-29 19. BR280I Time stamp 2003-01-29 19.4 BR*Tools for Oracle DBA 4.08.. 1043853582 BR280I Time stamp 2003-01-29 19. =================================================================== BR401I BRRESTORE 6.rsb 2003-01-29 19.. /oracle/GC2/sapdata6/testd_2/testd.08..06.data1 will be overwritten BR428W File /oracle/GC2/sapdata6/testd_2/testd...04 #FILE.2 BR*Tools in Action BR259I Program execution will be continued.6 Restore and Application of Offline Redo Log Files with BR*Tools Purpose April 2004 307 ...data1 #RESTORED. /oracle/GC2/sapdata5/testi_1/testi.30 (0) BR405I Start of file restore: rdjwhkwq.rsb 2003-01-29 19.data2 #RESTORED.

Prerequisites • Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>. 308 April 2004 . Make sure that all database files are consistent before trying to open the database. see Restore and Application of Offline Redo Log Files [Page 174].sap [Page 488]. archivelog files. BRRESTORE restores offline redo log files and BRRECOVER applies the offline redo log files. You choose Restore and recovery → Restore and application of archivelog files. you might severely damage the database with this procedure. You can overwrite existing offline redo log files if required. This section discusses how to perform a restore and apply of offline redo log files. For more information on how to approach restore and apply of offline redo log files. If you are not an expert. BRRECOVER starts the restore or apply. The database is closed for the shortest time possible. Even as an expert. Process Flow . You have less guidance than otherwise.. 1. you can force application of the online redo logs – that is. the usual safeguards are not present: There is no database status check. • • You must meet the following prerequisites before starting the restore or apply: Procedure Requirements Restore archivelog files • • Check that there is enough free space in the restore directory The BRARCHIVE summary log exists Apply archivelog files Open database • • Identify the offline redo log sequence number that the database requires to start the apply.because BRTOOLS uses these when it calls BRRECOVER. 3. You choose the required procedure.2 BR*Tools in Action You can use BR*Tools [Page 181] for Oracle to restore and apply offline redo log files – that is. the online redo logs that have been archived but not yet overwritten. since BRRECOVER does not guide you step by step through restore and recovery.. You start BRGUI or BRTOOLS. we recommend that you first try other types of recovery supported by BR*Tools. For Apply archivelog files. You might lose data and cause downtime to fix the problem. Since this function is designed for experts. Only perform this procedure if you are an expert in Oracle database administration. You can choose individual actions independently. BRRECOVER calls SQLPLUS to apply the offline redo log files. 2.4 BR*Tools for Oracle DBA 4.

Restore second copy (sec_copy) lets you use the second copy of the restore if the first is damaged or unavailable. 5. Restore device type (device) is taken from the device type used for the backup containing the selected offline redo log files. If you chose Apply archivelog files. you set the required options and choose Continue to start the restore: Menu Entry Equivalent BRRESTORE Command Options BRRESTORE profile (profile) First sequence number (first_seq) Last sequence number (last_seq) Restore device type (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) BRRESTORE command line (command) -p|-profile [Page 404] -a|-archive <log_no1>-<log_no2> [Page 399] -a|-archive <log_no1>-<log_no2> [Page 399] -d|-device [Page 400] -r|-parfile [Page 405] -u|-user [Page 405] -a2|-archive2 [Page 399] -a|-archive <log_no1>-<log_no2> rest_dir [Page 399] -c|-confirm [Page 400] -q|-query [Page 404] -k|-compress [Page 402] -o|-output [Page 404] -l|-language [Page 402] This shows you the BRRESTORE command [Page 397] that is to be executed using the current settings.2 BR*Tools in Action Processing now depends on which procedure you chose. 4. All selected offline redo log files must be backed up on the same backup device type. you set the required options and choose Continue to start the apply: Menu Entry Meaning Archivelog directory (archive_dir) First sequence number (first_seq) Last sequence number (last_seq) Last system change number (last_scn) The source directory used by SQLPLUS to apply the redo log files The sequence number of the first offline redo log file to apply The sequence number of the last offline redo log file to apply Specifies that the recovery finishes with an Oracle system change number (SCN) April 2004 309 .4 BR*Tools for Oracle DBA 4. If you chose Restore archivelog files.

hours. using the time stamp (that is.alf displays the progress. minutes. BR655I Choice menu 131 . Use backup control file (back_ctl) Parallel recovery (degree) SQLPLUS command (command) You must enter First sequence number (first_seq) and Last sequence number (last_seq). 6. all the offline redo logs in the sequence you specify are applied.4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action End point-in-time (end_pit) Specifies that the recovery finishes with a normal point in time.log displays the return code The detail log [Page 406] r<encoded timestamp>alf displays the progress. 7. Specifies whether the recovery is serial or parallel This shows you the SQLPLUS command that is to be executed using the current settings. you open the database [Page 341]. only changes in the logs up till the last_scn or end_pit that you specify are applied. If required.Reset input values 310 April 2004 . For more information on how to view the logs.Apply archivelog files 3 .Open database 4 . The detail log [Page 414] v<encoded timestamp>.please decide how to proceed ------------------------------------------------------------------Restore and application of archivelog files 1 = Restore archivelog files 2 . see Showing Logs with BR*Tools [Page 353]. BRRESTORE logs [Extern] for the restore functions: The summary log [Page 407] rest<DBSID>. you can also enter Last system change number (last_scn) or End point-in-time (end_pit). Example This example shows the contents of the BRRECOVER detail log file for Apply archivelog files. If you chose Open database.log displays the return code. In this case. and seconds) Option for SQLPLUS RECOVER command. You check the results in the BRRECOVER and BRRESTORE logs: BRRECOVER logs [Page 414]: The summary log [Page 416] recov<DBSID>. date.Exit program 5 . In this case.

.cont... 'b[ack]' to go back...help ------------------------------------------------------------------BR662I Enter your choice: BR280I Time stamp 2003-01-29 19...back.... BR783I Archivelog files with sequence number 9-10 will be applied to database GC2 BR280I Time stamp 2003-01-29 19.56 BR663I Your choice: 'c' BR259I Program execution will be continued..... r . [/oracle/GC2/saparch] 2 ...10.10.2 BR*Tools in Action Standard keys: c ..58 BR336I Applying offline redo log file /oracle/GC2/saparch/1_9.help ------------------------------------------------------------------BR662I Enter your choice: BR280I Time stamp 2003-01-29 19.refr..4 BR*Tools for Oracle DBA 4...... b . [10] 5 ~ Last system change number (last_scn) . 's[top]' to abort: BR280I Time stamp 2003-01-29 19. h .10.please check/enter input values ------------------------------------------------------------------Apply archivelog files to database instance GC2 1 .stop.SQLPLUS command (command) .refr...... April 2004 311 .. [] 9 ...Archivelog directory (archive_dir) . s .55 BR657I Input menu 134 ....... r ...58 BR257I Your reply: 'c' BR259I Program execution will be continued...First sequence number (first_seq) ..back... b .... h .10.. [recover from '/oracle/GC2/saparch' database] Standard keys: c ....Use backup control file (back_ctl) .cont. BR280I Time stamp 2003-01-29 19.Apply from redolog group (apply_redo) ... [9] 4 .56 BR670I Enter 'c[ont]' to continue. BR280I Time stamp 2003-01-29 19.dbf . [] 6 ~ End point-in-time (end_pit) .stop.08... [no] 8 ~ Parallel recovery (degree) .... s .Last sequence number (last_seq) .51 BR663I Your choice: '2' BR613I Database instance GC2 is shut down BR750I Database instance GC2 will be mounted now .10.. [] 3 .. [] 7 .

dbf applied successfully BR280I Time stamp 2003-01-29 19.58 BR337I Offline redo log file /oracle/GC2/saparch/1_9..2 BR*Tools in Action BR336I Applying offline redo log file /oracle/GC2/saparch/1_10. If you are not an expert. BR280I Time stamp 2003-01-29 19. including the profiles and the BRBACKUP logs or the BRARCHIVE logs. This section discusses how to perform disaster recovery. the usual safeguards are not present: There is no database status check.dbf .4 BR*Tools for Oracle DBA 4. BRRESTORE is not called by disaster recovery.10. Even as an expert. because it always requires the BRBACKUP Logs [Page 375] or the BRARCHIVE Logs [Page 391]. This process does not actually restore data files or recover redo log files. You have only lost the profiles and the BRBACKUP or BRARCHIVE logs.10. you might severely damage the database with this procedure.. You might lose data and cause downtime to fix the problem. see Disaster Recovery [Page 175]. Only perform this process if you are an expert in Oracle database administration. Therefore. You use BRRECOVER to restore missing or damaged profiles and log files.2. 312 April 2004 .7 Purpose Disaster Recovery with BR*Tools You can use BR*Tools [Page 181] for Oracle to recover from a disaster.59 BR337I Offline redo log file /oracle/GC2/saparch/1_10. it prepares the database for you to perform one of the following guided BR*Tools options: • • Database point-in-time (PIT) recovery [Page 297] Whole database reset [Page 300] 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). You use this process if either of the following is true: • • You have lost the entire database. Prerequisites • Since this function is designed for experts.5. which might not be available in a disaster. It only restores the profiles and BRBACKUP or BRARCHIVE logs from copies that you made during previous backups. we recommend that you first try other types of recovery supported by BR*Tools.dbf applied successfully =================================================================== 4. For more information on how to approach disaster recovery.

1. April 2004 313 . the recommendation is Yes to let you restore it. 3. • • • • For all procedures. you must first try and recreate it before performing disaster recovery. You choose the required procedure: 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. note the following: The BACKINT repository with the latest backup must be available because the tapes are administered using this repository in the backup utility. It uses the information there for the restore. Initialization Profile init<DBSID>. you can specify the backup directory. BRRECOVER looks in the sub-directory <DBSID> of the specified directory to find the summary log for BRBACKUP or BRARCHIVE.4 BR*Tools for Oracle DBA 4. if available. you note the following: For a disk backup. 5. You are effectively performing a copy at operating-system level.. The default parameters are taken from the current profile. depending on what kind of device type you specified. You can choose individual actions independently. since BRRECOVER does not guide you step by step through restore and recovery.sap [Page 488]. For a utility backup. You need to know exactly which file to restore and where it is. You choose Continue to continue the restore with the displayed parameters. You choose Restore and recovery → Disaster recovery. depending on the specific implementation that you are using. The BACKINT parameter file must normally exist. If it is required but is unavailable. you change the recommended values for restoring the profiles and logs. If a log or profile does not exist on disk. Process Flow . check “Prerequisites” above. BRRECOVER calls BACKINT to perform the restore. the recommendation is No to avoid overwriting it. BACKINT performs the restore from the profiles or logs of the latest backup. You choose the device tape where the backups of the profiles or logs are stored. BRRECOVER warns you that the profiles and logs might be overwritten. For a disk backup or a utility backup. You can select several profiles or logs to restore. 6. If you choose device type Backup utility for the restore. 2. 4.2 BR*Tools in Action You have less guidance than otherwise. BRRECOVER restores the profiles and logs to the standard directory. You start BRGUI or BRTOOLS.. If required. the backup medium with the required backup files must obviously be present. BRRECOVER displays the restore menu where you can specify which profiles and logs to restore: If a log or profile already exists on disk. 7. BRRECOVER displays the parameters for restoring the profiles or logs.

back. BR0280I Time stamp 2003-01-31 18. You check the results in the BRRECOVER logs [Page 414]: The summary log [Page 416] recov<DBSID>. h .log displays the return code. Example This example shows the contents of the BRRECOVER detail log file for Restore profiles and log files from BRBACKUP backup.Local disk 4 ..drv displays the progress.4 BR*Tools for Oracle DBA 4.Backup utility Standard keys: c ..cont.27 BR0656I Choice menu 137 ..back.please decide how to proceed ------------------------------------------------------------------Disaster recovery main menu 1 = Restore profiles and log files from BRBACKUP backup 2 .28 BR0663I Your choice: 'c' BR0259I Program execution will be continued. r .Remote tape 3 . For more information on how to view the logs.help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18. b .cont.help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18. BR0655I Choice menu 136 .stop. r . You choose Continue to start restoring the selected profiles or logs.refr.18.Restore profiles and log files from BRARCHIVE backup 3 .27 BR0663I Your choice: 'c' BR0259I Program execution will be continued.2 BR*Tools in Action 8. 314 April 2004 .18.refr.18.please make a selection ------------------------------------------------------------------Device type for restoring profiles and log files from BRBACKUP backup 1 = Local tape 2 . s . b . s .Reset input values Standard keys: c . see Showing Logs with BR*Tools [Page 353].stop.Remote disk 5 . The detail log [Page 414] v<encoded timestamp>. using a local tape.. h .Exit program 4 . 9.

.Tape drive with rewind (tape_address_rew) ..Detail log (det_log) .18. [no] 2 ..Cpio input options (cpio_in_flags) .... s ...Tape drive with no-rewind (tape_address) .back..Backup profile (profile) ....18.stop.. h . r ... .Backup profile (init_sap) . [mt -f $ rewind] 5 ..42 BR0663I Your choice: 'c' BR0259I Program execution will be continued..... r .....cont...... [no] 10 # Control file copy (control_file) ..2 BR*Tools in Action BR0280I Time stamp 2003-01-31 18.please check/enter input values ------------------------------------------------------------------Parameters for restoring profiles and log files from local BRBACKUP tape 1 . [no] 3 ... [no] 9 – BRSPACE parameter log (param_log) . [no] Standard keys: c .........stop.. b ....BRSPACE structure log (struc_log) .refr...18..40 BR0657I Input menu 145 .Tape rewind command (rewind) . [-iuv -C 65536] Standard keys: c .sap] 2 .help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18. [mt -f $ fsf $] 6 ...Summary log (sum_log) ....29 BR0663I Your choice: 'c' BR0259I Program execution will be continued...Tape positioning command (tape_pos_cmd) . [yes] 6 ..18.refr. BR0280I Time stamp 2003-01-31 18.....Oracle profile (sp_file) .. [/dev/rmt/1m] 4 .... [/oracle/GC2/dbs/initGC2... s .. [no] 7 – BRSPACE summary log (space_log) .help ------------------------------------------------------------------BR0662I Enter your choice: BR0280I Time stamp 2003-01-31 18......... [no] 5 ...28 BR0657I Input menu 138 . [no] 4 # BACKINT/Mount profile (init_utl) ......4 BR*Tools for Oracle DBA 4......... [no] 8 .... b ... April 2004 315 . h ..... [/dev/rmt/1mn] 3 .cont.please check/enter input values ------------------------------------------------------------------Restore of profiles and log files from BRBACKUP backup 1 .Oracle profile (init_ora) ..back....

's[top]' to abort: BR0280I Time stamp 2003-01-31 18. reorgGC2..log will be overwritten BR0746I File /oracle/GC2/sapreorg/reorgGC2..log will be restored from /dev/rmt/1mn BR0746I File /oracle/GC2/sapreorg/structGC2. /oracle/GC2/sapbackup/vdjwrcgu.46 BR0257I Your reply: 'c' BR0259I Program execution will be continued.10 BR0226I Rewinding tape volume in device /dev/rmt/1m ........ BR0226I Winding tape volume in device /dev/rmt/1m . 'b[ack]' to go back.. BR0370I Directory /oracle/GC2/sapbackup/vdjwrcgu.. 's[top]' to abort: BR0280I Time stamp 2003-01-31 18. if you have not already done so BR0280I Time stamp 2003-01-31 18.1/reorgGC2.log will be overwritten BR0746I File /oracle/GC2/sapreorg/structGC2..log .log will be restored from /oracle/GC2/sapbackup/vdjwrcgu.46 BR0226I Rewinding tape volume in device /dev/rmt/1m .. BR0210I Please mount BRBACKUP volume.18..44 BR0257I Your reply: 'c' BR0259I Program execution will be continued.. BR0428W File /oracle/GC2/sapreorg/structGC2.44 BR0670I Enter 'c[ont]' to continue.log 316 April 2004 .18. #FILE..log.18.1/reorg_log+struct_log #RESTORED.18. BR0428W File /oracle/GC2/sapreorg/reorgGC2.log #0/26 BR0370I Directory /oracle/GC2/sapbackup/vdjwrcgu created BR0202I Saving /oracle/GC2/sapreorg/reorgGC2.structGC2.18..log will be restored from /oracle/GC2/sapbackup/vdjwrcgu.4 BR*Tools for Oracle DBA 4.log BR0203I to /oracle/GC2/sapbackup/vdjwrcgu/reorgGC2..42 BR0670I Enter 'c[ont]' to continue.. 'b[ack]' to go back.be patient BR0351I Restoring /oracle/GC2/sapbackup/vdjwrcgu.1/reorg_log+struct_log BR0355I from /dev/rmt/1mn .19.. BR0285I This function can take several seconds/minutes . BR0280I Time stamp 2003-01-31 18.1 created BR0280I Time stamp 2003-01-31 18.2 BR*Tools in Action BR0746I File /oracle/GC2/sapreorg/reorgGC2.log will be restored from /dev/rmt/1mn BR0280I Time stamp 2003-01-31 18.1/structGC2.log BR0202I Saving /oracle/GC2/sapreorg/structGC2.log BR0203I to /oracle/GC2/sapbackup/vdjwrcgu/structGC2.log .

.log BR0355I from /oracle/GC2/sapbackup/vdjwrcgu.1/reorgGC2.1/structGC2. /oracle/GC2/sapreorg/reorgGC2.8 Procedures for Restore and Recovery with BR*Tools For more information on how and when to use these procedures.22. #FILE.log #RESTORED. 'b[ack]' to go back....you can continue to ignore them or go back to repeat the last action BR0280I Time stamp 2003-01-31 18...2 BR*Tools in Action BR0668I Warnings or errors occured .32 BR0670I Enter 'c[ont]' to continue... see: • • • • • • Complete database recovery [Page 296] Database point-in-time (PIT) recovery [Page 297] Tablespace point-in-time (PIT) recovery [Page 299] Whole database reset [Page 300] Restore of Individual Backup Files with BR*Tools [Page 301] Restore and Application of Offline Redo Log Files with BR*Tools [Page 307] Setting Point In Time and Tablespaces for Recovery Use You use this procedure to specify the: • Point in time (PIT) when using BRRECOVER to perform one of the following: Database PIT recovery [Page 297] Tablespace PIT recovery [Page 299] • Tablespaces to be recovered when using BRRECOVER to perform a tablespace PIT recovery April 2004 317 .1/structGC2.1/reorgGC2.. /oracle/GC2/sapbackup/vdjwrcgu. /oracle/GC2/sapbackup/vdjwrcgu.log ..log BR0749I 2 files have been successfully restored ================================================================== 4. #FILE.4 BR*Tools for Oracle DBA 4.log BR0351I Restoring /oracle/GC2/sapreorg/structGC2.log ..log #RESTORED.log BR0355I from /oracle/GC2/sapbackup/vdjwrcgu. 's[top]' to abort: BR0280I Time stamp 2003-01-31 18.35 BR0257I Your reply: 'c' BR0259I Program execution will be continued.2. BR0351I Restoring /oracle/GC2/sapreorg/reorgGC2..5.. /oracle/GC2/sapreorg/structGC2.22..

minutes. v<encoded timestamp>..4 BR*Tools for Oracle DBA 4. To set the point in time for the recovery. hours. • You can specify tablespaces by one of the following: SAP owner of the tablespaces Individual tablespace names To select tablespaces from a single component if you are running Multiple Components in One Database (MCOD). If you are performing a tablespace PIT recovery. date. enter the SAP owner of the tablespaces in the component that you want to recover. and seconds) An Oracle system change number (SCN) An Oracle log sequence number (SEQ) 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 Equivalent BRRECOVER Command Option Last archivelog sequence to apply (last_seq) Last system change number to apply (last_scn) End point-in-time for recovery (end_pit) Menu Entry -seq|-sequence [Page 413] -scn|-change [Page 412] -pit|-time [Page 412] Equivalent BRRECOVER Command Option 2. See “Example” below for the contents of the log file. 1.. Check the results in the BRRECOVER detail log [Page 414]. Each component has a different SAP owner. Example 318 April 2004 . using the time stamp (that is. For more information on how to view the logs. see Showing Logs with BR*Tools [Page 353]. Prerequisites • You can specify the PIT as one of the following: A normal point in time. Choose Continue to continue processing with the selected PIT.<ext>. enter one of the following: SAP owners for recovery (sap_owner) Tablespaces for recovery (tablespace) -own|-owner [Page 412] -tsp|-tablespace [Page 413] 3.2 BR*Tools in Action You can use this to select tablespaces from a single component if you are running Multiple Components in One Database (MCOD). Procedure . 4.

refr. Procedure .<ext>..... 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... see Showing Logs with BR*Tools [Page 353].. For more information on how to view the logs. [] 5 ~ Tablespaces for recovery (tablespace) ....back.2 BR*Tools in Action This example shows the contents of the BRRECOVER detail log file for this procedure. [] 4 ~ SAP owners for recovery (sap_owner) . Example April 2004 319 . using a tablespace PIT recovery.. s ..please check/enter input values -----------------------------------------------------------------Options for tablespace point-in-time recovery of database GC2 1 ~ Last archivelog sequence to apply (last_seq) .. Check the results in the BRRECOVER detail log [Page 414]. closes and again mounts – the database to refresh the views V$DATAFILE and V$RECOVER_FILE... b . 1...stop. r . it recommends to set them online. v<encoded timestamp>. h . Check the display and continue with the database recovery. If so. [] Standard keys: c .4 BR*Tools for Oracle DBA 4.. BR657I Input menu 107 ... 2.. If there are no files that need to be recovered. Prerequisites BRRECOVER remounts – that is.. See “Example” below for the contents of the log file.. [] 2 ~ Last system change number to apply (last_scn) .cont. BRRECOVER stops the recovery automatically. [] 3 ~ End point-in-time for recovery (end_pit) . This procedure checks the database for critical errors that might prevent production operation.help ------------------------------------------------------------------ Checking the Status of Database Files – I Use You check the database status when using BRRECOVER to perform Complete database recovery [Page 296]....

.28 NOLINK .ctl 21... 320 April 2004 .04..12.12.12.12.41 BR331I Start and mount of database instance GC2 successful BR118I Tablespaces and data files Tablespace Status File Status Id.55.2 BR*Tools in Action This example shows the contents of the BRRECOVER detail log file for the recovery phase “Check Status of Database Files.dbf 2097664 2003-01-29 19.28 NOLINK /oracle/GC2/mirrlog/redo01m2.” BR614I Database instance GC2 is mounted BR750I Database instance GC2 will be remounted now BR280I Time stamp 2003-01-29 19.11..31 BR308I Shutdown of database instance GC2 successful BR280I Time stamp 2003-01-29 19.ctl 21..25 BR307I Shutting down database instance GC2 ...55 5954 NOLINK ONLINE 35651591 4 FILE EXAMPLE UNKNOWN /oracle/GC2/sapdata2/example_1/example..31 BR330I Starting and mounting database instance GC2 .11.04.19 5040603 35651591 FILE /oracle/GC2/sapdata3/cntrl/control03.4 BR*Tools for Oracle DBA 4....19 5040603 35651591 FILE /oracle/GC2/sapdata2/cntrl/control02.data1 10493952 2002-07-31 16. BR280I Time stamp 2003-01-29 19. BR280I Time stamp 2003-01-29 19.57 5973 NOLINK .11.. BR120I Control files File Reset time Reset scn FILE 5101811 FILE Device Type Size Link 2003-01-28 2003-01-28 2003-01-28 /oracle/GC2/sapdata1/cntrl/control01.data1 126492672 2002-07-31 16..ctl 21.55.dbf 2097664 2003-01-29 19. Size Device Type Link DRSYS ONLINE 35651591 3 FILE Creation time Creation scn UNKNOWN /oracle/GC2/sapdata1/drsys_1/drsys.19 5040603 35651591 FILE 4579328 NOLINK 4579328 NOLINK 4579328 NOLINK BR755I Checking the status of database files for instance GC2. BR119I Redo log files File Size First time First scn 5101811 Status Group Device Type INUSE 1 35651591 INUSE 1 35651591 Link /oracle/GC2/origlog/redo01m1.

Procedure . BRRECOVER processes these intelligently.it will be recovered BR760I Data file /oracle/GC2/sapdata5/testi_1/testi. or a tablespace PIT recovery. it automatically detects overlapping partial backups and uses only the latest available data files. you can select multiple partial backups. For whole database reset. incremental. For restore of individual backup files. • • • • • See “Example” below for the contents of the log file. The exception to this is for restore of individual backup files. where all backups are displayed. and partial backups..4 BR*Tools for Oracle DBA 4. BRRECOVER only displays incremental backups.data1 not found it will be restored/recreated and recovered BR760I Data file /oracle/GC2/sapdata6/testd_1/testd. a database PIT recovery. you can only select the following types of database backup: April 2004 321 . BRRECOVER does not display partial backups for selection. BRRECOVER also displays backups with errors.. BRRECOVER recommends the most recent successful backup as a default for the recovery. For a complete database recovery. Unless you select another backup. BRRECOVER displays complete.data2 not current .data1 not found it will be restored/recreated and recovered BR758I Data file /oracle/GC2/sapdata6/stabi_1/stabi. That is.data1 not current . If required.data1 not current .it will be recovered BR760I Data file /oracle/GC2/sapdata6/testd_2/testd. In this case. it uses this for the recovery. For whole database reset. 1. If you are applying an incremental backup. you can only select one backup.it will be recovered Selecting Database Backups Use You select BRBACKUP database backups when using BRRECOVER to perform: • • • • • Complete database recovery [Page 296] Database point-in-time (PIT) recovery [Page 297] Tablespace point-in-time (PIT) recovery [Page 299] Whole database reset [Page 300] Restore of individual backup files [Page 301] Prerequisites • BRRECOVER only displays backups that finished with a return code of 0 or 1. select a backup that is different from the default recommended by BRRECOVER.2 BR*Tools in Action BR758I Data file /oracle/GC2/sapdata5/stabd_1/stabd.

For complete or PIT recovery.fft 3 . BRRECOVER roughly checks the availability of offline redo log – that is. For example.ffd 2 .bdjwgwtj. Such files are not contained in the backup but they might need to be recreated.fnt 5 . Choose Continue to continue processing with the selected backup. Log Start 2003-01-29 17.bdjwgvvh. Check the results in the BRRECOVER detail log [Page 414]. Example This example shows the contents of the BRRECOVER detail log file for this procedure.fnf Checking the Status of Database Files – II Use You check the database status when using BRRECOVER to perform one of the following: • • Database Point-In-Time Recovery with BR*Tools [Page 297] Whole Database Reset with BR*Tools [Page 300] 322 April 2004 .16.30.55 2003-01-29 16.4 BR*Tools for Oracle DBA 4. see Showing Logs with BR*Tools [Page 353].2 BR*Tools in Action • Complete offline • Complete online consistent • Incremental offline • Incremental online consistent For more information.51 2003-01-29 17. 3. BRRECOVER issues a warning.bdjwhadu.fff 4 . see Database Backup Types [Page 86]. Database backups for complete database recovery Pos.29 Type offline offline offline onl_cons onl_cons Mode full full full full full Device disk tape util_onl tape util_onl Rc 0 1 0 0 0 1 = bdjwhckx.05.42 2003-01-29 16. You can continue if you are sure that either of the following is true: You can find the required offline redo log files The offline redo log files will not be required BRRECOVER identifies files that were added during or (only for PIT) after the selected backup. archivelog – files in the BRARCHIVE summary log file [Page 392]. 2. depending on the device type used for the backup: Tape or BACKINT Disk Stage (remote disk) If the files are unavailable.48. a tablespace might have been extended during an online backup. v<encoded timestamp>.bdjwgyrq.14 2003-01-29 16.<ext>. For more information on how to view the logs.26. This does not apply to complete database recovery and restore individual backup files.

4 BR*Tools for Oracle DBA 4. Prerequisites • BRRECOVER checks whether the control files are available.2 BR*Tools in Action This procedure checks the availability and status of database files to determine how to handle them during restore and recovery..58 BR330I Starting and mounting database instance GC2 .08 April 2004 323 .57 BR308I Shutdown of database instance GC2 successful BR370I Directory /oracle/GC2/sapbackup/vdjwhnnh created BR202I Saving /oracle/GC2/sapdata1/cntrl/control01... See “Example” below for the contents of the log file..35. If the control files are available.51 BR307I Shutting down database instance GC2 . v<encoded timestamp>..ctl BR203I to /oracle/GC2/sapbackup/vdjwhnnh/control01. BRRECOVER writes the results of the status check to the BRRECOVER detail log file.35. BR280I Time stamp 2003-01-29 19. 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.ctl . Check the results in the BRRECOVER detail log [Page 414]. Check the display and continue with the database recovery. Such files need to be later deleted. BR280I Time stamp 2003-01-29 19...36. see Showing Logs with BR*Tools [Page 353]. a tablespace might have been extended after the selected backup or PIT. • BRRECOVER checks the following files to identify which ones need to be overwritten: Control files Redo log files Data files • BRRECOVER identifies files that need to be later deleted.. It identifies files that were added after the: Selected backup – for whole database reset PIT – for database or tablespace PIT For example. 1. 2.35. Example This example shows the contents of the BRRECOVER detail log file for this procedure. BR614I Database instance GC2 is mounted BR750I Database instance GC2 will be remounted now BR280I Time stamp 2003-01-29 19. BR280I Time stamp 2003-01-29 19. BRRECOVER remounts – that is. Procedure .<ext>.

BR280I Time stamp 2003-01-29 19.11..2 BR*Tools in Action BR331I Start and mount of database instance GC2 successful BR118I Tablespaces and data files Tablespace Status File Status Id.19 5040603 35651591 FILE /oracle/GC2/sapdata3/cntrl/control03.data1 will be overwritten BR428W File /oracle/GC2/sapdata2/example_1/example. BR119I Redo log files File Size First time First scn 5101811 Status Group Device Type INUSE 1 35651591 INUSE 1 35651591 Link /oracle/GC2/origlog/redo01m1..ctl 21.57 5973 NOLINK ... Size Device Type Link DRSYS RECOVER 35651591 3 FILE Creation time Creation scn UNKNOWN /oracle/GC2/sapdata1/drsys_1/drsys.ctl 21.19 5040603 35651591 FILE /oracle/GC2/sapdata2/cntrl/control02. BR120I Control files File Reset time Reset scn FILE 5101811 FILE Device Type Size Link 2003-01-28 2003-01-28 2003-01-28 /oracle/GC2/sapdata1/cntrl/control01.28 NOLINK /oracle/GC2/mirrlog/redo01m2..4 BR*Tools for Oracle DBA 4.11.28 NOLINK .04.data1 will be overwritten BR428W File /oracle/GC2/sapdata4/indx_1/indx.55.19 5040603 35651591 FILE 4579328 NOLINK 4579328 NOLINK 4579328 NOLINK BR755I Checking the status of database files for instance GC2..dbf 2097664 2003-01-29 19.55 5954 NOLINK RECOVER 35651591 4 FILE EXAMPLE UNKNOWN /oracle/GC2/sapdata2/example_1/example.you can continue to ignore them or go back to repeat the last action Checking the Status of Tablespaces 324 April 2004 ....55..dbf 2097664 2003-01-29 19.36.data1 10493952 2002-07-31 16.ctl 21..11.09 BR668I Warnings or errors occurred ... BR428W File /oracle/GC2/sapdata1/drsys_1/drsys.data1 will be overwritten .04..data1 126492672 2002-07-31 16.

35 BR663I Your choice: 'c' April 2004 325 . 1. based on the tablespaces that you selected earlier.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 # Apply incremental backup if needed 7 * Restore and apply archivelog files 8 * Open database and plug in exported tablespaces 9 .help -----------------------------------------------------------------BR662I Enter your choice: BR280I Time stamp 2003-01-31 18. BRRECOVER writes the results of the status check to the BRRECOVER detail log file. s . Prerequisites • • • BRRECOVER checks that all files are online. b .Exit program 10 .cont. See “Example” below for the contents of the log file. r . This is normally true if the database is open.stop.Reset input values Standard keys: c .36. Check the display and continue with the tablespace recovery.4 BR*Tools for Oracle DBA 4. see Showing Logs with BR*Tools [Page 353].back. Check the results in the BRRECOVER detail log [Page 414]. For more information on how to view the logs.2 BR*Tools in Action Use You check the status of tablespaces when using BRRECOVER to perform Tablespace PointIn-Time Recovery [Page 299]. Example BR655I Control menu 106 . h .. After you have selected the tablespaces to recover [Page 317]. you cannot continue with the recovery. this procedure identifies the corresponding database files. 2. If so.<ext>.refr. BRRECOVER identifies which data files need to be recovered. Procedure . v<encoded timestamp>. 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 checks if the tablespaces that you selected and the other data tablespaces are separate self-contained groups.

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

BR259I Program execution will be continued... BR342I Database instance GC2 is open in RESTRICT mode BR118I Tablespaces and data files Tablespace Status File Status Id. Size Device Type Link DRSYS ONLINE 35651591 3 FILE Creation time Creation scn

ONLINE /oracle/GC2/sapdata1/drsys_1/drsys.data1 10493952 2002-07-31 16.55.55 5954 NOLINK ONLINE 35651591 4 FILE

EXAMPLE ONLINE /oracle/GC2/sapdata2/example_1/example.data1 126492672 2002-07-31 16.55.57 5973 NOLINK ..... BR119I Redo log files File Size First time First scn 5217256

Status Group Device Type INUSE 1 35651591 INUSE 1 35651591

Link

/oracle/GC2/origlog/redo01m1.dbf 2097664 2003-01-31 11.55.28 NOLINK /oracle/GC2/mirrlog/redo01m2.dbf 2097664 2003-01-31 11.55.28 NOLINK ..... BR120I Control files File Reset time Reset scn

FILE

5217256

FILE

Device

Type

Size Link 2003-01-28 2003-01-28 2003-01-28

/oracle/GC2/sapdata1/cntrl/control01.ctl 21.11.19 5040603 35651591 FILE /oracle/GC2/sapdata2/cntrl/control02.ctl 21.11.19 5040603 35651591 FILE /oracle/GC2/sapdata3/cntrl/control03.ctl 21.11.19 5040603 35651591 FILE

4579328 NOLINK 4579328 NOLINK 4579328 NOLINK

BR755I Checking the status of database files for instance GC2... BR428W File /oracle/GC2/sapdata1/drsys_1/drsys.data1 will be overwritten BR428W File /oracle/GC2/sapdata2/example_1/example.data1 will be overwritten BR428W File /oracle/GC2/sapdata4/indx_1/indx.data1 will be overwritten ..... BR668I Warnings or errors occured - you can continue to ignore them or go back to repeat the last action BR280I Time stamp 2003-01-31 18.36.35

326

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

BR670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort: BR280I Time stamp 2003-01-31 18.36.36 BR257I Your reply: 'c' BR259I Program execution will be continued... BR280I Time stamp 2003-01-31 18.36.37 BR739I Checking if following tablespaces are self-contained: DRSYS,EXAMPLE,INDX,PSAPRAWD,PSAPRAWI, PSAPTESTI,TOOLS,USERS,XDB BR285I This function can take several seconds/minutes - be patient BR280I Time stamp 2003-01-31 18.36.52 BR739I Checking if following tablespaces are self-contained: PSAPSTABD,PSAPSTABI,PSAPTESTD,PSAPTTTTD BR285I This function can take several seconds/minutes - be patient

Exporting the Tablespaces Not Being Recovered
Use
You export tablespaces that do not need to be recovered when using BRRECOVER to perform Tablespace Point-In-Time Recovery [Page 299]. During the database status check [Page 324], BRRECOVER identified which tablespaces it needs to export because they are not involved in the recovery.

Prerequisites

BRRECOVER uses the Oracle EXP tool to export the tablespaces that are not involved in the recovery.

In fact, BRRECOVER calls EXP to export only the metadata of these tablespaces. The tablespace data remains in the data files but is invisible to the database during the recovery. This means that the recovery does not affect these tablespaces.

• •

Before exporting these tablespaces, BRRECOVER sets them to status READ ONLY. BRRECOVER writes the results to the BRRECOVER detail log file. See “Example” below for the contents of the log file.

Procedure
...

1. Check the display and continue with the database recovery. 2. Check the results in the BRRECOVER detail log [Page 414], v<encoded timestamp>.tpt. For more information on how to view the logs, see Showing Logs with BR*Tools [Page 353].

Example
This example shows the contents of the BRRECOVER detail log file for this procedure.

April 2004

327

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

BR655I Control menu 106 - 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 # Apply incremental backup if needed 7 * Restore and apply archivelog files 8 * Open database and plug in exported tablespaces 9 - Exit program 10 - Reset input values Standard keys: c - cont, b - back, s - stop, r - refr, h - help -----------------------------------------------------------------BR662I Enter your choice: BR280I Time stamp 2003-01-31 18.37.06 BR663I Your choice: 'c' BR259I Program execution will be continued... BR342I Database instance GC2 is open in RESTRICT mode BR767I Following tablespaces will be set READ ONLY: PSAPSTABD,PSAPSTABI,PSAPTESTD,PSAPTTTTD BR280I Time stamp 2003-01-31 18.37.07 BR670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort: BR280I Time stamp 2003-01-31 18.37.10 BR257I Your reply: 'c' BR259I Program execution will be continued... BR768I Tablespace PSAPSTABD set READ ONLY BR768I Tablespace PSAPSTABI set READ ONLY BR768I Tablespace PSAPTESTD set READ ONLY BR768I Tablespace PSAPTTTTD set READ ONLY BR742I Metadata of the following tablespaces will be exported: PSAPSTABD,PSAPSTABI,PSAPTESTD,PSAPTTTTD BR280I Time stamp 2003-01-31 18.37.10 BR670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort: BR280I Time stamp 2003-01-31 18.37.14 BR257I Your reply: 'c'

328

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

BR259I Program execution will be continued... BR370I Directory /oracle/GC2/sapbackup/vdjwrdum created BR278I Command output of '/oracle/GC2/bin/exp': Export: Release 9.2.0.1.0 - Production on Fri Jan 31 18:37:14 2003 Copyright (c) 1982, 2002, Oracle Corporation. Username: Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 Production With the Partitioning option JServer Release 9.2.0.1.0 - 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... For tablespace PSAPSTABD ... . exporting cluster definitions . exporting table definitions . . exporting table . . exporting table . . exporting table ..... . . exporting table For tablespace PSAPSTABI ... . exporting cluster definitions . exporting table definitions For tablespace PSAPTESTD ... . exporting cluster definitions . exporting table definitions . . exporting table For tablespace PSAPTTTTD ... . exporting cluster definitions . exporting table definitions . . exporting table . exporting triggers . end transportable tablespace metadata export Export terminated successfully without warnings. BR744I EXP called successfully for database instance GC2 SDBAH_2 . exporting referential integrity constraints SDBAH_1 SDBAH DBABL DBABD DBAML All rights reserved.

April 2004

329

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

Restoring Control Files
Use
You restore the control files when using BRRECOVER to perform:

• •

Database point-in-time (PIT) recovery [Page 297] Whole database reset [Page 300]

For a whole database reset, you also restore the offline redo log files, but only if you selected [Page 321] an online consistent backup.

Whereas a whole database reset always restores the control files, 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 – if required for whole database reset – the offline redo log files.

Prerequisites
You can repeat this phase if a BRRESTORE call has failed. See “Example” below for the contents of the log file.

Procedure
...

1. Set the required options:
Menu Entry Equivalent BRRESTORE Command Option

BRRESTORE profile (profile) BRBACKUP run (backup) Restore device type (device) BACKINT/Mount profile (parfile) Files for restore (mode) Confirmation mode (confirm) Query mode (query) Compression mode (compress) Additional output (output) Message language (language) BRRESTORE command line (command)

-p|-profile [Page 404] -b|-backup|b1|backup1 [Page 400] -d|-device [Page 400] -r|-parfile [Page 405] -m|-mode 0[,archive_logs] [Page 402] -c|-confirm [Page 400] -q|-query [Page 404] -k|-compress [Page 402] -o|-output [Page 404] -l|-language [Page 402] This shows you the BRRESTORE command [Page 397] that is to be executed using the current settings.

Restore device type (device) is taken from the device type used for the selected backup.

330

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

Files for restore (mode) refers to the Oracle file ID or the keyword archive_logs. The files for restore varies: • •
For the control files restore, a dummy file ID, 0, is used. For the restore of offline redo log files from an online consistent backup (only relevant for whole database reset, as described above), the keyword archive_logs is used.

2. To start the restore with the selected options, choose Continue. 3. Check the results in the BRRESTORE logs [Page 406]: The summary log rest<DBSID>.log displays the return code. The detail log r<encoded timestamp>.<ext> displays the progress. For more information on how to view the logs, see Showing Logs with BR*Tools [Page 353].

Example
The control file restore runs in a similar way to the example shown in Restoring Data Files [Page 331].

Restoring Data Files
Use
You use this procedure when using BRRECOVER to perform:

• • • • •

Complete database recovery [Page 296] Database point-in-time (PIT) recovery [Page 297] Tablespace point-in-time (PIT) recovery [Page 299] Whole database reset [Page 300] Restore of individual backup files [Page 301]
Type of Recovery What is Restored

This procedure calls BRRESTORE to restore files as follows: Complete database recovery Data files that BRRECOVER identified as missing in Checking the Status of Database Files [Page 319]
All data files

Database PIT recovery and whole database reset Tablespace PIT recovery Restore individual backup files

Data files of the selected tablespaces plus the data files for the system and rollback tablespaces

• •

For Restore files from BRBACKUP backup: Selected data files For Apply incremental backup: Incremental backup save set

Prerequisites

BRRECOVER repeats this phase as required to restore all required files.

April 2004

331

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

BRRECOVER avoids duplicate restores by logging which files it has already restored.

See “Example” below for the contents of the log file.

Procedure
...

1. Set the required options:
Menu Entry Equivalent BRRESTORE Command Option

BRRESTORE profile (profile) BRBACKUP run (backup) Fill-up previous restores (fillup) Restore device type (device) BACKINT/Mount profile (parfile) Database user/password (user) Restore destination (rest_dest)

-p|-profile [Page 404] -b|-backup|b1|backup1 [Page 400] -f|-fillup [Page 401] -d|-device [Page 400] -r|-parfile [Page 405] -u|-user [Page 405] Only for restore individual backup files, option Restore files from BRBACKUP backup: -m|-mode = <rest_dir> [Page 402]

Files for restore (mode)

• •

Complete database recovery: -m|-mode <file_ID1>-<file_ID2> [Page 402] Database PIT recovery or whole database reset: -m|-mode all [Page 402] Tablespace PIT recovery: -m|-mode <tablespace_list> [Page 402] Restore individual backup files:

• •

Restore files from BRBACKUP backup:
-m|-mode <file_ID1>-<file_ID2> [Page 402]

Apply incremental backup:
-m|-mode incr [Page 402]

Confirmation mode (confirm) Query mode (query) Compression mode (compress) Parallel execution (execute) Additional output (output) Message language (language) BRRESTORE command line (command)

-c|-confirm [Page 400] -q|-query [Page 404] -k|-compress [Page 402] -e|-execute [Page 401] -o|-output [Page 404] -l|-language [Page 402] This shows you the BRRESTORE command [Page 397] that is to be executed using the current settings.

332

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

Restore device type (device) is taken from the device type used for the selected backup. Files for restore (mode) refers to the Oracle file ID, a tablespace, or a keyword such as incr or all. The files for restore can vary, as described in the table above at the start of this procedure. 2. To start the restore with the selected options, choose Continue.
3. Check the results in the BRRESTORE logs [Page 406]: The summary log rest<DBSID>.log displays the return code. The detail log r<encoded timestamp>.<ext> displays the progress. For more information on how to view the logs, see Showing Logs with BR*Tools [Page 353].

Example
This example shows the contents of the BRRECOVER detail log file for this procedure when executed as part of a complete database recovery:

This example shows files 9 and 10 to be restored. However, the files for restore can vary, as described in the table above at the start of this procedure. BRRESTORE main options for restore of database files

1 - BRRESTORE profile (profile) ........ [initGC2.sap] 2 - BRBACKUP backup run (backup) ....... [bdjwhckx.ffd] 3 - Fill-up previous restores (fillup) . [no] 4 - Restore device type (device) ....... [disk] 5 # BACKINT/Mount profile (parfile) .... [dbs/initGC2.utl] 6 - Database user/password (user) ...... [system/*******] 7 - Files for restore (mode) ........... [9-10] Standard keys: c - cont, b - back, s - stop, r - refr, h - help -----------------------------------------------------------------BR280I Time stamp 2003-01-29 19.12.43 BR134I Unattended mode with 'force' active - continuing processing with default reply 'cont' BR280I Time stamp 2003-01-29 19.12.43 BR657I Input menu 112 # please check/enter input values -----------------------------------------------------------------Additional BRRESTORE options for restore of database files 1 - Confirmation mode (confirm) ...... [force] 2 - Query mode (query) ............... [no] 3 - Compression mode (compress) ...... [no] 4 - Parallel execution (execute) ..... [0] 5 - Additional output (output) ....... [no]

April 2004

333

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

6 - Message language (language) ...... [E] 7 - BRRESTORE command line (command) . [-p initGC2.sap -b bdjwhckx.ffd -d disk -m 9-10 -c force -k no -e 0 -l E] Standard keys: c - cont, b - back, s - stop, r - refr, h - help -----------------------------------------------------------------BR280I Time stamp 2003-01-29 19.12.43 BR134I Unattended mode with 'force' active - continuing processing with default reply 'cont' BR291I BRRESTORE will be started with options '-p initGC2.sap -b bdjwhckx.ffd -d disk -m 9-10 -c force -k no -e 0 -l E' ================================================================== BR401I BRRESTORE 6.30 (0) BR405I Start of file restore: rdjwhlma.rsb 2003-01-29 19.12.44 BR457I Probably the database must be recovered due to partial restore BR280I Time stamp 2003-01-29 19.12.44 BR407I Restore of database: GC2 BR408I BRRESTORE action ID: rdjwhlma BR409I BRRESTORE function ID: rsb BR449I Restore mode: PARTIAL BR411I Database files for restore: /oracle/GC2/sapdata5/stabd_1/stabd.data1 /oracle/GC2/sapdata6/stabi_1/stabi.data1 BR419I Files will be restored from backup: bdjwhckx.ffd 2003-01-29 17.30.51 BR416I 2 files found to restore, total size 12.016 MB BR424I Files will not be decompressed BR421I Restore device type: disk BR420I Files will be restored from directory: /sapmnt/uw1030/b/backup/bdjwhckx BR134I Unattended mode with 'force' active - no operator confirmation allowed BR351I Restoring /oracle/GC2/sapdata5/stabd_1/stabd.data1 BR355I from /sapmnt/uw1030/b/backup/bdjwhckx/stabd.data1 ... #FILE..... /oracle/GC2/sapdata5/stabd_1/stabd.data1 #RESTORED. /sapmnt/uw1030/b/backup/bdjwhckx/stabd.data1 BR280I Time stamp 2003-01-29 19.12.46 BR418I 1 of 2 files restored - 8.008 MB of 12.016 MB done BR204I Percentage done: 66.64%, estimated end time: 19:12 BR001I *********************************_________________ BR351I Restoring /oracle/GC2/sapdata6/stabi_1/stabi.data1 #2/5

334

April 2004

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

BR355I from /sapmnt/uw1030/b/backup/bdjwhckx/stabi.data1 ... #FILE..... /oracle/GC2/sapdata6/stabi_1/stabi.data1 #RESTORED. /sapmnt/uw1030/b/backup/bdjwhckx/stabi.data1 BR280I Time stamp 2003-01-29 19.12.46 BR418I 2 of 2 files restored - 12.016 MB of 12.016 MB done BR204I Percentage done: 100.00%, estimated end time: 19:12 BR001I ************************************************** BR406I End of file restore: rdjwhlma.rsb 2003-01-29 19.12.46 BR280I Time stamp 2003-01-29 19.12.46 BR402I BRRESTORE terminated successfully ================================================================== BR292I Execution of BRRESTORE terminated with return code 0 #2/11

Restoring and Applying an Incremental Backup
Use
You use this procedure when using BRRECOVER to perform:

• • • • •

Complete database recovery [Page 296] Database point-in-time (PIT) recovery [Page 297] Tablespace point-in-time (PIT) recovery [Page 299] Whole database reset [Page 300] Restore of Individual Backup Files with BR*Tools [Page 301]

This procedure calls BRRESTORE to restore and apply incremental backups only if you specified this when you selected a database backup [Page 321].

Prerequisites
• •
BRRECOVER lets you repeat this phase if there is an error. BRRECOVER checks whether there are any data files not online. If so, it recommends to set them online.

Procedure
...

1. Set the required options:
Menu Entry Equivalent BRRESTORE Command Option

BRRESTORE profile (profile) BRBACKUP run (backup) Restore device type (device) BACKINT/Mount profile (parfile) Database user/password (user) Files for restore (mode)

-p|-profile [Page 404] -b|-backup|b1|backup1 [Page 400] -d|-device [Page 400] -r|-parfile [Page 405] -u|-user [Page 405] -m|-mode incr [Page 402]

April 2004

335

4 BR*Tools for Oracle DBA 4.2 BR*Tools in Action

Confirmation mode (confirm) Query mode (query) Compression mode (compress) Additional output (output) Message language (language) BRRESTORE command line (command)

-c|-confirm [Page 400] -q|-query [Page 404] -k|-compress [Page 402] -o|-output [Page 404] -l|-language [Page 402] This shows you the BRRESTORE command [Page 397] that is to be executed using the current settings.

Restore device type (device) is taken from the device type used for the selected backup. 2. To start the apply and restore with the selected options, choose Continue.
3. Check the results in the BRRESTORE logs [Page 406]: The summary log [Page 407] rest<DBSID>.log displays the return code. The detail log [Page 406] r<encoded timestamp>.<ext> displays the progress. For more information on how to view the logs, see Showing Logs with BR*Tools [Page 353].

Restoring and Applying Offline Redo Log Files
Use
You use this procedure when using BRRECOVER to perform:

• • • •

Complete database recovery [Page 296] Database point-in-time (PIT) recovery [Page 297] Tablespace point-in-time (PIT) recovery [Page 299] Whole database reset [Page 300] – if you selected an online backup [Page 321]

This procedure uses BRRESTORE to restore and SQLPLUS to apply offline redo log files, that is, archivelog files.

Prerequisites

BRRESTORE restores the offline redo log files in ascending order of application. This means that the first logs to be restored are those that are needed to start the apply phase. This procedure restores and applies offline redo log files as follows: Up to 100 files are processed as a single group. All the files in a group must be from the same source. For example, files originally backed up with util cannot be restored and applied in the same group as files backed up with rman. If there are two or more groups of files, they are processed in parallel with two concurrent processing threads.

336

April 2004

V$RECOVER_FILE. if available. BRRECOVER normally uses the most accessible version of the file. you can use the second copy.4 BR*Tools for Oracle DBA 4. only the offline redo log files required to reach the specified point are applied. all offline redo log files that were restored in Restoring Control Files [Page 330]are applied in one group. Procedure . If required.12 3 . unless you specify otherwise. 1. In this example. it recommends to set them online. • See “Example” below for the contents of the log file. change the default options for the sources that BRRECOVER uses when it restores or applies the offline redo log files: Menu Entry Details of the Offline Redo Log File Group to be Changed April 2004 337 . If so. BRRECOVER checks whether there are any data files not online.16 7 . as in the following example: • • • Archivelog Pos. the tablespaces not involved in the recovery. which is generally small. a file might be present on disk and on tape. BRRECOVER first remounts – that is. closes and again mounts – the database to refresh the views V$DATAFILE. Seq. • If you perform this procedure as part of a PIT recovery. To do this. Stage 1 ..17 files to apply for complete recovery Status Apply From Disk Tape Util Rman in_arch in_arch in_arch in_arch redo_arch redo_arch in_redo yes yes yes yes yes yes yes arch arch arch arch redo redo redo Some files might be present on multiple media sources. BRRECOVER sets OFFLINE the data files of the exported tablespaces [Page 327] – that is.. and V$RECOVERY_STATUS. It identified these during the procedure Selecting a Database Backup [Page 321].2 BR*Tools in Action For whole database reset. • If the first copy of the redo log files is missing. it would use the disk version of the file. If you have entered a point in time (PIT) or an Oracle system change number (SCN) to specify the end point of the recovery. For example.15 6 . • BRRECOVER recreates files that were added to the database during or (only for PIT) after the selected backup. For a tablespace PIT recovery.13 4 . BRRECOVER translates this to the equivalent log sequence number (SEQ).14 5 .Expert Mode [Page 307] instead of this procedure.11 2 . BRRECOVER first displays a list of the redo log files to apply. choose one of the following: Change the command line for restore near the end of this procedure Perform Restoring and Applying Offline Redo Log Files .

change the default options for applying offline redo log files: Menu Entry Equivalent BRRECOVER Command Options First sequence number (first_seq) Last sequence number (last_seq) Use backup control file (back_ctl) Parallel recovery (degree) First offline redo log to apply Last offline redo log to apply Yes or no -e|-degree [Page 411] 338 April 2004 . set the required options: Menu Entry Equivalent BRRESTORE Command Options 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) BACKINT/Mount profile (parfile) Database user/password (user) Destination directory (dest_dir) Confirmation mode (confirm) Additional output (output) Message language (language) -p|-profile [Page 404] -p|-profile [Page 404] -p|-profile [Page 404] -p|-profile [Page 404] -p|-profile [Page 404] -r|-parfile [Page 405] -u|-user [Page 405] -a|-archive = <rest_dir> [Page 399] -c|-confirm [Page 400] -o|-output [Page 404] -l|-language [Page 402] 4. 5.4 BR*Tools for Oracle DBA 4. If the restore menu is displayed. Choose Continue. 2. You can also change the source for sequences of offline redo log files. If a restore is necessary. if not all required offline redo log files are on disk – BRRECOVER displays the restore menu. you can specify a different source for each missing offline redo log file that is listed with multiple sources. choose Continue. BRRECOVER displays the menu for applying offline redo log files to the database instance. If required. 3.2 BR*Tools in Action First sequence number (first_seq) The sequence number of the first offline redo log file for which you want to change the source The sequence number of the last offline redo log file for which you want to change the source The new source of the offline redo log files Last sequence number (last_seq) New source for applying (source) If required. If a restore is necessary – that is.

Otherwise. you can choose unattended mode. we recommend that you only change the last entry. set the required options for restoring an offline redo log group: Menu Entry Equivalent BRRESTORE Command Options for Restore of an Offline Redo Log Group Restore unattended (unattend) BRRESTORE command line (command) -c|-confirm [Page 400] This shows you the BRRESTORE command [Page 397] that is to be executed using the current settings. you can choose unattended mode. 7. we recommend that you only change the first entry. If you are applying large numbers of offline redo log files. If the above restore menu is displayed. Otherwise.2 BR*Tools in Action Unless you are an expert. 6. • • We recommend that only experts change the BRRESTORE command line. • • Unless you are an expert. 8. BRRESTORE restores the offline redo log files. If there are two or more groups of offline redo log files to process. BRRECOVER prompts you again for each group. If a restore is necessary. April 2004 339 . Set the required options to apply a group of offline redo log files: Menu Entry Details of the Offline Redo Log File Group to be Applied Apply unattended (unattend) First sequence number (first_seq) Last sequence number (last_seq) SQLPLUS command (command) Log group applied in attended or unattended mode First offline redo log to apply Last offline redo log to apply This shows you the SQLPLUS command that is to be executed using the current settings. If you are restoring large numbers of offline redo log files. Apply unattended (unattend). BRRESTORE and BRRECOVER work in parallel to restore and apply the files. If necessary. if required. choose Continue to start the restore. 9. Parallel recovery (degree). BRRECOVER prompts you again for each group.4 BR*Tools for Oracle DBA 4. if required. BRRECOVER applies the offline redo log files. Choose Continue.

. Check the results in the BRRESTORE [Page 406] and BRRECOVER [Page 414] logs. s ... BR336I Applying offline redo log file /oracle/GC2/saparch/1_13.2 BR*Tools in Action If you process in attended mode..<ext> displays the progress for applying the offline redo log files. Therefore.4 BR*Tools for Oracle DBA 4. [] Standard keys: c . we recommend that you process the first few groups in attended mode to check that processing is correct.39 BR336I Applying offline redo log file /oracle/GC2/saparch/1_11.. The detail log [Page 414] v<encoded timestamp>. The detail log [Page 406] r<encoded timestamp>. BR336I Applying offline redo log file /oracle/GC2/saparch/1_12.39 BR134I Unattended mode with 'force' active .. For more information on how to view the logs.dbf . if you are processing many groups of offline redo log files.help ------------------------------------------------------------------BR280I Time stamp 2003-01-29 19.13.. [no] 4 ~ Parallel recovery (degree) ..stop. BRRECOVER displays the message Media recovery completed.39 BR657I Input menu 117 # please check/enter input values ------------------------------------------------------------------Apply archivelog files to database instance GC2 1 ..back..Last sequence number (last_seq) .continuing processing with default reply 'cont' BR781I All archivelog files to be applied are on disk .no restore required BR783I Archivelog files with sequence number 11-14 will be applied to database GC2 BR280I Time stamp 2003-01-29 19. BR280I Time stamp 2003-01-29 19. Example This example shows the contents of the BRRECOVER detail log file for this procedure. you see the above menus with the BRRESTORE or BRRECOVER command line before each group of offline redo log files is processed. 10..dbf . [17] 3 # Use backup control file (back_ctl) .13.<ext> displays the progress for restoring the offline redo log files.. 340 April 2004 . [11] 2 ... r .refr.First sequence number (first_seq) .13. No restore is required in this example because all the offline redo log files are on disk.. b . If successful.. see Showing Logs with BR*Tools [Page 353]...dbf . h .cont. Then you can switch to unattended mode to finish processing automatically.

. For tablespace PIT recovery. This does not apply to complete database recovery.dbf applied successfully BR280I Time stamp 2003-01-29 19. if offline.40 BR337I Offline redo log file /oracle/GC2/saparch/1_13.dbf applied successfully BR280I Time stamp 2003-01-29 19. The resetlogs parameter to open the database is relevant for the following types of recovery: Database PIT Tablespace PIT Whole database reset if the selected backup was online • April 2004 341 .40 BR784I Media recovery completed Opening the Database Use You use this procedure when using BRRECOVER to perform: • • • • • Complete database recovery [Page 296] Database point-in-time (PIT) recovery [Page 297] Tablespace point-in-time (PIT) recovery [Page 299] Whole database reset [Page 300] Restore and application of offline redo log files [Page 307] This procedure opens the database.2 BR*Tools in Action BR336I Applying offline redo log file /oracle/GC2/saparch/1_14. It identified these during the database status check [Page 322] or selection of database backups [Page 321].40 BR337I Offline redo log file /oracle/GC2/saparch/1_11.13.dbf applied successfully BR280I Time stamp 2003-01-29 19.13. BR280I Time stamp 2003-01-29 19.40 BR337I Offline redo log file /oracle/GC2/saparch/1_14.4 BR*Tools for Oracle DBA 4. Prerequisites • BRRECOVER: Checks tablespaces and. recommends you to switch them online Checks data files and warns you if they are not online • BRRECOVER deletes files that were added after the selected backup (for whole database reset) or the PIT (for database or tablespace PIT).dbf ..dbf applied successfully BR280I Time stamp 2003-01-29 19.13. it also plugs in the exported tablespaces [Page 327].13.13.40 BR337I Offline redo log file /oracle/GC2/saparch/1_12.

BRRECOVER warns you that no more logs can be applied after the database has been opened. It calls the Oracle IMP tool to import the affected tablespaces (to be precise. BRRECOVER then checks the tablespaces and data files. For a PIT recovery or a whole database reset from an online consistent backup. the redo log files. For a tablespace PIT recovery. and the control files.4 BR*Tools for Oracle DBA 4. Procedure . BRRECOVER displays a message like the following. it imports the metadata of these tablespaces). v<encoded timestamp>. 2. If successful. Choose Yes to continue opening the database. For more information on how to view the logs.2 BR*Tools in Action Restore and application of offline redo log files Resetlogs reformats the online redo log files and resets their sequence number to 1. BRRECOVER reinstates the tablespaces that were exported because they were not required for the recovery. For a PIT recovery and whole database reset. see Showing Logs with BR*Tools [Page 353]. BRRECOVER reinstates the tables that were exported as described at the end of “Prerequisites” above. BR614I Database instance GC2 is mounted BR064I Database instance GC2 will be shut down now BR280I Time stamp 2003-01-29 19. BRRECOVER recreates the missing temporary database files. BRRECOVER deletes files that are no longer used by the database. we recommend you to accept the setting that BRRECOVER proposes. Select the required option for Reset logs option (reset_logs). 3.<ext>. BRRECOVER opens the database. If the resetlogs option is set. • For tablespace PIT recovery. depending on the type of recovery: Database point-in-time recovery completed. 1.44. It sets the affected tablespaces to READ-WRITE status. Check the results in the BRRECOVER detail log [Page 414]. Unless you are an expert. To do this. it updates the control files to reflect a new incarnation of the database. Example This example shows the contents of the BRRECOVER detail log file for this procedure.. using a database PIT recovery. BRRECOVER does the following after it has reopened the database: It temporarily drops the affected tablespaces.28 342 April 2004 . In addition..

57 5973 NOLINK .stop.continuing processing with default reply 'cont' BR786I Database instance GC2 will be opened now with option 'resetlogs' BR787I No more archivelog files can be applied after database has been opened BR675I Do you want to perform this action? BR126I Unattended mode active .continuing processing with default reply 'yes' BR280I Time stamp 2003-01-29 19.data1 was recreated BR118I Tablespaces and data files Tablespace Status File Status Id.35 BR304I Starting and opening database instance GC2 ...44.data1 10493952 2002-07-31 16.44. s . BR119I Redo log files File Size First time First scn Status Group Device Type Link April 2004 343 . h .44.. Size Device Type Link DRSYS ONLINE 35651591 3 FILE Creation time Creation scn ONLINE /oracle/GC2/sapdata1/drsys_1/drsys. BR280I Time stamp 2003-01-29 19...57 BR789I Temporary database file /oracle/GC2/sapdata3/temp_1/temp.55 5954 NOLINK ONLINE 35651591 4 FILE EXAMPLE ONLINE /oracle/GC2/sapdata2/example_1/example.help ------------------------------------------------------------------BR280I Time stamp 2003-01-29 19.35 BR657I Input menu 135 # please check/enter input values ------------------------------------------------------------------Options for opening database instance GC2 1 ~ Reset logs option (reset_logs) . [resetlogs] Standard keys: c .55..44.data1 126492672 2002-07-31 16.back.refr.cont..44.4 BR*Tools for Oracle DBA 4..55. BR280I Time stamp 2003-01-29 19.2 BR*Tools in Action BR307I Shutting down database instance GC2 .55 BR305I Start and open of database instance GC2 successful BR280I Time stamp 2003-01-29 19. r .35 BR308I Shutdown of database instance GC2 successful BR280I Time stamp 2003-01-29 19. b .44.35 BR134I Unattended mode with 'force' active .

Features You can perform the following check and verification functions with BR*Tools: 344 April 2004 . • Make sure that you have set the necessary parameters for BRCONNECT and BRBACKUP in the Initialization Profile init<DBSID>.ctl 19. For more information.00. The aim of regular checks and verification is to detect and correct potentially critical problems before these lead to downtime of the production database.6 Use Check and Verification with BR*Tools You can check and verify your Oracle database with BR*Tools [Page 181]. This is because the BRTOOLS menus simplify entry of the correct parameters.44.2 BR*Tools in Action /oracle/GC2/origlog/redo01m1..45 5101776 35651591 FILE 4579328 NOLINK 4579328 NOLINK 4579328 NOLINK BR716I Database point-in-time recovery completed 4.44.45 5101776 35651591 FILE /oracle/GC2/sapdata2/cntrl/control02. BR120I Control files File Reset time Reset scn Device 0 INUSE 1 35651591 INUSE 1 35651591 FILE 0 FILE Type Size Link 2003-01-29 2003-01-29 2003-01-29 /oracle/GC2/sapdata1/cntrl/control01.00 NOLINK . we recommend one of the following: • • DBA Planning Calendar to schedule a check or verification and then view its log The scheduler cron for UNIX or at for Windows Integration • BRTOOLS normally calls the SAP tool BRCONNECT or BRBACKUP.00.4 BR*Tools for Oracle DBA 4. You can also perform a check or verification directly by calling BRCONNECT or BRBACKUP from the command line. We recommend you to normally use BRTOOLS rather than BRCONNECT or BRBACKUP..dbf 2097664 0000-00-00 00. For routine check and verification.dbf 2097664 0000-00-00 00.2... see Database System Check [Page 178].00 NOLINK /oracle/GC2/mirrlog/redo01m2.45 5101776 35651591 FILE /oracle/GC2/sapdata3/cntrl/control03.44.ctl 19.ctl 19.sap [Page 488]. You typically use BR*Tools for a one-off check and verification.

4. You check the results of the check or verification in the BRCONNECT logs [Page 484] or the BRBACKUP logs [Page 375]. For certain input values. in which case the default value from the BRTOOLS program is used. 3. If required.6. there is no corresponding parameter in the initialization profile.. You start the check or verification. • Procedure .sap [Page 488]. 4. 1. 2. You call the required function in BRTOOLS and check the displayed parameters. 5..sap [Page 488].1 Use Checking the Database System with BR*Tools You can use BR*Tools [Page 181] for Oracle to check the database system. Choose Database check and verification → Database system check. Start BRGUI or BRTOOLS. you choose Check and verification → Reset input values to set the defaults used to the values in the initialization profile init<DBSID>. The default. Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) Database user/password (user) Use default check settings (default) SAP owner for check (owner) Exclude from check (exclude) Confirmation mode (confirm) -p|-profile [Page 482] -u|-user [Page 483] -f check -d|-default [Page 472] -f check -o|-output [Page 472] -f check -e|-exclude [Page 472] -c|-confirm [Page 471] April 2004 345 .2.sap and restart BRTOOLS.2 BR*Tools in Action • • • Database system check Validation of database structure Verification of database blocks Activities . The database must be open.. which is set in the initialization profile init<DBSID>. 2..sap.because BRTOOLS uses these when it calls BRCONNECT. is to check or verify the entire database. Prerequisites • Make sure you have set the necessary BRCONNECT parameters in the initialization profile init<DBSID>. you change the default values for the check or verification parameters in the initialization profile init<DBSID>. 3. changing them as required. 1. If required.4 BR*Tools for Oracle DBA 4.

For more information on how to view the logs with BR*Tools. 1.2.<ext> displays the progress. 5. The database must be open. 2. The detail log [Page 484] c<encoded timestamp>. The summary log [Page 485] conn<DBSID>.sap [Page 488].6.2 Use Validating the Database Structure with BR*Tools You can use BR*Tools [Page 181] for Oracle to validate the database structure with BR*Tools. Check the results in the BRCONNECT logs [Page 484]. Choose Database check and verification → Database structure validation.log displays the return code. Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) Database user/password (user) Validate mode (validate) SAP owner for validate (owner) Exclude from validate (exclude) Tables for validate (table) Confirmation mode (confirm) Query mode (query) Parallel degree (parallel) -p|-profile [Page 482] -u|-user [Page 483] -f stats -v|-validate [Page 477] -f stats -o|-owner [Page 477] -f stats -e|-exclude [Page 477] -f stats -t|-table [Page 477] -c|-confirm [Page 471] -q|-query [Page 483] -f stats -p|-parallel [Page 477] 346 April 2004 . see Showing Logs with BR*Tools [Page 353].2 BR*Tools in Action Query mode (query) Additional output (output) Message language (language) BRCONNECT command line (command) -q|-query [Page 483] -o|-output [Page 482] -l|-language [Page 482] This shows you the BRCONNECT -f check [Page 472] that is to be executed using the current settings.. Prerequisites • Make sure you have set the necessary BRCONNECT parameters in the initialization profile init<DBSID>.. 4. choose Continue. To start processing with the selected options.because BRTOOLS uses these when it calls BRCONNECT. • Procedure . 4. Start BRGUI or BRTOOLS.4 BR*Tools for Oracle DBA 4. 3.

<ext> displays the progress.2. Prerequisites • Make sure you have set the necessary BRBACKUP parameters in the initialization profile init<DBSID>. see Showing Logs with BR*Tools [Page 353]. 1. To start processing with the selected options.6.2 BR*Tools in Action Time limit (limit) Force time limit (force) Additional output (output) Message language (language) BRCONNECT command line (command) -f stats -l|-limit [Page 477] -f stats -f|-force limit [Page 477] -o|-output [Page 482] -l|-language [Page 482] This shows you the BRCONNECT -f stats -v|-validate [Page 477] command that is to be executed using the current settings.log displays the return code. 4. The detail log [Page 484] c<encoded timestamp>. 3. Start BRGUI or BRTOOLS..4 BR*Tools for Oracle DBA 4. because BRTOOLS uses these when it calls BRBACKUP. choose Continue. Procedure . 5. 2. 4.sap [Page 488].. The summary log [Page 485] conn<DBSID>. Choose Database check and verification → Verification of database blocks. Set the required options: Menu Entry Equivalent BRBACKUP Command Option BRBACKUP profile (profile) Database user/password (user) Backup type (type) Files for verification (mode) Confirmation mode (confirm) Query mode (query) Parallel execution (execute) Additional output (output) Message language (language) -p|-profile [Page 371] -u|-user [Page 374] -t|-type [Page 373] -m|-mode [Page 369] -c|-confirm [Page 364] -q|-query [Page 371] -e|-execute [Page 367] -o|-output [Page 371] -l|-language [Page 369] April 2004 347 . For more information on how to view the logs with BR*Tools. Check the results in the BRCONNECT logs [Page 484].3 Use Verifying Database Blocks with BR*Tools You can use BR*Tools [Page 181] for Oracle to perform a database block verification.

• Make sure that you have set the necessary parameters for BRCONNECT in the Initialization Profile init<DBSID>. The detail log [Page 377] b<encoded timestamp>.4 BR*Tools for Oracle DBA 4..log displays the return code. For more information. For routine update statistics.7 Use Database Statistics with BR*Tools You can maintain the statistics of your Oracle database with BR*Tools [Page 181].2 BR*Tools in Action BRBACKUP command line (command) This shows you the BRBACKUP -w only_dbv [Page 375] command that is to be executed using the current settings. For more information on how to view the logs with BR*Tools.2. The aim of regular update statistics is to maintain optimal database performance. 4. we recommend one of the following: • • DBA Planning Calendar to schedule a check or verification and then view its log The scheduler cron for UNIX or at for Windows Integration • BRTOOLS normally calls the SAP tool BRCONNECT to update statistics.<ext> displays the progress. This is because the BRTOOLS menus simplify entry of the correct parameters. To start processing with the selected options. The summary log [Page 378] backup<DBSID>. Features You can perform the following backup functions with BR*Tools: • • • Update database statistics Collect missing statistics Delete harmful statistics Activities . 348 April 2004 . 4. 5. see Showing Logs with BR*Tools [Page 353]. You can also update statistics directly by calling BRCONNECT from the command line. You typically use BR*Tools for a one-off update statistics. We recommend you to normally use BRTOOLS rather than BRCONNECT. Out-of-date statistics reduce performance due to inappropriate access paths for database queries.sap [Page 488]. see Update Statistics [Page 179]. choose Continue. Check the results in the BRBACKUP logs [Page 375]..

you change the default values for the update statistics parameters in the initialization profile init<DBSID>. 1. If you have to make other changes. Start BRGUI or BRTOOLS. The default parameter.because BRTOOLS uses these when it calls BRCONNECT. You start update statistics. which is set in the initialization profile init<DBSID>.sap profile manually and then restart BRTOOLS. BRTOOLS only lets you change certain parameters for update statistics. changing them as required. 5.sap [Page 488].2. there is no corresponding parameter in the initialization profile. 3. Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) Database user/password (user) Collection method (method) Sample size (sample) Bucket count (bucket) Change threshold (change) SAP owner for update (owner) -p|-profile [Page 482] -u|-user [Page 483] -f stats -m|-method [Page 477] -f stats -s|-sample [Page 477] -f stats -b|-bucket [Page 477] -f stats -c|-change [Page 477] -f stats -o|-owner [Page 477] April 2004 349 . If required. 4.sap [Page 488]. If required. Prerequisites • Make sure you have set the necessary BRCONNECT parameters in the initialization profile init<DBSID>. you must change the init<DBSID>. 2. You call the required function in BRTOOLS and check the displayed parameters. is to use the ANALYZE command to sequentially update statistics for all database tables...4 BR*Tools for Oracle DBA 4.1 Use Updating Database Statistics with BR*Tools You can use BR*Tools [Page 181] for Oracle to update database statistics. For certain input values. • Procedure . you choose Database Statistics → Reset input values to set the defaults used to the values in the initialization profile init<DBSID>. 2.sap. Choose Database statistics → Update database statistics.sap and restart BRTOOLS. The database must be open. You check the results in the BRCONNECT Logs [Page 484].2 BR*Tools in Action 1. in which case the default value from the BRTOOLS program is used.7. 4. 3.

<ext> displays the progress. For more information on how to view the logs with BR*Tools.4 BR*Tools for Oracle DBA 4. To start processing with the selected options. 3. see Showing Logs with BR*Tools [Page 353]. Prerequisites • Make sure you have set the necessary BRCONNECT parameters in the initialization profile init<DBSID>. Check the results in the BRCONNECT logs [Page 484]. 4. choose Continue.2. 4. The detail log [Page 484] c<encoded timestamp>. Start BRGUI or BRTOOLS.because BRTOOLS uses these when it calls BRCONNECT.2 Use Collecting Missing Statistics with BR*Tools You can use BR*Tools [Page 181] for Oracle to collect missing database statistics. The summary log [Page 485] conn<DBSID>.7. 2.. Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) -p|-profile [Page 482] 350 April 2004 . The database must be open.sap [Page 488]..log displays the return code.2 BR*Tools in Action Exclude from update (exclude) Tables for update (table) Confirmation mode (confirm) Query mode (query) Parallel degree (parallel) Update history tables (history) Retain old statistics (retain) Time limit (limit) Force options (force) Additional output (output) Message language (language) BRCONNECT command line (command) -f stats -e|-exclude [Page 477] -f stats -t|-table [Page 477] -c|-confirm [Page 471] -q|-query [Page 483] -f stats -p|-parallel [Page 477] -f stats -h|-history [Page 477] -f stats -r|-retain [Page 477] -f stats -l|-limit [Page 477] -f stats –f|-force [Page 477] -o|-output [Page 482] -l|-language [Page 482] This shows you the BRCONNECT -f stats [Page 477] command that is to be executed using the current settings. 5. • Procedure . 1. Choose Database statistics → Collect missing statistics.

log displays the return code. The detail log [Page 484] c<encoded timestamp>.2. Prerequisites • Make sure you have set the necessary BRCONNECT parameters in the initialization profile init<DBSID>. April 2004 351 . choose Continue.7. The summary log [Page 485] conn<DBSID>.sap [Page 488].2 BR*Tools in Action Database user/password (user) Collection method (method) Sample size (sample) Bucket count (bucket) Change threshold (change) SAP owner for update (owner) Exclude from update (exclude) Tables for collect (table) Confirmation mode (confirm) Query mode (query) Parallel degree (parallel) Update history tables (history) Retain old statistics (retain) Time limit (limit) Force options (force) Additional output (output) Message language (language) BRCONNECT command line (command) -u|-user [Page 483] -f stats -m|-method [Page 477] -f stats -s|-sample [Page 477] -f stats –b|-bucket [Page 477] -f stats -c|change [Page 477] -f stats -o|-owner [Page 477] -f stats -e|-exclude [Page 477] -f stats -t|-table [Page 477] -c|-confirm [Page 471] -q|-query [Page 483] -f stats -p|-parallel [Page 477] -f stats -h|-history [Page 477] -f stats -r|-retain [Page 477] -f stats -l|-limit [Page 477] -f stats -f|-force [Page 477] -o|-output [Page 482] -l|-language [Page 482] This shows you the BRCONNECT -f stats -t missing [Page 477] command that is to be executed using the current settings.4 BR*Tools for Oracle DBA 4.3 Use Deleting Harmful Statistics with BR*Tools You can use BR*Tools [Page 181] for Oracle to delete harmful database statistics.<ext> displays the progress.. For more information on how to view the logs with BR*Tools. • Procedure . To start processing with the selected options.because BRTOOLS uses these when it calls BRCONNECT. The database must be open. 4. 4. 5. Check the results in the BRCONNECT logs [Page 484].. see Showing Logs with BR*Tools [Page 353].

For more information on how to view the logs with BR*Tools. The summary log [Page 485] conn<DBSID>.log displays the return code.2 BR*Tools in Action 1.4 BR*Tools for Oracle DBA 4. This is because the BRTOOLS menus simplify entry of the correct parameters. 3. 2. • Make sure that you have set the necessary parameters for BRCONNECT in the Initialization Profile init<DBSID>. We recommend you to normally use BRTOOLS rather than BRCONNECT. Start BRGUI or BRTOOLS.<ext> displays the progress. 4. You can also perform these functions directly by calling BRCONNECT from the command line. To start processing with the selected options.sap [Page 488]. 5. 4.8 Use Additional Functions with BR*Tools You can perform additional functions for your Oracle database with BR*Tools [Page 181]. Choose Database statistics → Delete harmful statistics. Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) Database user/password (user) SAP owner for delete (owner) Exclude from delete (exclude) Tables for delete (table) Confirmation mode (confirm) Query mode (query) Force options (force) Additional output (output) Message language (language) BRCONNECT command line (command) -p|-profile [Page 482] -u|-user [Page 483] -f stats -o|-owner [Page 477] -f stats –e|-exclude [Page 477] -f stats –t|-table [Page 477] -c|-confirm [Page 471] -q|-query [Page 483] -f stats -f|-force [Page 477] -o|-output [Page 482] -l|-language [Page 482] This shows you the BRCONNECT -f stats –t harmful -d [Page 477] command that is to be executed using the current settings. Integration • BRTOOLS normally calls the SAP tool BRCONNECT. choose Continue. Check the results in the BRCONNECT logs [Page 484]. The detail log [Page 484] c<encoded timestamp>. see Showing Logs with BR*Tools [Page 353]. 352 April 2004 .2.

For certain input values. in which case the default value from the BRTOOLS program is used. Logs.. 5. 1. Messages. You start processing. you choose Additional functions → Reset input values to set the defaults used to the values in the initialization profile init<DBSID>.1 Use Showing Logs and Profiles with BR*Tools You can use BR*Tools [Page 181] for Oracle to show the following logs and profiles generated by BR*Tools: • • • • • • • • Oracle profile – see Oracle documentation BR*Tools profile. If required. which are set in the initialization profile init<DBSID>. You choose the required function in BRTOOLS and check the displayed parameters. 4..sap [Page 488] BRBACKUP logs [Page 375] BRARCHIVE logs [Page 391] BRRESTORE logs [Page 406] BRRECOVER logs [Page 414] BRCONNECT logs [Page 484] BRSPACE logs [Page 440] For more information. there is no corresponding parameter in the initialization profile.sap and restart BRTOOLS. that is. and Return Codes for BR*Tools [Page 488]. see Profiles. Procedure April 2004 353 . you change the default values for the function parameters in the initialization profile init<DBSID>. 3. changing them as required. The default parameter values. If required.sap [Page 488].8.2. initialization Profile init<DBSID>. are as follows: Clean up DBA logs that are older than 30 days Clean up records in DBA tables that are older than 100 days Adapt NEXT extents for all tables and indexes 2.2 BR*Tools in Action Features You can perform the following additional functions with BR*Tools: • • • • • Show profiles and logs Clean up DBA logs and tables Adapt NEXT extents Change password of SAP user Create or change synonyms for DBA tables Activities . You check the results in the BRCONNECT logs [Page 484]. 4.4 BR*Tools for Oracle DBA 4.sap.

2 Use Cleaning Up DBA Logs and Tables with BR*Tools You can clean up the DBA logs and tables for your Oracle database with BR*Tools [Page 181]. see Clean Up Old Logs and Trace Files with BRCONNECT [Page 469]. Choose one of the following: Additional Functions → Profiles and Logs → Oracle profile Additional Functions → Profiles and Logs → BR*Tools profile Additional Functions → Profiles and Logs → BRBACKUP logs Additional Functions → Profiles and Logs → BRARCHIVE logs Additional Functions → Profiles and Logs → BRRESTORE logs Additional Functions → Profiles and Logs → BRRECOVER logs Additional Functions → Profiles and Logs → BRCONNECT logs Additional Functions → Profiles and Logs → BRSPACE logs BRTOOLS displays a list of available logs or profiles. • Procedure . The database must be open. Select the log or profile that you want to show. Choose Additional functions → Clean up DBA logs and tables. 3. Choose Continue to show the log or profile. 2.4 BR*Tools for Oracle DBA 4.8. Start BRGUI or BRTOOLS.. This function helps you to free disk space used by old DBA logs and protects your database against unnecessary growth of the DBA tables. Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) -p|-profile [Page 482] 354 April 2004 . as in the following example: Following file will be displayed: /oracle/GC2/sapbackup/rdjxfcel. For more information. 4.because BRTOOLS uses these when it calls BRCONNECT. BRTOOLS indicates which file is to be shown.rsb 4.. 3.2 BR*Tools in Action . 1..2.sap [Page 488]. 2. Start BRGUI or BRTOOLS. Prerequisites • Make sure you have set the necessary BRCONNECT parameters in the initialization profile init<DBSID>. 1..

which causes transactions to abort. 4. For more information on how to view the logs with BR*Tools.cln displays the progress.2. The summary log [Page 485] conn<DBSID>.3 Use Adapting Next Extents with BR*Tools You can adapt the next extents for tables in your Oracle database with BR*Tools [Page 181]. The aim is to avoid extent overflow.8.2 BR*Tools in Action Database user/password (user) SAP owner for cleanup (owner) BRBACKUP logs (backup) BRARCHIVE logs (archive) BRRESTORE logs (restore) BRRECOVER logs (recover) BRCONNECT logs (connect) BRSPACE log (space) BRBACKUP disk backups (diskback) BRARCHIVE disk backups (diskarch) BRSPACE export dumps (expdump) Oracle trace files (trace) Database logs in SDBAH and SDBAD (dblog) XDB logs in DBA tables (xdblog) Check messages in DBCHECKORA (checkmsg) Confirmation mode (confirm) Query mode (query) Clean up selected logs only (limit) Additional output (output) Message language (language) BRCONNECT command line (command) -u|-user [Page 483] -f cleanup -o|-owner [Page 473] -f cleanup -b|-backup [Page 473] -f cleanup -a|archive [Page 473] -f cleanup -r|-restore [Page 473] -f cleanup -v|-recover [Page 473] -f cleanup -c|-connect [Page 473] -f cleanup -s|-space [Page 473] -f cleanup -k|-diskback [Page 473] -f cleanup -i|-diskarch [Page 473] -f cleanup -e|-expdump [Page 473] -f-function cleanup -t|-trace [Page 473] -f-function cleanup -d|-dblog [Page 473] -f-function cleanup -x|-xdblog [Page 473] -f-function cleanup -m|-checkmsg [Page 473] -c|-confirm [Page 471] -q|-query [Page 483] -f-function cleanup -l|-limit [Page 473] -o|-output [Page 482] -l|-language [Page 482] This shows you the BRCONNECT -f cleanup [Page 473] command that is to be executed using the current settings. 5. Check the results in the BRCONNECT logs [Page 484]. choose Continue. To start processing with the selected options.log displays the return code.4 BR*Tools for Oracle DBA 4. see Showing Logs with BR*Tools [Page 353]. April 2004 355 . 4. The detail log [Page 484] c<encoded timestamp>.

3.2.4 Changing the Password of the SAP User with BR*Tools 356 April 2004 .8. Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) Database user/password (user) SAP owner for adapt (owner) Maximal extent size in KB (max) Maximal extent count (limit) Special NEXT extents (special) Exclude from adapt (exclude) Tables for adapt (table) Confirmation mode (confirm) Query mode (query) Force options (force) Additional output (output) Message language (language) BRCONNECT command line (command) -p|-profile [Page 482] -u|-user [Page 483] -f next -o|-owner [Page 475] -f next -m|-max [Page 475] -f next -l|-limit [Page 475] -f next -s|-special [Page 475] -f next -e|-exclude [Page 475] -f next -t|-table [Page 475] -c|-confirm [Page 471] -q|-query [Page 483] -f next -f|-force [Page 475] -o|-output [Page 482] -l|-language [Page 482] This shows you the BRCONNECT -f next [Page 475] command that is to be executed using the current settings. 4. Prerequisites • Make sure you have set the necessary BRCONNECT parameters in the initialization profile init<DBSID>. see Showing Logs with BR*Tools [Page 353].because BRTOOLS uses these when it calls BRCONNECT. Start BRGUI or BRTOOLS. 1. 4.. • Procedure . see Adapt Next Extents with BRCONNECT [Page 460]. Choose Additional functions → Adapt next extents. Check the results in the BRCONNECT logs [Page 484].sap [Page 488].log displays the return code. choose Continue.2 BR*Tools in Action For more information. For more information on how to view the logs with BR*Tools.4 BR*Tools for Oracle DBA 4. 2.. To start processing with the selected options. The detail log [Page 484] c<encoded timestamp>. The summary log [Page 485] conn<DBSID>.<ext> displays the progress. 5. The database must be open.

see Additional BRCONNECT Functions [Page 469].8. 5. 4. Prerequisites The database must be open.. we strongly recommend that you do not use the standard password of the SAP user in a production system. Start BRGUI or BRTOOLS. see Additional BRCONNECT Functions [Page 469].2 BR*Tools in Action Use You can change the password of the SAP user in your Oracle database with BR*Tools [Page 181]. Prerequisites • Make sure you have set the necessary BRCONNECT parameters in the initialization profile init<DBSID>. Check the results by viewing the messages displayed on the screen. For more information. You can use this function to change the component where the results are to be stored and where they can be viewed. 1. Choose Additional functions → Change password of SAP user.4 BR*Tools for Oracle DBA 4. The results of DBA operations performed using BR*Tools are stored in one component of a multi-component database. To start processing with the selected options. choose Continue.because BRTOOLS uses these when it calls BRCONNECT..sap [Page 488]. For security reasons. Procedure . 4.2. 3. 2. • April 2004 357 . The database must be running. Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) Database user/password (user) SAP owner to change password (owner) Message language (language) BRCONNECT command line (command) -p|-profile [Page 482] -u|-user [Page 483] -f chpass -o|-owner [Page 473] -l|-language [Page 482] This shows you the BRCONNECT -f chpass [Page 473] command that is to be executed using the current settings.5 Use Creating or Changing Synonyms for DBA Tables You can create or change the synonyms for the DBA tables in your Oracle database with BR*Tools [Page 181]. For more information.

Set the required options: Menu Entry Equivalent BRCONNECT Command Option BRCONNECT profile (profile) Database user/password (user) SAP owner for synonyms (owner) Message language (language) BRCONNECT command line (command) -p|-profile [Page 482] -u|-user [Page 483] -f crsyn -o|-owner [Page 475] -l|-language [Page 482] This shows you the BRCONNECT -f crsyn [Page 475] command that is to be executed using the current settings. Start BRGUI or BRTOOLS. 358 April 2004 .. 3.4 BR*Tools for Oracle DBA 4. choose Continue.. Choose Additional functions → Create/change synonyms for DBA tables.2 BR*Tools in Action Procedure . 1. 2. Check the results by viewing the messages displayed on the screen. 4. 5. To start processing with the selected options.

3 BR*Tools in Detail 4. save the database files and the nondatabase files in separate backup runs.3 BR*Tools in Detail This section gives you detailed information on BR*Tools. since it is always backed up automatically whenever at least one database data file is backed up. Online redo log files can only be addressed explicitly using the redo log group number. You can combine the value all with an <object list>. This enables you to back up other non-database files in addition to the database itself. see: • • • • • • Backing up Non-Database Files and Directories [Extern] Backing Up Database Files [Page 359] BRTOOLS [Page 485] Hardware Compression for BRBACKUP [Extern] Logging [Extern] Completion of BRBACKUP Backups [Page 360] 4. To save all the online redo log files. • • • April 2004 359 . a file is also saved for every online redo log group. which must be assigned a leading zero (0<n>). you can back up all the database files that meet these specifications.1 Use Backing up Database Files You can back up individual database files. BRBACKUP uses the procedures recommended by Oracle for performing online and offline database backups. tablespaces.1 BRBACKUP This SAP tool for the Oracle database enables you to back up database files. see Common Features of BRBACKUP and BRARCHIVE [Page 533]. For more information. • When you specify all or full. By specifying ID intervals or a generic path. However.3. Procedure To specify database files. or the full path name. The smallest unit that can be saved with BRBACKUP is a file. we do not recommend this procedure. 4.1. or the entire database. For further information about features common to both tools. Whenever possible.3. a generic name. It is not usually necessary to back up this file.sap [Page 488] or the command option brbackup -m|-mode [Page 369] for this purpose. Use the backup_mode [Page 492] from the Initialization Profile init<DBSID>.4 BR*Tools for Oracle DBA 4. you can use the file ID. For an offline backup. You can use BRBACKUP for backing up both files in the database and non-database files and directories. including the command options for calling the tools from the command line. The control file can only be addressed explicitly using the file ID 0. all the database data files (and therefore all the tablespaces) and control file are saved.

1. • 360 April 2004 . BRBACKUP automatically determines the files that are still to be backed up: target set (defined with the parameter backup_mode or the option -m) minus set backed up (BRBRACKUP detailed log). as it is possible to make a backup of all the non-database files of the SAP or Oracle environment with it. At the end of the week. their contents are not compressed. In this case a new set of files to be backed up can be specified. If you use a generic path to define database data files. • • All file IDs in the interval specified by <file_ID1>-<file_ID2> must be known in the database. make sure that this path contains the SAPDATA_HOME directory and an additional generic specification (for example. The use of parameter sap_dir or ora_dir is an exception. • • See also backup_mode [Page 492] or -m|-mode [Page 369]. we recommend carrying out this backup separately. As above BRBACKUP automatically determines the files to be backed up. that these will produce a complete backup. If you use BRBACKUP to save directories. a week).1. complete the partial backups on the last day of the cycle with the option -f|-fill. However. only the files in that directory are saved. The completion of a backup can also refer to several terminated backups. or monitor. When you save directories with software compression (compress = yes). differing from the original target volume set.4 BR*Tools for Oracle DBA 4. to ensure that you have a complete backup. It is not normally required because complete offline backups save these files automatically. This is especially important for large databases. 4. for which it is recommended to spread the backup over several days (for example.2 Backing Up Non-Database Files and Directories Non-database files should only be backed up with BRBACKUP after an SAP upgrade or an Oracle upgrade. You are making partial database backups and want to ensure. If you want to back up a large number of non-database files and directories (all the SAP executables and profiles. Using the BRBACKUP option -f|-fillup [Page 367] you can simply continue the backup. in order to reduce the volume of data to be backed up every day. files of any existing subdirectories will not be saved. See also backup_mode [Page 492] or -m|-mode [Page 369]. 4. This backup method is not a replacement for a file system backup using operating system features.3. sapdata<n> directory).3 BR*Tools in Detail specify the file ID 00.3 • Completion of BRBACKUP Backups The completion of database backups is relevant in the following situations: A backup has terminated and you do not want to repeat it. for example).3. • • Directories and non-database files for backup must be specified with their complete paths. this is really only required for offline backup.

4 BR*Tools for Oracle DBA 4. you should start a compression run to determine the compression rates: brbackup -k only. It only determines the compression rates. BRBACKUP can only estimate the quantity of data that can be written to the volume.3 BR*Tools in Detail Mo Database Files Tu Database Files … … Sa Su Database Files … … brbackup -m psapbtabd brbackup -m psapbtabdi brbackup -m all –f7 • brbackup -f b<timestamp>. The database files are only compressed (not saved) and the determined compression rates are stored in table SDBAD and in a detail log. April 2004 361 .3. Before the first backup using tape devices with hardware compression.1. See also: -f|-fillup [Page 367] Completion of BRRESTORE Runs [Page 396] Partial Backups [Page 131] 4.4 Hardware Compression for BRBACKUP When backup devices with hardware compression are used. Only in this manner can BRBACKUP ensure that the specified tape size is not exceeded and that the database files are correctly divided between the tapes. because BRBACKUP cannot directly determine the compression rates for hardware compression. See compress_cmd. This call does not actually start a backup. BRBACKUP uses the software compression rates as an estimate. BRBACKUP requires the current compression rates of the database files in order to determine the quantity of data to be saved after the hardware compression. SAP therefore assumes that hardware and software compression return similar results. as in the graphic above.pft is completed brbackup -f last: the last executed backup is completed brbackup -f 1: the current day’s backup is completed brbackup -f 7: the backups of the last seven days (including the current day) are completed.pft: the backup with the log name b<timestamp>.

3 BR*Tools in Detail For more information. these override the corresponding values in the initialization profile.sap. Also repeat this activity after a reorganization or after the loading of a large amount of data. see Common Features of BRBACKUP and BRARCHIVE [Page 533].time|dist]] [-p|-profile <profile>] [-q|-query [check]] [-r|-parfile <parameter_file>] [-s|-saveset 1|2|3|4|tsp|all] [-t|-type online|online_cons|offline|offline_force| offline_standby|offline_stop|online_split|offline_split] [-u|-user [<user>[/<password>]]] [-v|-volume <volume>|<volume list>|SCRATCH] [-w|-verify [use_dbv|only_dbv]] [-V|-VERSION] -a|-archive [Page 363] 362 April 2004 ..3. brbackup [-a|-archive [<bra_options>]] [-b|-backup <log_name>|last [-bd|-backup_delete <log_name>|last] [-c|-confirm [force]] [-d|-device tape|disk|disk_copy|disk_standby|pipe|tape_auto|pipe_auto| tape_box|pipe_box|util_file|util_file_online|stage|stage_copy|stage_s tandby|rman_prep|rman_util] [-db|-delete_backup <log_name>|last] [-e|-execute <number>] [-f|-fillup <log name1>[<log name2>. see Logs for BR*Tools. See also: Hardware Compression 4.]|<days>|last] [-h|-help [version]] [-i|-initialize [force|show]] [-k|-compress no|yes|hardware|only] [-l|-language E|D] [-m|-mode all|<tablespace_name>|all_data|full|incr|<file_ID>|<file_ID1><file_ID2>|<generic_path>|<object list>]|sap_dir|ora_dir] [-n|-number <number of tapes>] [-o|-output dist|time[. you can specify either the letter indicated or the complete word. To use the options. Repeat this activity at least once a month to update the compression rates. with a storage capacity of 1200 MB and no file compression.4 BR*Tools for Oracle DBA 4. If you use BRBACKUP with command options. the values in the Initialization Profile init<DBSID>.5 Command Options for BRBACKUP This section describes the command options for BRBACKUP [Page 359]. If you start BRBACKUP without command options.sap [Page 488] are used.. Unless otherwise specified in the initialization profile init<DBSID>. For more information about features common to both tools. BRBACKUP starts an offline complete backup to a local tape device.1.

When you specify the option -a BRARCHIVE is automatically started after the BRBACKUP backup of the data files.sap [Page 488] April 2004 363 . This procedure enables both an unattended backup and an effective usage of tape capacity.5A. The option -a (including the additional options) must always be placed at the end of the BRBACKUP command line call.4 BR*Tools for Oracle DBA 4. The second program is started automatically after the first program has ended. The main advantage of this procedure is that you only have to start or schedule one program (usually BRBACKUP). you can also use the tape capacity optimally. as well as all logs. See: Command Options for BRARCHIVE [Page 383] and Initialization Profile init<DBSID>.3 BR*Tools in Detail -b|-backup [Page 364] -c|-confirm [Page 364] -d|-device [Page 366] -e|-execute [Page 367] -f|-fillup [Page 367] -h|-help [Page 367] -i|-initialize [Page 368] -k|-compress [Page 368] -l|-language [Page 369] m|-mode [Page 369] -n|-number [Page 370] -o|-output [Page 371] -p|-profile [Page 371] -q|-query [Page 371] -r|-parfile [Page 372] -t|-type [Page 373] -u|-user [Page 374] -v|-volume [Page 374] -w|-verify [Page 375] -V|-VERSION [Page 375] -a|-archive This BRBACKUP command option starts BRARCHIVE at the end of a BRBACKUP run. Input syntax: -a [<bra_options>] Default: BRBACKUP and BRARCHIVE are called separately. The offline redo log files. are then copied by BRARCHIVE to the same tape(s) immediately after the backed up database files (as of Release 4. the backup of the data files and the offline redo log files takes place in separate backups on separate tapes. If not the appropriate defaults are used. this is also possible to disk. and with BACKINT. If the backup is made to tape. You can also specify other options for BRARCHIVE backups.

3 BR*Tools in Detail Unattended online backup of a database in parallel on two tape devices followed by a startup of BRARCHIVE. Backup of the last disk backup with the same parameters as defined in init<DBSID>. Input syntax: -b [<log_name>|last] Default: last • • <log_name>: The BRBACKUP disk backup with the log name entered in <log_name> is copied to the current backup tape or remote disk. After the backup the data is automatically deleted from the disk. in order to create two copies of the offline redo log files in parallel on the same tapes. Input syntax: -bd|-backup_delete [<log_name>|last] Default: last • • <log_name>: The BRBACKUP backup to disk with the log name entered in <log_name> is copied to the current backup tape or remote disk. last: BRBACKUP selects the last successful disk backup and copies this to the current backup tape or remote disk.sap: brbackup -b See also: Two-Phase Backup [Page 113] -bd|-backup_delete This BRBACKUP command option backs up then deletes a disk backup.sap followed by deletion: brbackup -bd See also: Two-Phase Backup [Page 113] -c|-confirm 364 April 2004 . last: BRBACKUP selects the last successful backup to disk and copies this to the current backup tape or remote disk. brbackup -m all -t online -c -a -ssd -c See also: BRBACKUP and BRARCHIVE Backups in One Run [Page 120] -b|-backup This BRBACKUP command option backs up a disk backup. Backup of the last disk backup with the same parameters as defined in init<DBSID>.4 BR*Tools for Oracle DBA 4.

you should use the option -c force. the utility responds as follows: – – When a console is available. you can mount the next volume. for example). and continue the backup. To schedule a backup using CRON. If a continuation tape is required. When a new volume must be mounted in the backup device during the backup. See Unattended Backup [Page 118]. When more volumes are required than there are backup devices available.3 BR*Tools in Detail This BRBACKUP command option backs up in unattended mode. To schedule a backup using CRON. the backup terminates.4 BR*Tools for Oracle DBA 4. make the entries required by the utility. the backup is not even started. • Prompt for mounting the next tape when a cpio continuation tape is requested (see cpio Continuation Tape [Page 536]). the utility responds as follows: – – When a console is available. use an appropriate script for entering the password. -db|-delete_backup April 2004 365 . make the entries required by the utility. Input syntax: -c [force] Default value: Confirmation messages are issued and user entry is expected. When the physical end of tape is reached. and continue the backup. A backup is scheduled using CRON. the backup is terminated at this point. The following confirmation messages are not suppressed: • • Interactive password entry. The backup is started. When no console is available (the backup was scheduled using CRON or the CCMS. Interactive password entry. but is terminated once the two tapes have been written. and an appropriate cpio error message is displayed. you suppress most of the confirmation messages that would normally be displayed during the execution of a backup. When you specify the -c option. Two tape devices are available and you have mounted two of the requested tapes. force: When the -c force option is used. for example). when more volumes are required than there are backup devices available. Prompt to mount a cpio continuation tape. you can mount the continuation tape. Three tapes are required for the backup. use an appropriate script for entering the password. use the option -c force. To avoid terminations for the above reasons. the backup terminates. See Unattended Backup [Page 118]. the UNIX utility CRON. This enables you to run the program in unattended mode. for example. When no console is available (the backup was scheduled using CRON or the CCMS. the following confirmation messages are also suppressed: • • Prompt to mount the next volume. The backup is started. Prompt to mount the next volume. The following confirmation prompt is not suppressed: • If you want to run the SAP utility with.

To let you construct a standby database. tape: Local tape device. a standby control file is generated and copied. This is only useful when you use a tape device with automatic tape changing (tape changing device). The drivers for the data transfer (cpio. If a parameter file of this type is required.3 BR*Tools in Detail This BRBACKUP command option deletes a disk backup.4 BR*Tools for Oracle DBA 4. See backup_dev_type [Page 490] rman_util|rman_prep: Backup with the Oracle Recover Manager (RMAN) and an external backup tool. dd) are defined in the parameters tape_address or tape_address_arch. See backup_dev_type [Page 490] • • • • • See also: 366 April 2004 . 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. disk_copy: Copying of database files to a disk with an identical directory structure. tape_box or pipe_box: Jukeboxes or autoloader tape devices which can be addressed locally or remotely. This dynamically sets and ends the backup status of the tablespaces to be saved and thus greatly reduces the volume of offline redo log files during the backup. stage|stage_copy|stage_standby: Backup to remote disk. -d|-device This BRBACKUP command option defines the backup device type. Input syntax: -d tape|disk|pipe|disk_copy|disk_standby|tape_auto|pipe_auto| tape_box|pipe_box|util_file|util_file_online|stage|stage_copy| stage_standby|rman_prep|rman_util Default: tape The following backup media are supported: • • • • • disk: Local disk. If you use this option. util_file or util_file_online: Use external backup programs for file-by-file backup. disk_standby: Copying of database files to a disk with an identical directory structure (compare disk_copy). last: BRBACKUP selects the last successful disk backup and deletes it from disk. you must specify the name of the file in the profile parameter util_par_file or with the option -r. tape_auto or pipe_auto: Prompts for changing the tape will be suppressed. Use parameter util_file_online for an online backup (if it is supported by the external backup program). Input syntax: -db [<log_name>|last] Default: last • • <log_name>: The BRBACKUP disk backup called log_name is deleted from disk. The name of the new SAP_Home directory is defined in the parameter new_db_home. you may have to create a file containing the parameters required for that type of backup. pipe: Backup to a tape device of a remote system.

. Input syntax: -f <log_name1>[. Parameters in init<DBSID>.3 BR*Tools in Detail Parameters in init<DBSID>. Input syntax: -e <n> Default value: 0 This parameter defines the maximum number of parallel copy processes. -e|-execute This BRBACKUP command option executes the backup in parallel. -f|-fillup This BRBACKUP command option makes backup runs complete. • version: To display detailed information on the versions of the program modules. • Backup to disk The number of parallel copy processes can be greater than the number of disks defined in backup_root_dir|stage_root_dir (but not greater than 255). the number of parallel copy processes corresponds to the number of backup devices available (tape devices/disks). If the default value is set to 0. This will cause the following to happen: • Backup to tape The value n should be less than or equal to the number of backup devices.sap: exec_parallel [Page 502].. If the option -k only is used to determine the compression rates. April 2004 367 . to all backups in a defined number of preceding days <days> or to the last backup to be run. the number of parallel copy processes corresponds to the number of disks (or logical volumes) on which the database files reside. there is an automatic change to the next disk which is not used and the backup continues there. -h|-help This BRBACKUP command option provides help information. there is an automatic change to the next free backup device and the backup continues there.4 BR*Tools for Oracle DBA 4. If you choose the number of copy processes n to be less than the number of disks. If one of the disks used in parallel is full. you can obtain an overview of all applicable options for BRBACKUP. In this case. You can also define a different number n of copy processes. Input syntax: -h [version] Default value: No help Using this option.]|<days>|last Default value: last The completion of backups can refer to one or more defined backup(s) <log name>. Should a tape change to one of the tape devices used in parallel be necessary. this means that you can only use n of the available disks in parallel. this means that you can only use n of the available tape devices in parallel. If you define a value n less than the number of tape devices.sap: backup_dev_type [Page 490].<log_name2.. one or more disks will be written simultaneously by several processes.

. The cpio message is platform-dependent and has. It is also possible to initialize SAP volumes with -i force. you can also use in addition the option -v. -k|-compress This BRBACKUP command option sets the compression mode.: No more data on tape. However. Use this option to initialize SAP volumes (tapes) or non-SAP volumes. for example. Out of phase -. Mount the volumes with the appropriate names or other SAP volumes with labels. BRBACKUP initializes the volume and assigns it the specified name. Initialize this tape using the option -i force and then repeat the procedure. BRBACKUP checks whether the expiration period has expired.get help. Not a cpio archive. If so.3 BR*Tools in Detail -i|-initialize This BRBACKUP command option initializes tape volumes. • -i: This option can only be used for SAP volumes. End of volume. bad header. cpio: Bad header . -i force: This option is used to initialize new or non-SAP volumes.4 BR*Tools for Oracle DBA 4. • For both the above options. Input syntax: -k no|yes|hardware|only Default value: no (no compression) 368 April 2004 .checksum error. cpio: Bad magic number in archive. cpio: Not a cpio file. The system then initializes the tapes with the names selected in -v. No initialization is executed: the volume remains unaltered. The expiration period is not checked. the following texts Operating System Message Reliant AIX HP-UX TRU64 Solaris NT cpio: Bad header . BRBACKUP suggests the volume name specified in volume_backup. we recommend you to only use this option when necessary. Only tapes of this type can be used for backup with BRBACKUP. • -i show: Used to display the volume label information.. See Volume Management [Page 96]. You receive an error message from BRBACKUP and one of the following cpio messages if you want to start the backup program and want to use a non-initialized tape as a backup medium. It is used mainly to rename volumes.checksum error. Input syntax: -i [force|show] Default value: Label checking before initialization. since the expiration period is not checked and the tape_use_count stored in the volume label is reset to one. Out of phase. cpio: Read error on file. Cannot read from the specified input. cpio: Not a cpio file.

hardware: Hardware compression. The default becomes invalid if you specify another value by setting the environment variable BR_LANG (language variable).sap: compress [Page 498]. April 2004 369 . -m|-mode This BRBACKUP command option defines the file to be backed up. Input syntax: -l E|D Default value: E You can determine whether you want the messages to appear in English (E) or in German (D). See Complete Backups [Page 89]. You can create object lists. no backup is started. Parameters in init<DBSID>.d:=k:. • • all_data: Back up the files of all tablespaces.f:=m: If you do not specify a target drive. SAP recommends repeating this procedure about once a month.3 BR*Tools in Detail If you specify this option. If you set option -l. all files are copied to the directory defined in the parameter new_db_home [Page 505]. Input syntax: -m all|all_data|full|incr|<tablespace>|<file_ID>|<file_ID1><file_ID2>|<generic_path>|<object_list>|sap_dir|ora_dir Default: all You can perform a full database backup or back up specific tablespaces or files (whether part of the database or not). only: Determine the current compression rate of the individual data files.e:=l:. -l|-language This BRBACKUP command option sets the language for messages. • • yes: Software compression. For more information.4 BR*Tools for Oracle DBA 4. the files of the drive e are copied to the drive l and the files of the drive f are copied to the drive m. The files of the drive d are copied to drive k. full: Full database backup at level 0. you can compress your data files before the backup is performed. You can specify what you want to back up: • all: Back up the complete database In a structure-retaining database copy [Page 115] (backup_dev_type = disk_copy or disk_standby) you can retain the distribution of the sapdata directories to different drives (only for Windows NT). see Hardware Compression for BRBACKUP [Page 361]. the value specified with this option applies. In this case. Prerequisite: the tape device must support hardware compression and hardware compression must be active. brbackup -d disk_copy -m all. If you use tape devices with hardware compression. See Hardware Compression [Page 106]. except for pure index tablespaces. • See also compress_cmd [Page 498].

you can automatically determine and save all the nondatabase files of the Oracle environment. <n> is the redo log group number. Saving and restoring under root also has the advantage that you can be sure that the settings for the user and authorizations for the files and directories will be kept after restoring. no blanks). The specified file IDs must be known in the database. /usr/sap/<SAPSID> and /usr/sap/trans. the path must contain at least the SAPDATA_HOME directory and an additional generic specification (for example. save these directories in a separate backup run. If possible.or origlog/mirrlog directories). as otherwise you will not have the authorizations required for the directory to be saved. Specify a generic path to back up all the database data files whose name starts with that path. <file_ID1>-<file_ID2>: Back up the files specified in the file ID interval. If possible. it might be more effective to configure parameter backup_mode of the initialization profile accordingly.sap: backup_mode [Page 492]. -n|-number This BRBACKUP command option defines the number of tape volumes to be initialized. <tablespace>: Back up the files of one tablespace.3 BR*Tools in Detail • • • incr: Incremental backup with RMAN. sapdata<n>) in the path. Parameters in init<DBSID>. You can only use this option when saving to tape without verifying the backup. Input syntax: -n <number of tapes> 370 April 2004 . To address all the online redo log files. The individual objects are separated by commas (commas only. You can only use this option when saving to tape without verifying the backup. In this case. This means that the following directory trees are saved: /sapmnt/<SAPSID>. However the directory structure and the content of the subdirectories are not backed up. these directories should be backed separately. nondatabase file. <generic_path>: Enter a complete path to back up the required database file. ora_dir: With this option. you can automatically determine and save all the files of the SAP environment. • • When you specify a directory to be backed up its contents and the names of the subdirectories are backed up. Control files can be addressed with the file ID 0. If you want to repeatedly back up several tablespaces and/or files. or directory. This means that the directory trees are saved in <ORACLE_HOME> (except for the sapdata<n> and saplog. use file ID 00. • • For UNIX systems: Start BRBACKUP to save the SAP/Oracle environment (brbackup -m sap_dir|ora_dir) under user root. See full database backup (level 0) in Incremental Backup [Page 90]. or combine the key word all with an object list. sap_dir: With this option.4 BR*Tools for Oracle DBA 4. Online redo log files can be addressed using the file ID 0<n>. • <object list>: You can specify a list of tablespaces or files. <file_ID>: Back up a data file with the specified Oracle file ID as file ID.

April 2004 371 .g. -o|-output This BRBACKUP command option prints extra information to the log file. -q|-query This BRBACKUP command option sets query mode. this information is included in list form for all backed up files. Input syntax: -o dist|time[. Before you start a backup request with CRON. time: The SAP utility generates additional time stamps that enable you to determine the time required for the individual operations. To initialize only a specific number of tapes. Input syntax: -q [check] Default value: The backup is started.e. (i. -p|-profile This BRBACKUP command option defines the profile name. specify the name of the profile file here. tapes) must be mounted for the backup process. Using this option causes the detail log to be extended as follows: • • dist: The SAP utility generates information about the distribution of the files for backup among the volumes (tapes or disks) to be used. The backup is not started. In this case. After a successful backup. you should use this option to find out which volumes are required. Among other things. you can then determine the pure backup time for a file. The program processes all existing tapes.time|dist] Default value: The BRBACKUP detail log is written in normal form. If you want to use a different profile. in the init<DBSID>. • check: You can check whether the proper volumes have really been mounted in the backup devices. -i force. specify the complete path. change this value to meet your requirements. See BRBACKUP Detail Log [Page 377].000 Define the number of volumes tapes you want initialized (you can use this option only together with one of the options -i. backup is not started. If this file is not in the standard directory. When you select the -q option.000. The default value is 10. See Log Supplements [Page 531].4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail Default value: 10.sap This profile is contained in directory <ORACLE_HOME>/dbs (UNIX) or <ORACLE_HOME>\database (Windows NT). The preparation for an unattended backup to tapes could be performed as follows: – brbackup -q check to query the required tapes. or -i show). Input syntax: -p <profile> Default value: init<DBSID>.sap parameter volume_backup or those defined with the option -v). you find out which volumes (e.

The SAP utilities only pass on the information about the parameter file name that the external program can use to obtain the required information. The contents of this file depend on the external backup program used. contact the supplier of the external backup program. When using non-SAP backup programs for the backup. since you have already checked the validity of the tapes. Multiple file access (file multiplexing) maximizes the flow of data (streaming mode). all files of a tablespace. Enter cont to start the check of the mounted tapes. Parameters in init<DBSID>. Input syntax: -r <parameter_file> Default value: No parameter file If you want to carry out a BRBACKUP backup using backup devices such as jukeboxes or autoloaders. Input syntax: -s 1|2|3|4|tsp|all Default: 1 1.3 BR*Tools in Detail – – Mount the required tapes in the tape devices. you can start an unattended backup on the same day. A save set can contain individual data files.2. -r|-parfile This BRBACKUP command option defines the BACKINT parameter file. You can enter the complete names of this file in the initialization profile or using the option -r. you might have to store the additional information required in a parameter file when specifying the option -d util_file|util_file_online.4: Number of files in a save set tsp: each save set contains all files of a tablespace all: only one save set with all database files is created The SAP backup library helps to optimize the utilization of quick tape drives by combining multiple data files in save sets. since in a restore the complete save set has to be imported. 372 April 2004 . To find out which parameters must appear in this file and the syntax of those parameters. you can define the name of a parameter file with the option -r or in the initialization profile.3. even if only one data file is required. A fast data flow with a minimum save set size is the optimum.sap: • • mount_par_file [Page 504] (for BRBACKUP backups) util_par_file [Page 527] (for external backup programs) -s|-saveset This BRBACKUP command option defines the number of files in a save set. We do not recommend large save sets. Once you have made these preparations. The size of the save sets for the backup must be selected according to the tape device. which contains the configuration parameters for the mount or dismount command.4 BR*Tools for Oracle DBA 4. or the complete data backup.

followed by the migration of the saved database into mount standby status. For more information. Input syntax: -t online|online_cons|offline|offline_force| offline_standby|offline_stop|online_split|offline_split|online_mirror |offline_mirror Default value: offline Specify the backup mode. This option is only relevant for a split mirror online backup [Page 144].sap. the splitting and saving of the mirror disks is performed while the database is open.3 BR*Tools in Detail saveset_members = all is set as standard for an incremental backup with the SAP backup library so that only one “incremental save set” is created including all changed blocks. the database is not shut down. online_mirror: In the SPLITINT scenario. whilst the database is open. • • online: The backup is performed for the open database. whilst the database is open. offline_split: In the split command scenario. offline_standby: The standby database is stopped for the backup. This option is only relevant for the standby database [Page 133] configuration. the database is stopped for the splitting of the mirror disks. BRBACKUP calls SPLITINT to perform the split. This backup of the offline redo log files using BRBACKUP runs completely independently of other BRARCHIVE backups. The backup of the mirror disks is then done directly afterwards. -t|-type This BRBACKUP command option defines the online or offline backup type. The database is shut down and an offline backup is performed. refer to RMAN Save-Set Grouping [Page 574]. and BRBACKUP terminates with an appropriate error message (BR068E). The backup of the mirror disks is then done directly afterwards. This means that you have a logically consistent dataset available. offline: The database is shut down for the backup when the SAP System has also been shut down. offline_stop: Database backup in offline mode. This option is only relevant for a split mirror online backup [Page 144]. offline_mirror: In the SPLITINT scenario. This option is only relevant for a split mirror offline backup [Page 146]. April 2004 373 . the splitting and saving of the mirror disks is performed while the database is open. This type of backup is only relevant when the production database is saved and then takes over the role of a standby database. The backup itself becomes a production system. See Standby Database: BRBACKUP Backup of Database Files [Page 138] online_split: In the split command scenario. offline_force: The system does not check whether an SAP System user is active. This option is only relevant for a split mirror offline backup [Page 146]. the database is stopped for the splitting of the mirror disks. As well as the database files the offline redo log files generated during the backup are also copied to the same volume. online_cons: The backup is carried out whilst the database is open.4 BR*Tools for Oracle DBA 4. BRBACKUP calls SPLITINT to perform the split. Otherwise. see parameter backup_type [Page 494] in init<DBSID>. • • • • • • • • For more information.

com/notes. In this case. -v|-volume This BRBACKUP command option defines the tape volumes to be used. the automatic volume management will cyclically select the volumes named in volume_backup and check whether their expiration period has expired.no blanks). an interactive query of the user name and the password is carried out by the SAP utility. you are prompted to mount it in the backup device (tape device). do not use the parameter SCRATCH. If you are working with an OPS$ user. BRBACKUP checks whether the mounted volume (tape) has that name and whether the expiration period has expired. In shell scripts. it is not necessary to specify the password when calling BRBACKUP.4 BR*Tools for Oracle DBA 4. you can mount any volume (whose expiration period has expired) for the backup. • If you want to use the standard volume(s) specified in parameter volume_backup of the initialization profile. the password is not displayed during entry. if RMAN is to be used. In this case. These measures are taken to protect the DBA password. If a free volume (e. • <volume>: Enter the volume(s) you want to use for backup. If you only enter -u.sap The length of the volume name is limited to 10 characters. The user must also have SYSDBA authorization.3 BR*Tools in Detail -u|-user This BRBACKUP command option defines the user name and password. The individual objects in a volume list are separated by commas (only commas .g. SCRATCH: By entering the reserved name SCRATCH. BRBACKUP tries to log on to the database as OPS$ user (see Oracle documentation and information in the SAP Service Marketplace at http://service. you can structure the call as follows (example: BRBACKUP): brbackup -c -u <<END <user>/<password> END However. 374 April 2004 . use this command only if the option -c is active and you are sure that the tape does not need to be changed. Input syntax: -u [<user>[/<password>]] Default value: system/manager User name and password used by the SAP utility program to log on to the database system. You can enter the user name and the password separately (only enter the user name or the option -u <user>). and does not appear in the process list. BRBACKUP checks the name of the mounted volume and makes sure the expiration period really has expired. Input syntax: -v <volume>|<volume list>|SCRATCH Default value: defined in init<DBSID>. The OPS$ user must be defined in the database and have at least SYSOPER authorization and SAPDBA role. use the following call: brbackup -u / In this case. With this method. with expired expiration period) is found. The utility then prompts entry of the password.sap.

See Volume Management [Page 96]. -w|-verify This BRBACKUP command option verifies the backup after the files have been backed up. For security reasons. By using the reserved name SCRATCH. During an offline backup. decompressed (when compress = yes was used). Input syntax: -V 4. all the saved files are restored from the volume (for example. Once the backup phase is complete.sap. It enables you to detect any possible hardware problems and undertake the appropriate measures. Input syntax: -w [use_dbv|only_dbv] Default: No verification. See also: Backup Verify [Page 122] -V|-VERSION This BRBACKUP command option displays detailed information on the program modules and patches. tape) in sequence. You can then mount any SAP volume. The program still makes sure that the expiration period has expired. we recommend using this option at least once within the volume expiration period for your complete backups. Parameters in init<DBSID>. See also compress_dir [Page 499]. you can deactivate the automatic volume management. only_dbv: Internal block structure check on the database files with DBVERIFY without backup: Note that verification approximately doubles the backup time required. once a week. read by the check program.sap: volume_archive [Page 528] or volume_backup [Page 528]. and compared with the originals. the file contents are compared in binary form.3.4 BR*Tools for Oracle DBA 4. This option can be used to make sure that the backup is readable and complete. See Log Supplements [Page 531].1. see: Names of the BRBACKUP Detail Logs BRBACKUP Detail Log Log Supplements April 2004 375 . use_dbv: Database backup followed by a restoration to a temporary directory and a check of the Oracle block structure with the DBVERIFY tool.3 BR*Tools in Detail The expiration period is configured with parameter expir_period in profile init<DBSID>. or still better. the sizes of the saved files are determined and checked.6 • • • BRBACKUP Logs For more information. During an online backup.

3 BR*Tools in Detail • BRBACKUP Summary Log Names of the BRBACKUP Detail Logs Every detail log contains a name with the following format: b<encoded timestamp>. ddb: The BRBACKUP option -db was used to delete a disk backup. but no backup was started. s: Remote disk (backup_dev_type = stage|stage_copy|stage_standby) tib: One of the BRBACKUP options -i. or to make sure that these volumes were actually mounted. d: Local disk (backup_device_type = disk|disk_copy|disk_standby). cmb: The BRBACKUP option -k only was used to only perform a software compression. f: Full (level 0) database backup (backup_mode = full) i: Incremental (level 1) database backup (back_mode = incr) Possible values for y: • • n: The backup was performed online (backup_type = online|online_cons|online_split). no backup was started. Other function IDs: • • • • 376 April 2004 . This can be used to determine the current compression rate of all files. but no backup was started. backup performed file by file (backup_device_type = util_file|util_file_online). partial backup). Possible values for z (specification of backup devices): • • • • • • • t: Tape device (backup_dev_type = tape|tape_auto|tape_box). but no backup was started. -i force or -i show was used to initialize a volume or display the information in the label.4 BR*Tools for Oracle DBA 4. p: Tape device on a remote system (backup_device_type = pipe|pipe_auto|pipe_box) f: External backup program used. p: One or more tablespaces or files were backed up (that is. Possible values for x: • • • • a: Whole database was backed up (backup_mode = all|all_data). qub: One of the BRBACKUP options -q or -q check was used to display which volumes are to be used for the backup. f: The backup was performed offline (backup_type = offline|offline_force|offline_standby|offline_split|offline_stop ). dbv: The BRBACKUP option -w only_dbv was used to verify the internal database block structure with DBVERIFY. rmp: The BRBACKUP option -d rman_prep was used to prepare for backup with the Oracle Recovery Manager (RMAN). but no backup was started.xyz The first characters indicate the encoded time the backup was performed (action ID). The extension (function ID) indicates the type of backup.

file type FILE | RAW Online redo log files: File name. start SCN (system change number) of the current online redo log files Listing of data files of the tablespaces. spec . • • • • #FILE The data file name as it appears in the control file. link . Information on Oracle archiving before starting BRBACKUP: Database mode (ARCHIVELOG. the compression rate is also displayed. file name.4 BR*Tools for Oracle DBA 4. disk volume ID. disabled). Oracle tablespace status ('∗' means: data tablespace). NOARCHIVELOG). Oracle file status. #ARCHIVE Name of the offline redo log files (only for backup_type=online_cons) April 2004 377 . link directory at subdirectory level (usually for subdirectory <tablespace name>_<file number>) or key word NOLINK. link directory or key word NOLINK when no soft links were defined. and the control files: – Tablespaces and data files: Tablespace name. log sequence number of the current online redo log files. file name Listing of directories and their contents. pipe . This information indicates which database file. file category (file . file size. See Log Supplements [Page 531]. disk volume ID. -o|-output [Page 371] and -w|verify [Page 375]. file size.special file). 0 (default for file ID).<ext>. status of the archiving process (enabled.sap that were set during the BRBACKUP run. The detail log file contains information about the status of the Oracle database at the time of the backup. and about the actions that were performed in the course of the backup. see Names of the BRBACKUP Detail Logs [Page 376]). file type FILE | RAW Control files: File name. disk volume ID. file type FILE | RAW • – – • • Listing of non-database files.3 BR*Tools in Detail BRBACKUP Detail Log This section describes the information contained in a detail log (a<encoded timestamp>. file size. when no soft links were defined. archiving directory. disk volume ID. next redo log files for archiving by Oracle. Oracle file status.soft link. Name of a directory. • • Displays the relevant parameters of initialization profile init<DBSID>.file.directory. dir . Oracle file ID. redo log group number. file size. or directory. or which profile and log were saved and where. file size. If compress = only is used. the redo log files. Backup Flow The log will contain additional information when you start BRBACKUP with the option -o dist|time or/and -w. if non-database files were saved: Disk volume ID. oldest log sequence number of the online redo log files. link directory or key word NOLINK when no soft links were defined. file name • The backup flow. #NDBF #DIR Name of a non-database file. if directories were saved using this option: Directory name. non-database file.named pipe.

#SAVED This entry differs depending on the type of backup: – Backup on tape #SAVED file name.log. BRBACKUP Summary Log You can display a brief entry for each backup in the summary log back<DBSID>. compression rate and the size of the compressed file and size of the compressed file (if compressed) – Backup on disk #SAVED file name. • • • • Value of the parameter backup_type [Page 494] Value of the parameter backup_dev_type [Page 490] Internal flags for the BRBACKUP command options BRBACKUP version 4. ora_dir) "∗" means that non-database files were also backed up. name of tape.3.3 BR*Tools in Detail • • #INLOG Name of the relevant profile/log (only when archiving with BACKINT).1. position of the file on the tape. time) specifying the end of the backup Return code Total compression rate (appears only when compression was used) Number of files backed up: all[∗]: all database files all_data[∗]: all pure data tablespaces partial[∗]: partial backup non_db: only non-database files (for example. symbolic volume name and file position (only important for BRRESTORE). as well as several closing messages. time) specifying the start of the backup Timestamp (date. sap_dir.4 BR*Tools for Oracle DBA 4. compression rate and the size of the compressed file (only if compressed) – Backup using an external backup program #SAVED Backup ID returned by the external backup program This is followed by an archive log list that is created (and possibly updated) after the backup.7 Options Profile Parameters and BRBACKUP Command Save-Set Grouping and Preparation Run 378 April 2004 . The entries in the file provide the following information about each backup using BRBACKUP: • • • • • • • Action ID (encoded timestamp of the log name) Function ID (extension of the log name) Timestamp (date.

see RMAN Backup with the SAP Backup Library [Page 565].sap [Page 488]: saveset_members = 1|2|3|4|tsp|all (default: 1) The corresponding command option is: brbackup -s|-savesets You can start the preparation run for determining the optimum distribution of files across the save sets as follows: • • brbackup –d rman_prep BRGUI or BRTOOLS menu: Backup and database copy → Additional functions → Preparation of RMAN backups For more information. make the following entry in the initialization profile init<DBSID>. RMAN Backup with an External Backup Library For backups with external backup libraries.sap or set the corresponding command options for backup to: • Local tape devices backup_dev_type = tape|tape_auto|tape_box tape_copy_cmd = rman|rman_dd • Remote tape devices backup_dev_type = pipe|pipe_auto|pipe_box tape_copy_cmd = rman|rman_dd • Remote disk (incremental) backup_mode = incr backup_dev_type = stage remote_user = "<user name> [<password>]" (<password> is required for SAPFTP) remote_host = <host name> For more information.4 BR*Tools for Oracle DBA 4. These parameters affect how the save sets are formed and the parallel backup to different media. you need to make the following entries in the initialization profile init<DBSID>.3 BR*Tools in Detail To define the size of the save sets by the number of files they contain. RMAN Backup with the SAP Backup Library For backups with the SAP backup library you need to make the following special entries in the initialization file init<DBSID>. • • rman_channels Number of channels allocated to the parallel processes rman_filesperset Number of files in each save set April 2004 379 . which BRBACKUP sends directly to the Oracle RMAN (without the prefix rman_). see RMAN Save-Set Grouping [Page 574].sap or the corresponding command options: backup_dev_type = rman_util You can set other parameters as well.

sap or the corresponding command options: • backup_dev_type = disk disk_copy_cmd = rman • The individual steps of the incremental backup strategy without backup library have the following command options: . one file in each save set for normal backups. or all files in one save set for incremental backups) • • • • • • • • • • rman_kbytes rman_readrate rman_maxopenfile rman_setsize rman_diskratio rman_pool rman_duplex rman_proxy rman_parms rman_send For more information on these parameters. Incremental backup (level 1) to disk with RMAN: brbackup –m incr –d disk 3.4 BR*Tools for Oracle DBA 4. Backup of the incremental backup to tape without RMAN (two-phase backup): brbackup –b last –m incr –d tape|pipe|util_file For more information. 1. set the following entries in the initialization file init<DBSID>.sap or use the corresponding command options: • • backup_dev_type = tape|pipe tape_copy_cmd = rman|rman_dd backup_dev_type = rman_util If you are using an external backup library. see RMAN Incremental Backups Without a Backup Library [Page 570]. Full backup (level 0) without RMAN: brbackup –m full –d tape|pipe|util_file tape_copy_cmd = cpio|dd 2.3 BR*Tools in Detail Default is 0 (that is. Backup of Offline Redo Log Files with RMAN If you are using the SAP backup library...sap [Page 488] and the Oracle backup and recovery documentation. you need to make the following entries in the initialization file init<DBSID>. For more information. use the following setting: 380 April 2004 . see RMAN Backup with an External Backup Library [Page 567]. RMAN Backups Without Backup Library For normal backups to disk with RMAN. see Initialization Profile init<DBSID>.

see RMAN Backup of the Offline Redo Log File [Page 572]. you can use the following BRRESTORE command (RMAN redoes the changes in the files that have been affected): .00] 2.4 BR*Tools for Oracle DBA 4. The following save sets are created if the SAP backup library is used: • • <coded timestamp>. the new files are backed up in full to a second save set in subsequent incremental backups. for example after a media error. See also: Oracle documentation April 2004 381 .3 BR*Tools in Detail For backups to disk with RMAN but without a backup library... if they exist): brrestore -b last -m incr For more information. see RMAN Restore of Incremental Backups [Page 564]. Restoring Incremental Backups with Structural Changes In an incremental backup with structural changes. Applying the offline redo log files with Oracle SQLPLUS. 3. 1.. restore of the control file and the online redo log files from the last incremental backup: brrestore -b last –m 0[. If necessary.INCR (changes to the "old" files) <coded timestamp>. for example as follows: For more information. Restore of the last incremental backup (level 1): brrestore -b last –m incr 4.FULL (newly added files) The backup of the new files to a separate save set allows a precise specification of which files are to be restored. Restore affected files of a full backup (level 0): brrestore -b <brb_log_name> –m all|<object list>|. Restoring Incremental Backups To make the database consistent again. Restore of changes to all files that were in the database at the time of the last full backup at level 0 (first save set of the last incremental backup): brrestore -b last -m incr_only Restore of the files that have been added since the last full backup at level 0 (second save set of the last incremental backup): brrestore -b last -m incr_full Restore of the whole incremental backup (both save sets. see RMAN Incremental Backups After Structural Changes [Page 563]. use the following settings: • • backup_dev_type = disk disk_copy_cmd = rman brarchive -sd -c Then start BRARCHIVE. For more information.

4 BR*Tools for Oracle DBA 4. you can change the parameter tape_size accordingly. Use the option -f|-fill [Page 386] to archive the offline redo log files permanently. You should archive the offline redo log files on tape using BRARCHIVE. Therefore. To ensure that the offline redo log files are archived smoothly. the size of the offline redo logs shrinks by around a third.sap [Page 488] is configured properly and use the appropriate command options for BRARCHIVE [Extern]. thus reflecting the actual compression rate. This enables you to archive many more (up to 120 in the example) offline redo log files with one BRARCHIVE call. the default value of 1 is assumed. See -s|-sc|-ds|-dc|-sd|scd|-ss|-ssd|-cs|-cds [Page 389]. Features • • • You can also start BRARCHIVE when the database is shut down. Consider the following: We know from experience that during a hardware compression.3. since the previously determined compression rates cannot be used for archiving the next redo log files.3. You can also make this second copy serially (either by restarting BRARCHIVE with brarchive -sc or brachive -scd or by using the option -cs or -cds). brarchive -ssd). for example. This means. we recommend using the option of archiving the offline redo log files to two backup devices in parallel (brarchive -ss. See. In this way. the summary log must exist in readable form. If. however. performing software compression in advance is useless. you can increase the init<DBSID>. you must restart BRARCHIVE to write to the next volume. 382 April 2004 . BRARCHIVE does not have its own management of tape continuation.1 Hardware Compression for BRARCHIVE When you archive the offline redo log files with BRARCHIVE.sap parameter tape_size by around 50% (to 2400 MB in the above example).2 Use BRARCHIVE This SAP tool for the Oracle database enables you to archive offline redo log files.3 BR*Tools in Detail 4. See also: • • • • • Hardware Compression for BRARCHIVE Logging 4. Prerequisites Make sure that the initialization profile init<DBSID>. In contrast to BRBACKUP [Page 359]. that when the tape size is 1600 MB and the redo log files are 20 MB. For security reasons. When a tape is full. a larger number of offline redo log files were written on one day that actually fit on the tape. see Common Features of BRBACKUP and BRARCHIVE [Page 533]. up to 80 offline redo log files can be archived on a volume. If BRARCHIVE does not have any information on the compression rates.2. Please do not delete or change any entries in this log. For further information about features common to both tools. you can make sure that the archiving directory does not fill up.

If you do this.sap profile parameter.time|dist]] [-p|-profile <profile>] [-q|-query [check]] [-r|-parfile <parameter_file>] [-s|-save|-sc|-second_copy|-ds|-delete_saved|-dc| -delete_copied|-sd|save_delete|-scd|-second_copy_delete|-ss| -double_save|-ssd|-double_save_delete|-cs|-copy_save|-cds|copy_delete_save] [-u|-user [<user>[/<password>]]] April 2004 383 . To use the options. you can specify either the letter indicated or the complete word. see Common Features of BRBACKUP and BRARCHIVE [Page 533]. See BRARCHIVE Logs [Page 391]. BRARCHIVE also records its actions in the database tables SDBAH and SDBAD.3 BR*Tools in Detail You can define a separate init<DBSID>. with a storage capacity of 1200 MB and no file compression. <SAPDATA_HOME>/saparch/arch<DBSID>.4 BR*Tools for Oracle DBA 4. tape_size_arch [Page 527]. If you use BRARCHIVE with command options. BRARCHIVE starts archiving all the offline redo log files to tape. For more information about features common to both tools.2. Unless otherwise specified in the initialization profile init<DBSID>.3 Command Options for BRARCHIVE This section describes the command options for BRARCHIVE [Page 382].<ext> Every detail log contains information about the actions performed during an archiving run. See also: Hardware Compression [Page 106] 4. the values in the initialization profile init<DBSID>.log This summary log contains a brief entry for every archiving operation that was performed.3. brarchive [-a|-archive [-b|-backup [<brb_options>]] [-c|-confirm [force]] [-d|-device tape|disk|pipe|tape_auto|pipe_auto|tape_box|pipe_box|util_file|stage| rman_util] [-f|-fill [<number>|stop|suspend|resume]] [-h|-help [version]] [-i|-initialize [force|show]] [-k|-compress no|yes|hardware|only] [-l|-language E|D] [-m|-modify [<delay>]] [-n|-number <number of logs>|<number of tapes>] [-o|-output dist|time[. If you start BRBACKUP without command options. 4.sap [Page 488] are used. changes to individual parameters do not affect the next database backup with BRBACKUP. for BRARCHIVE.2 Logging for BRARCHIVE BRARCHIVE writes the following file system logs: • • <SAPDATA_HOME>/saparch/a<encoded timestamp>.3. these override the corresponding values in the initialization profile.2.

sc. -ss.4 BR*Tools for Oracle DBA 4. Both the copies saved directly to tape as well as those written to tape via a disk backup are taken into account. which have not already been saved to tape.3 BR*Tools in Detail [-v|-volume <volume>|<volume list>|SCRATCH] [-w|-verify] [-V|-VERSION] See also: -a|-archive [Page 384] -b|-backup [Page 385] -c|-confirm [Page 385] -d|-device [Page 385] -f|-fill [Page 386] -h|-help [Page 387] -i|-initialize [Page 387] -k|-compress [Page 387] -l|-language [Page 387] -m|-modify [Page 387] -n|-number [Page 388] -o|-output [Page 388] -p|-profile [Page 388] -q|-query [Page 388] -r|-parfile [Page 389] -s|-sc|-ds|-dc|-sd|-scd|-ss|-ssd|-cs|-cds [Page 389] -u|-user [Page 390] -v|-volume [Page 390] -w|-verify [Page 390] -a|-archive This BRARCHIVE command option backs up offline redo log files saved earlier on disk. A copy of the offline redo log files that were copied to disk in a previous backup is created in parallel on each of two different tapes: brarchive -ss -a See also: Two-Phase Backup [Page 113] 384 April 2004 . Input syntax: -a Default value: BRARCHIVE saves all offline redo log files to tape. At the most two copies can be written to tape. The option -a|-archive can only be used in combination with the BRARCHIVE options -s.

When you enter the option -b BRBACKUP is automatically started after the BRARCHIVE backup of the offline redo log files. Input syntax: -b [<brb_options>] Default: BRBACKUP and BRARCHIVE are called separately. BRBACKUP copies the data files. as well as all logs to the same tape(s) (as of Release 4. -d|-device This BRARCHIVE command option defines the backup device type.3 BR*Tools in Detail -b|-backup This BRARCHIVE command option starts BRBACKUP at the end of BRARCHIVE processing. Unattended backup of the offline redo log files on a tape followed by a startup of an offline backup on the same tape. the relevant default is used. you can use brbackup -a|-archive [Page 363]. brarchive -sd -c -b -m all -t offline -c See also: BRBACKUP and BRARCHIVE Backups in One Run [Page 120] Unattended Backup [Page 118] -c|-confirm This BRARCHIVE command option backs up in attended mode. then we recommend that you perform the tape management under control of BRBACKUP. The main advantage of this procedure is that you only have to start or schedule one program (usually BRBACKUP). Input syntax: -d tape|disk|pipe|tape_auto|pipe_auto|tape_box|pipe_box|util_file|stage| rman_util April 2004 385 . The second program is started automatically after the first program has ended. If you want to execute the BRBACKUP and BRARCHIVE backup procedure in one run. the backup of the data files and the offline redo log files takes place in separate backups on separate tapes. After the offline redo log files.4 BR*Tools for Oracle DBA 4. The option -b (including the additional options) must always be placed at the end of the BRARCHIVE command line call. If the backup is made to tape. See Command Options for BRBACKUP [Page 362]. For this. and with BACKINT). See -c|-confirm [Page 364]. You can also specify other options for BRBACKUP backup. Input syntax: -c [force] Default value: Confirmation messages are issued and user entry is expected.5A this is also possible to disk. If you do not specify any options. you can also use the tape capacity optimally.

if possible twice. util_file: Archiving with BACKINT – see the corresponding option in -d|-device [Page 366]. for example. stage: Remote disk. tape_auto or pipe_auto: The BRARCHIVE program generally only uses one tape for archiving (exception: archiving with -ss or -ssd). Therefore. See Backup with Automatic Tape Changers [Page 150]. but waits until a certain number (<number>) of files have accumulated in the archiving directory. you want to perform an offline backup and later restart BRARCHIVE.sap: backup_dev_type [Page 490] -f|-fill This BRARCHIVE command option fills up a backup volume by waiting for the next offline redo log files. suspend: Suspend BRARCHIVE processing that was started with -f. pipe: Archiving on a tape device of a remote system. See Names of the BRARCHIVE Detail Logs [Page 391]. This operation may take a while (some seconds/ a few minutes). and archives them on the volume as soon as they are created. specifying tape_auto or pipe_auto has no effect. BRARCHIVE must be started afresh for the backup of the next offline redo log files. These offline redo log files are then saved to tape as a group. Inspect the log written by BRARCHIVE. • • • 386 April 2004 . • • • See also: Parameters in init<DBSID>. such as two-step archiving. See Grouping Offline Redo Log Files [Page 394]. resume: Resume processing suspended with -f suspend. tape_box or pipe_box: Jukeboxes or autoloader tape devices which can be addressed locally or remotely.3 BR*Tools in Detail Default value: tape The following backup media are supported: • • • • • tape: Local tape device. When you select the -f option. disk: Local disk. BRARCHIVE waits for the next offline redo log files copied by ORACLE to the archiving directory.4 BR*Tools for Oracle DBA 4. This process is not stopped until the volume is full or the specified number of offline redo log files for processing has been reached. Offline redo log files should always be archived finally to tape. stop: A BRARCHIVE archiving run that was started with -f can be stopped properly using -f stop. Normally only use the option for archiving to disk in exceptional cases. rman_util: Archiving with Oracle Recover Manager (RMAN) and an external backup tool. • <number>: BRARCHIVE does not archive each offline redo log file individually. See RMAN Backup with an External Backup Library [Page 567]. See archive_copy_dir [Page 489]. No continuation tapes are created. Input syntax: -f [<number>|stop|suspend]|resume] Default value: Do not wait for the next offline redo log files to write them to the volume (tape). This can be useful if.

See Volume Management [Page 96]. -l|-language This BRARCHIVE command option sets message language. Input syntax: -l E|D Default value: E See -l|-language [Page 369]. Only tapes of this type can be used for archiving with BRARCHIVE. Input syntax: -i [force|show] Default value: no initialization. -k|-compress This BRARCHIVE command option sets compression mode. April 2004 387 . If you specify the option -i to initialize volumes (and -v has not been specified).3 BR*Tools in Detail -h|-help This BRARCHIVE command option provides help information. Input syntax: -m [<delay>] Default value: No delay Delay: The offline redo log files that are created are sent to the standby database before they are processed. See -i|-initialize [Page 368]. There they can be applied with a delay time of <delay> minutes after creating the Oracle offline redo log file. Use this option to initialize SAP volumes (tapes) or non-SAP volumes. See Hardware Compression for BBRACKUP [Page 361]. Input syntax: -k no|yes|hardware|only Default value: no (no compression) See -k|-compress [Page 368]. -i|-initialize This BRARCHIVE command option initializes tape volumes.4 BR*Tools for Oracle DBA 4. Input syntax: -h [version] Default value: No help See -h|-help [Page 367]. BRARCHIVE initializes the volumes specified in volume_archive. The option -k only has practically no meaning for BRARCHIVE as the information is not saved in the database. -m|-modify This BRARCHIVE command option applies the ofline redo log files to a standby database.

Input syntax: -p <profile> Default value: init<DBSID>. brarchive -m must be called in order to apply the offline redo log files. Input syntax: -n <number of logs>|<number of volumes> Default value: 10. you can use -n to specify the number of volumes (tapes) to initialize. see Standby Database [Page 133]. Input syntax: -o dist|time[.sap parameter volume_archive or those defined with the option -v. -q|-query This BRARCHIVE command option sets the query mode.000. 388 April 2004 . The preparation for an unattended archiving to tapes could be performed as follows (archiving is not started): • • • brarchive -q check to query the required tapes. number of volumes: Together with the option -i. See BRARCHIVE Detail Log [Page 392]. In other words. See -o|-output [Page 371]. The program processes practically all the existing offline redo log files (or volumes for volume initialization). the files in the init<DBSID>. -i force or -i show.4 BR*Tools for Oracle DBA 4. For more information. -p|-profile This BRARCHIVE command option defines the profile name.sap See -p|-profile [Page 371]. See -q|-query [Page 371]. Input syntax: -q [check] Default value: Archiving is started. The default value is 10.3 BR*Tools in Detail If there is a standby database. -o|-output This BRARCHIVE command option prints extra information to the log file.000 • • number of logs: Specify the number of offline redo log files to archive and/or delete. -n|-number This BRARCHIVE command option defines the number of offline redo log files or tape volumes to be processed. Mount the required tape.time|dist] Default value: The BRARCHIVE detail log is written in normal form. Enter cont to start the check of the mounted tape.

-ssd|-double_save_delete Archive the offline redo logs to two backup devices (tape devices) in parallel and then delete the files. The program will only delete offline redo log files if they have already been archived. -scd|-second_copy_delete Create a second copy of the offline redo log files that have already been archived and then delete these files. -ds|-delete_saved Delete offline redo log files that have been archived once. -s|-sc|-ds|-dc|-sd|-scd|-ss|-ssd|-cs|-cds This BRARCHIVE command option defines the BRARCHIVE function to be performed. Input syntax: -r <parameter_file> Default value: No parameter file See -r|-parfile [Page 372]. -sc|-second_copy Create a second copy of the offline redo log files which were already archived. Possible options: -s|-save|-sc|-second_copy|-ds|-delete_saved|-dc|-delete_copied| -sd|save_delete|-scd|-second_copy_delete|-ss|-double_save|-ssd|double_save_delete|-cs|-copy_save|-cds|-copy_delete_save Default value: -s You can start the following operations: • • • • • • -s|-save Archive the offline redo log files. -cs|-copy_save Create a second copy of offline redo log files that have already been archived and then archive the newly created offline redo log files. -dc|-delete_copied Delete offline redo log files that have been copied twice. April 2004 389 . -cds|-copy_delete_save Create a second copy of offline redo log files which were already archived.4 BR*Tools for Oracle DBA 4. • • • • BRARCHIVE will only perform the selected operation for the number of offline redo log files that you selected with the option -n. -ss|-double_save Archive the offline redo logs to two backup devices (tape devices) in parallel. -sd|-save_delete Archive offline redo log files and then delete these files.3 BR*Tools in Detail -r|-parfile This BRARCHIVE command option defines the BACKINT parameter file. These are then deleted and archiving of the newly created offline redo log files is begun.

Note that verification approximately doubles the archiving time required. -w|-verify This BRARCHIVE command option verifies the backup after the offline redo log files were saved. For security reasons. -ssd or -cds is used. If the option -s. It enables you to detect any possible hardware problems and undertake the appropriate measures. and compared with their originals. tape) in sequence. read by the check program. Input syntax: -u [<user>[/<password>]] Default value: system/manager See -u|-user [Page 374].sap If the option -v is not used. BRARCHIVE uses the volumes (tapes) specified in parameter volume_archive. Input syntax: -v <volume>|<volume list>|SCRATCH Default value: defined in init<DBSID>. see -v|-volume [Page 374]. -V|-VERSION This BRARCHIVE command option displays detailed information on the program modules and patches. verification is carried out immediately after archiving the individual offline redo log files. we recommend using this option at least once within the volume expiration period for your archiving with -s.4 BR*Tools for Oracle DBA 4. Parameters in init<DBSID>. However. all the saved files are read from the volume (e. you can use the option -cs or -cds to ensure that BRARCHIVE creates a second copy of the offline redo log files in a run. the file contents are compared in binary form. deletes them if necessary and immediately continues with archiving. Once the archiving phase is complete. This option can be used to make sure that the backup is readable and complete. the sizes of the archived files are determined and checked. Input syntax: -w Default value: No checks. decompressed (when compress = yes was used).g. -sc. See Log Supplements [Page 531]. -scd. You can also obtain this effect by calling BRARCHIVE first with the option -s and then with the option -sc or -scd. -sc. -ss or -cs.3 BR*Tools in Detail If only one tape device exists. in this case two BRARCHIVE calls are required.sap: archive_function [Page 489]. -v|-volume This BRARCHIVE command option defines the tape volumes to be used. -ss or -cs is used. For more information. 390 April 2004 . If the option -sd. When archiving to disk. -u|-user This BRARCHIVE command option defines user name and password.

2. qua: The BRARCHIVE option -q or -q check was used to display which volumes are to be used for archiving or make sure that those volumes were actually mounted. Then continues with the archiving of the files newly included in the archiving directory (option -cds). but no archiving was started. Archiving was performed on two tape devices in parallel (option -ssd). -i force or -i show was used to initialize a volume or display the information in the label. dsv: Archived redo log files were deleted (option -ds). see: Names of the BRARCHIVE Detail Logs [Page 391] BRARCHIVE Detail Log [Page 392] BRARCHIVE Summary Log [Page 392] Names of the BRARCHIVE Detail Logs Every detail log contains a name with the following format: a<encoded timestamp>. fst: The BRARCHIVE option -f stop was used to stop a BRARCHIVE run. ssv: Offline redo log files were archived twice. Then continues with the archiving of the files newly included in the archiving directory (option -cs). The extension (function ID) indicates the type of archiving.3 BR*Tools in Detail Input syntax: -V 4.4 • • • BRARCHIVE Logs For more information.3. • • April 2004 391 . cpd: Offline redo log files were archived a second time and then deleted from the archiving directory (option -scd). cma: The BRARCHIVE option -k only was used to perform a software compression. no archiving was started. Possible function IDs: • • • • • • • • • • sve: Offline redo log files archived for the first time (option -s).<ext> The first characters indicate the encoded time the archiving was performed (action ID). ssd: Offline redo log files were archived twice and then deleted. svd: Offline redo log files were archived and then deleted from the archiving directory (option -sd). cds: Archived offline redo log files were archived for a second time and deleted.4 BR*Tools for Oracle DBA 4. • • tia: The BRARCHIVE option -i. This can be used to determine the current compression rate of all offline redo log files. Archiving was performed on two tape devices in parallel (option -ss). cpy: Offline redo log files archived a second time (option -sc). dcp: Offline redo log files that had been archived twice were deleted (option -dc). cps: Archived offline redo log files were archived for a second time.

compression rate and the size of the compressed file (if compressed) – Archiving on disk #SAVED file name. See Log Supplements for BRBACKUP and BRARCHIVE [Page 531]. the compression rate 1:1 is selected for the offline redo log files (column rate in the display). name of tape. See Log Supplements for BRBACKUP and BRARCHIVE [Page 531].4 BR*Tools for Oracle DBA 4. the total number of processed offline redo log files). position of the file on the tape. The detail log file contains information about the actions that were performed in the course of the archiving. compression rate and the size of the compressed file (only if compressed) – Archiving using an external backup program #SAVED Backup ID returned by the external backup program This is followed by several closing messages (for example. The entries in the file provide the following information about each archiving run with BRARCHIVE: 392 April 2004 . Note that BRARCHIVE will only carry out archiving in parallel when started with one of the options -ss or -ssd. • • Displays the relevant parameters of initialization profile init<DBSID>. symbolic volume name and file position (only important for BRRESTORE).<ext>.3 BR*Tools in Detail BRARCHIVE Detail Log This section describes the information contained in a detail log (a<encoded timestamp>.time|dist] and/or the option -w causes the detail log to be supplemented. #SAVED: This entry varies depending on the type of archiving: – Archiving on Tape #SAVED file name. #INLOG: Name of the relevant profile/log (only when archiving with BACKINT). see Names of the BRARCHIVE Detail Logs [Page 391]). Archiving Flow The log will contain additional information when you start BRARCHIVE with the option -o dist|time or/and -w|-verify. BRARCHIVE Summary Log You can display a brief entry for every archived offline redo log file in the summary log arch<DBSID>. The archiving flow.sap that were set during the BRARCHIVE run. Log Supplements Using the option -o dist|time [. This information indicates which file was saved where. • • • #ARCHIVE: Name of the relevant offline redo log files. -o|-output [Page 388] and -w|-verify [Page 390].log. When you select -o dist and no compression rate is available yet.

time) specifying the end of the archiving process Compression rate and the size of the compressed file (if it was compressed) Archiving using an external backup program Action ID (encoded timestamp of the log name). start SCN (system change number) of the offline redo log file. #DELETED Information (action ID. time) specifying the end of the backup • • • #COPIED Information like under #SAVED when the offline redo log files were archived a second time. timestamp. internal flag for the BRARCHIVE command options. timestamp) about when the file was deleted. file size. Function ID (extension of the log name) Backup ID returned by the external backup program (if the util_file option was used.for tape_copy_cmd = rman_dd * for backup_dev_type = util_file & for backup_dev_type = rman_util @ for backup from disk backup with BACKINT Timestamp (date.4 BR*Tools for Oracle DBA 4. #* Information on the status of a BRARCHIVE run: ORACLE_SID. start SCN (system change number) of the offline redo log file. device type (values like in backup_dev_type or null when offline redo log files were only deleted). Function ID (extension of the log name) Name of tape/position of the file on tape. #DISK/#STAGE This information appears if you used the BRARCHIVE feature for archiving to local or remote disk: Log sequence number. the total compression rate (if compressed). #DISKDEL/#STAGEDEL Archiving to disk: information (action ID. function ID. and BRARCHIVE version. function ID. function ID. action ID. function ID. creation time. thread number. return code. timestamp). thread number #SAVED This entry depends on the type of archiving for the offline redo log files: Archiving on tape Action ID (encoded timestamp of the log name). name of the offline redo log file. • • #DISKSAV/#STAGESAV Archiving to disk: action ID. timestamps (date. when the file was deleted from archive directory. starting with the following: # for tape_copy_cmd = cpio $ for tape_copy_cmd = dd + for tape_copy_cmd = rman . compression rate and the size of the compressed file (if it was compressed). file size. name of the offline redo log files.3 BR*Tools in Detail • • #ARCHIVE Log sequence number. an asterisk "*" or "@" appears before the backup ID) Timestamp (date. time) specifying the start and the end of the BRARCHIVE run. • April 2004 393 . creation time. name of the file on the local or remote disk.

t1 to t5 . Previous save set 394 April 2004 . 4. you can prevent a possible overflow of the saparch archiving directory. which usually leads to the creation of a new save set. as shown in the following example. by using the command brarchive -f <number>. You can also collect a certain number of offline redo log files before BRARCHIVE backs them all up together on tape. timestamp) when the file was deleted from the disk backup directory #APPLIED Offline redo log file was applied to the standby database. It repeats this until either of the following is true: • • BRARCHIVE was stopped with call brarchive -f stop the maximum number of redo logs specified has been reached saparch saparch saparch saparch saparch saparch t1 t2 t3 t4 t5 t6 BACKINT . A reduction in the number of save sets by grouping the offline redo log files speeds up the backup.. function ID. every archiving action activates the interface and often repositions the tape. Save set 1 Save set 2 Current save set. ## You can enter user comments into the BRARCHIVE summary log with this prefix. If you use an external backup programs [Page 154] with the BACKINT interface.5 Use Grouping Offline Redo Log Files When you back up offline redo log files [Page 282] for your Oracle database. we recommend you to use this function.4 BR*Tools for Oracle DBA 4. In this case. you can group the files.3..3 BR*Tools in Detail • • • #DELDISK A copy of an offline redo log file on disk was deleted: information (action ID.2. BRARCHIVE saves these to tape. Example This example uses the following command: brarchive -sd -d util_file -f 5 After five offline redo log files have been created.. By using permanent backup of the offline redo log files with brarchive -f|-fill [Page 386]..

You can also restore the offline redo log files that were backed up with BRARCHIVE. and -r can be preset using the appropriate BRRESTORE profile parameters. -k.sap [Page 488]. This operation can be performed at the same time as the restore of the corresponding backup. -b last is selected. If you do not select any of these options. To do this.4 BR*Tools for Oracle DBA 4. You can manually specify a different directory as well. BRRESTORE also requires several parameters to be configured in the initialization profile init<DBSID>. It does not recover the database. the subdirectories in sapdata<n> directories are automatically created. In both cases. Only one of the options -a. The option -c only suppresses the first confirmation prompts for mounting a volume. BRRESTORE can be started with option -a in parallel to BRRESTORE with option -b or -n. See Effects of the Command Options [Page 535]. BRRESTORE automatically determines the files to be restored.1 Restoring Files BRRESTORE can be called directly from the operating system command level. BRRESTORE can also restore archived redo log files in parallel if they are located on several volumes.3.3 BR*Tools in Detail 4.3. • • BRRESTORE can run unattended when option -c force is set. However. This is the standard setting with exec_parallel [Page 502].3 Use BRRESTORE This SAP tool enables you to restore an entire database backup or parts of it. when necessary. • • The options -d. • Integration BRRESTORE only restores the selected backup. and the number of parallel copy processes must correspond to the number of tape devices. use the option -m full. April 2004 395 . when the backup was performed with BRBACKUP. several tape devices must be available. Any non-database files and directories you saved can also be restored. BRRESTORE can restore a database in parallel. -m. One or more incomplete BRRESTORE runs can be completed with the option -f. -b. BRRESTORE uses the BRBACKUP logs and the summary log from BRARCHIVE to decide where to restore the requested file. or -n can be set.3. • To restore a complete backup (reset the database). start the recovery afterwards using one of the following: • • • • BRRECOVER The SQLPLUS tool from Oracle – see Recovery with SQLPLUS Restoring Files Examples of BRRESTORE Runs For more information. A list of the command options can be found in the Command Options for BRRESTORE [Page 397]. In the process. see: 4.

Non-database files and directories must be defined with their complete path.2 Completion of BRRESTORE Runs If a BRRESTORE restore is incomplete.4 BR*Tools for Oracle DBA 4. Archived offline redo log files can be addressed using their log sequence numbers. A generic path must contain the directory SAPDATA_HOME and a generic specification (e.3. database files and non-database files are restored separately from each other.3 BR*Tools in Detail • The key word all can be combined with other options in an <object list> (for example.rsb If you want to complete a terminated BRRESTORE run.g. Online redo log files can only be addressed directly by using the redo log group numbers with an additional leading zero (0<n>). However. • • • • • • • 4. 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. The control file can only be addressed directly by using file ID 0. Single files from the backed up directory can also be restored. 396 April 2004 . as recommended. start BBRESTORE with the option f|-fillup [Page 401] and specify the log name of the BRRESTORE run to be completed. Database files Database files abnormal termination reload remaining files brrestore –m all brrestore –m all -f rcumxbqa. Database data files can be defined with either a full or generic path. specify file ID 00. To address all the online redo log files. specify all log names individually. non-database files or directories). When you start the restore of online redo log files or the control file. All the file IDs used in a specified interval <file_ID1>-<file_ID2> must be known in the database. sapdata<n> directory). If you want to complete several runs.3. if they were backed up in separate backup runs. the mirror copies of these files are automatically recreated. for example.

71-90=/oracle/C11/sapreorg Restore 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. Restore the mirror copies of the control file and the online redo log files.3. see -f|-fillup [Page 401].sap [Page 488] are used. See also: Completion of BRBACKUP Backups [Page 360] 4. 4. Restore the mirror copies of the control file.3. If you start BRRESTORE without command options. including the control file and the online redo log files. April 2004 397 .sap. the values in the Initialization Profile init<DBSID>.3 BR*Tools in Detail You can also use option -f last to complete the last BRRESTORE run. brrestore -b bcnmhluz. brrestore -a 40-69.01-04. brrestore -a 40-70=/oracle/C11/sapbackup. brrestore -m /oracle/C11/sapdata1=/oracle/C11/sapdata5 Restore all the database data files that were originally stored in the subdirectories of /oracle/C11/sapdata1 in directory /oracle/C11/sapdata5.0 Restore all the database data files with Oracle file IDs from 1 through 10. For more information.3.3. and the control file starting from the last successful backup. BRRESTORE restores the files of all tablespaces from the last successful backup of the database.aft -m full Restore all the files from backup bcnmhluz.4 Command Options for BRRESTORE This section describes the command options for BRRESTORE [Page 395].3 Examples of BRRESTORE Runs brrestore -b last -m all Restore all tablespaces without the control file and online redo log files. and those with the log sequence numbers from 70 through 100 in directory sapbackup. the four online redo log files. starting from the last successful backup. brrestore -m 0 Restore the control file. brrestore -a 200-220 Restore the archived redo log files with the log sequence numbers from 200 through 220 into the archiving directory.data5 Restore a database data file starting from the last successful backup. Unless otherwise specified in the initialization profile init<DBSID>.aft. brrestore -b last -m /oracle/C11/sapdata2/ddicd_5/ddicd. or option -f <days> to complete all BRRESTORE runs started in the last <day> days. brrestore -n det_log Restore a detail log to the local working directory. Restore the mirror copies of the control file and the online redo log files.70-100=/oracle/C11/sapbackup Restore the archived redo log files with the log sequence numbers from 40 through 69 in the archiving directory.4 BR*Tools for Oracle DBA 4. brrestore -b last -m 1-10. brrestore -m /usr/sap/C11/SYS/profile Restore the SAP profiles.

.time|dist]] [-p|-profile <profile>] [-q|-query [check]] [-r|-parfile <parameter_file>] [-w|-verify [use_dbv]] [-V|-VERSION] See also: -a|-archive|-a1|-archive1 [Page 399] -a2|-archive2 [Page 399] -b|-backup|-b1|-backup1 [Page 400] -b2|-backup2 [Page 400] -c|-confirm [Page 400] -d|-device [Page 400] -e|-execute [Page 401] -h|-help [Page 402] -k|-compress [Page 402] -l|-language [Page 402] -m|-mode [Page 402] -n|-number [Page 403] -n2|-number2 [Page 404] -o|-output [Page 404] 398 April 2004 .]<log_no_list>] [-a2|-archive2 [<DBSID>.<log_name2>..4 BR*Tools for Oracle DBA 4.]|<no. of days>|last] [-h|-help [version]] [-k|-compress no|yes|hardware] [-l|-language E|D] [-m|-mode all|all_data|full|incr|incr_only|incr_full|<tablespace>[=<rest_dir>]| <file_ID>[=<rest_dir>]|<file_ID1>-<file_ID2>[=<rest_dir>]| <generic_path>[=<rest_dir>]|<object list>|archive_logs] [-n|-number <file_pos>|init_ora|init_sap|reorg_log|det_log|sum_log|init_all|all_l og[=<rest_dir>]] [-n2|-number2 <back_file>=<rest_dest>] [-o|-output dist|time[. brrestore [-a|-archive|-a1|-archive1 [<DBSID>.]<log_no_list>] [-b|-backup|-b1|-backup1 <log name>|last] [-b2|-backup2 <util_backup_id> [-c|-confirm [force]] [-d|-device tape|disk|pipe|tape_auto|pipe_auto| tape_box|pipe_box|util_file|stage|rman_util] [-e|-execute <number>] [-f|-fillup <log_name1>[. these override the corresponding values in the initialization profile.]<log_no>[=<rest_dir>]| [<DBSID>.3 BR*Tools in Detail If you use BRRESTORE with command options (see below).]<log_no1>-<log_no2>[=<rest_dir>]|[<DBSID>.]<log_no1>-<log_no2>[=<rest_dir>]|[<DBSID>. To use the options. you can specify either the letter indicated or the complete word.]<log_no>[=<rest_dir>]| [<DBSID>.

]<log_no1><log_no2>[=<rest_dir>]|[<DBSID>.]<log_no_list> Default value: No restore of archived redo log files. If you use this option. in parallel. <log_no>: Log sequence number to specify the requested second copy of the offline redo log files.]<log_no1><log_no2>[=<rest_dir>]|[<DBSID>. Must be specified only for Oracle Parallel Server (OPS). -a2|-archive2 This BRRESTORE command option restores offline redo log files from the second copy. Input syntax: -a2 [<DBSID>. <log_no>: Log sequence number to specify the requested first copy of the offline redo log files. <rest_dir>: The restore directory where the archived redo log files will be restored. 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. the archiving directory (<SAPDATA_HOME>/saparch) is selected. If you do not specify a directory. April 2004 399 .]<log_no>[=<rest_dir>]|[<DBSID>. you can restore archived redo log files from several volumes simultaneously. Mount the requested volume in the backup device and enter cont to confirm that you want to start the restore. If you use this option. • • • • <DBSID>: Database instance ID. BRRESTORE checks the BRARCHIVE summary log to see which volume contains the required archived redo log files (in this case. • Under certain circumstances.]<log_no>[=<rest_dir>]|[<DBSID>.4 BR*Tools for Oracle DBA 4. Mount the requested volume in the backup device and enter cont to confirm that you want to start the restore. You cannot use this option to restore archived redo log files from a disk.3 BR*Tools in Detail -p|-profile [Page 404] -q|-query [Page 404] -r|-parfile [Page 405] -w|-verify [Page 405] -V|-VERSION [Page 405] -a|-archive|-a1|-archive1 This BRRESTORE command option restores offline redo log files from the first copy. You can also use this option when you restore archived redo log files from a disk. <log_no_list>: You can combine any specifications for the log sequence intervals. Input syntax: -a1 [<DBSID>. <log_no1>-<log_no2>: Log sequence number interval to specify the requested first copies of the offline redo log files. Separate the individual names with commas. the second copy of the offline redo log files). Must be specified only for Oracle Parallel Server (OPS). See Restoring Files [Page 395].]<log_no_list> Default value: No restore of archived redo log files. Do not use blanks. • • <DBSID>: Database instance ID.

tape device). You can use this option when you regularly make database copies to have a current test system available. If you specify the option -c. or when carrying out similar actions. Do not use the option -c force when recovering a database. confirmation messages that are output when the volume (e. Use option -m to define which files should be restored. -d|-device 400 April 2004 . In this case.g.<ext> from a BRBACKUP backup. <log_no_list>: See -a|-archive|a1|archive1 [Page 399].4 BR*Tools for Oracle DBA 4.g.3 BR*Tools in Detail • • <log_no1>-<log_no2>: Log sequence number interval to specify the requested second copies of the offline redo log files. See Structure-Retaining Database Copy [Page 115]. All other BRRESTORE confirmation messages must be responded to. force: When you specify the option -c force all confirmation messages are suppressed. See also: External Backup Programs [Page 154] -c|-confirm This BRRESTORE command option restores in unattended mode. tape) is mounted are suppressed. With this option you can reload backups which were executed with an external backup tool via the interface BACKINT. Input syntax: -b <log name>|last Default value: The last successful backup of the database is used (last). • -b2|-backup2 This BRRESTORE command option restores files calling backup tools with the BACKINT interface. Input syntax: -c [force] Default value: Confirmation messages are issued and user entry is expected. The requested objects will then be restored from that database backup. -b|-backup|b1|backup1 This BRRESTORE command option restores database files saved by BRBACKUP. • <log name>: Enter the name of the detail log file b<encoded timestamp>. last: The last successful database backup is used to restore the requested objects. BRRESTORE assumes that the correct volume has been mounted in the backup device (e. <rest_dir>. Input syntax: -b2 <util_backup_id>|#NULL <util_backup_id>: Backup ID of backup with an external tool #NULL: Restore from the last BACKINT backup. Follow the BRRESTORE confirmation messages in this case.

-f|-fillup This BRRESTORE command option completes the restore run. rman_util : Restoring with Oracle Recover Manager (RMAN) and an external backup tool. of days> April 2004 401 .4 BR*Tools for Oracle DBA 4. tape_auto or pipe_auto: Prompts for changing the tape will be suppressed. util_file: Use this option when you performed the backup file by file. of days lost>|last Default value: last BRRESTORE determines which files still have to be restored using the successfully restored files in one of the following: • • One or more BRRESTORE logs <log_name> All restores in a defined number of preceding days <no. using external backup programs.<log_name2>. If a parameter file is required. tape_box or pipe_box: Jukeboxes or autoloader tape devices which can be addressed locally or remotely.3 BR*Tools in Detail This BRRESTORE command option defines the restore device type.]|<no. The number of parallel copy processes can therefore only be reduced by setting this option. Input syntax: -d tape|disk|pipe|tape_auto|pipe_auto|tape_box|pipe_box| util_file|stage|rman_util Default value: tape Depending on which backup you want to restore from. • • • • • • • disk: Local disk.. stage: Remote disk.sap: backup_dev_type [Page 490]. This is only useful when you use a tape device with automatic tape changing. -e|-execute This BRRESTORE command option executes the restore in parallel. Input syntax: -f <log_name1>[.. tape: Local tape device. the maximum number of copy processes used corresponds to the number used for the backup. Input syntax: -e <n> Default value: 0 See -e|-execute [Page 367].. • See also: Parameters in init<DBSID>. specify its name in profile parameter util_par_file or with the option -r. See RMAN Backup with an External Backup Library [Page 567]. you can use this option to specify the backup media that was used. When restoring. pipe: Tape device of a remote system.

3 BR*Tools in Detail • The last restore run See also: Completion of BRRESTORE Runs [Page 396] -h|-help This BRRESTORE command option provides help information. -m|-mode This BRRESTORE command option defines the files to be restored. Input syntax: -l E|D Default value: E See -l|-language [Page 369]. -k|-compress This BRRESTORE command option sets compression mode. However. Parameters in init<DBSID>. hardware: BRRESTORE does not distinguish internally between no and hardware. Input syntax: -k no|yes|hardware Default value: no (no compression) If the value for decompression does not agree with the compression type from the backup being used when you start BRRESTORE.sap compress [Page 498]. • • yes: If you performed the backup with software compression and compress = yes is not set in the initialization profile. 402 April 2004 . Input syntax: -h [version] Default value: No help See -h|-help [Page 367]. BRRESTORE always decompresses the files that were saved with software compression. you should use this option. Input syntax: -m all|all_data|full|incr|incr_only|incr_full|<tablespace>[=<rest_dir>] |<file_ID>[=<rest_dir>]|<file_ID1><file_ID2>[=<rest_dir>]|<generic_path>[=<rest_dir>]|<object list>|archive_logs] Default value: all Specify the objects you want to restore with BRRESTORE: • all: The files in all tablespaces. an appropriate warning is issued. -l|-language This BRRESTORE command option sets the message language. but not the control files and online redo log files.4 BR*Tools for Oracle DBA 4.

Do not use blanks to separate the objects.. or directory. sapdata<n>) in the path.] <rest_dir>: The restore directory to which the requested files will be restored. See also new_db_home [Page 505] <object list>: You can specify a list of tablespaces or files. control files. incr_only: Restore changes to all files that were in the database at the time of the last full backup. incr_full: Restore files that have been added to the database since the last full backup. directories. In this case. archive_logs: The offline redo log files of a consistent BRBACKUP online backup (backup_type=online_cons). nondatabase file. <file_ID>: Data file with the specified Oracle file ID. <tablespace>: The files of this tablespace. -n|-number This BRRESTORE command option enables you to restore a file directly from the volume without having to specify the name of the backup log or the log sequence number. The individual objects are separated by commas. Specify a generic path to restore all the database data files whose name starts with that path. 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>.. always restore database files and nondatabase files in separate runs.3 BR*Tools in Detail • • all_data: The files in all tablespaces which are not pure index tablespaces. See "Restoring Incremental Backups with Structural Changes" in Profile Parameters and BRBACKUP Command Options [Page 378]. • • • • • • • • • • Parameters in init<DBSID>. 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>. online redo log files (complete offline backup) and offline redo log files (consistent online backup). If the generic path is a directory. the original directory from the backup log is selected. incr: Restore an incremental backup with Oracle Recovery Manager (RMAN). To address all the online redo log files. or combine the key words all with an object list. <n> is the redo log group number. See RMAN Restore of Incremental Backups [Page 564]. full: A complete backup. Input syntax: -n <file_pos>|init_ora|init_sap|reorg_log|det_log|sum_log|init_all|all_l og[=<rest_dir>] Default: None. <file_ID1>-<file_ID2>: The files specified by the file ID interval. use file ID 00.4 BR*Tools for Oracle DBA 4. If no directory is specified. the path must contain at least the SAPDATA_HOME directory and an additional generic specification (for example. <generic_path>: Enter a complete path to restore the required database file. April 2004 403 .sap: backup_mode [Page 492]. See "Restoring Incremental Backups with Structural Changes" in Profile Parameters and BRBACKUP Command Options [Page 378]. • <file_pos>: Specify the position of the file on the tape. including any non-database files. When possible. Control files have the file ID 0.

See -o|-output [Page 371]. sum_log: The summary BRBACKUP/BRARCHIVE log is restored.sap See -p|-profile [Page 371]. Input syntax: -q [check] 404 April 2004 . Input syntax: [-n2|-number2 <back_file>=<rest_dest>] Default: none -o|-output This BRRESTORE command option prints extra information to the log file.log are restored. the files will be restored to the current directory where BRRESTORE was started. all_log: Restores reorg<DBSID>.sap is restored. -n2|-number2 This BRRESTORE command option lets you restore a backup file to a specific restore destination.log. init_sap: The initialization profile init<DBSID>. Input syntax: -o dist|time[. This file is in position 3. These files are in the third-to-last position. <rest_dir>: Specifies the restore directory into which the requested files will be restored.time|dist] Default value: The BRRESTORE detail log is written normally.ora and init<DBSID>. -q|-query This BRRESTORE command option sets the query mode. reorg_log: The main log reorg<DBSID>. struct<DBSID>.log.3 BR*Tools in Detail • • • • • • • • init_ora: The profiles init<DBSID>. init<DBSID>.4 BR*Tools for Oracle DBA 4. If no directory is specified. This file is in the second-to-last position. init_all: Restores init<DBSID>.dba are restored These files have the position 2. Input syntax: -p <profile> Default value: init<DBSID>.log and the structure log struct<DBSID>.sap in one run.ora. det_log: The detail BRBACKUP/BRARCHIVE log is restored. detail and summary BRARCHIVE or BRBACKUP logs in one run.dba and init<DBSID>. See BRRESTORE Detail Log [Page 406]. -p|-profile This BRRESTORE command option defines the profile name. This file is in the last position.

Restoring the last check.250 and checking them for readability: brrestore -a 112-250 -w See also: Backup Verify [Page 122] -V|-VERSION This BRRESTORE command option displays detailed information on the program modules and patches. Input syntax: -V April 2004 405 . The restore is not started. followed by a check of the Oracle block structure using DBVERIFY: brrestore -b -w use_dbv Restoring the archived offline redo log files nos. files are read from backup media but not stored on disk. In either case. 112.4 BR*Tools for Oracle DBA 4. Input syntax: -r <parameter_file> Default value: No parameter file See -r|-parfile [Page 372]. you find out which volumes (tapes) must be mounted for the restore process and which additional sources the program needs. In this case. Input syntax: -u [<user>[/<password>]] Default value: system/manager -w|-verify This BRRESTORE command option verifies a backup of database files (BRBACKUP) or offline redo log files (BRARCHIVE). file are restored to compress_dir [Page 499]. With use_dbv. -u|-user This BRRESTORE command option defines user name and password.3 BR*Tools in Detail Default value: The restore process is started. When you select the -q option. -r|-parfile This BRRESTORE command option defines the BACKINT parameter file. verified with DBVERIFY and then deleted. • check: You can check whether the proper volumes have really been mounted in the backup devices. Input syntax: -w [use_dbv] Default value: No verification Without use_dbv. restore is not started. a normal restore is not performed.

and the symbolic volume name and file position 406 April 2004 . Restore flow. #NDBF: Indicates the full path and the name of the restored non-database file. rsf: Restore a file characterized by its position on the backup volume (option -n|number). see: Names of the BRRESTORE Detail Logs [Page 406] BRRESTORE Detail Log [Page 406] BRRESTORE Summary Log [Page 407] Names of the BRRESTORE Detail Logs Every detail log contains a name with the following format: r<encoded timestamp>. #RESTORED: This item varies depending on which backup medium was used to restore the file: – – Restore from tape Restore from disk #RESTORED Name of the file on tape.3. etc. file name/position as it was saved on the tape #RESTORED Complete name of the file on disk. rsa: Restore the offline redo log files specified by the log sequence numbers (option a|-archive|-a1|-a2). as it was saved.5 • • • BRRESTORE Logs For more information. Possible function IDs: • • • • rsb: Restore from a BRBACKUP backup (option -b|-backup|-b2). which volumes were mounted. The extension (function ID) indicates the type of the restore. #ARCHIVE: Indicates the full path and the name of the restored archived redo log file.4 BR*Tools for Oracle DBA 4. #FILE: Indicates the full path and the name of the restored file. #DIR: Indicates the full name of the restored directory. • • • • • • • Displays the relevant parameters of initialization profile init<DBSID>.sap that were set during the BRRESTORE run. qur: 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. No restore was started. BRRESTORE Detail Log The detail log file contains information about the actions that were performed during the restore process. You can precisely monitor which backup was used to restore the files.3.3 BR*Tools in Detail 4.<ext> The first characters indicate the encoded time the restore was performed (action ID).

BRRESTORE Summary Log You can display a brief entry for each restore in the summary log rest<DBSID>. time) specifying the end of the restore Return code Value of restore_mode [Page 510] Value of backup_dev_type [Page 490] Internal flags for the BRRESTORE command options BRRESTORE version 4.4 Use BRRECOVER The SAP tool BRRECOVER for Oracle databases is used as a database administration tool to help you recover your database.sap [Page 488] is configured properly. The information about the distribution of files on the volumes (if you use -o dist) refers to the time when the files were saved. See Log Supplements [Page 531] and o|-output [Page 404]. Familiarize yourself with the BRRECOVER command options [Page 408]. Integration You can use BRRECOVER from: • • The command line [Page 408] BRTOOLS [Page 295] with character-based menus or a GUI Prerequisites • • Make sure that the initialization profile init<DBSID>. The details of the restore times (-o time) refer to the restore process. time) specifying the start of the restore Timestamp (date.3 BR*Tools in Detail – Restore using an external backup program #RESTORED Backup ID returned by the external backup program when the file was backed up Log Supplements Using the option -o dist|time to start BRRESTORE causes the detail log to be supplemented.log.3.4 BR*Tools for Oracle DBA 4. Features You can use BRRECOVER to perform the following: • Complete database recovery April 2004 407 . 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.

If you use BRRECOVER with command options.ss>] [-r|-parfile <parfile>] [-s|-scroll <lines>] 408 April 2004 .sap Options brrecover [-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|rman_util|rman_disk|rman_stage|rman] [-e|-degree <number>] [-h|-help [version]] [-i|-interval <days>] [-l|-language E|D] [-own|-owner <own_name>|<own_name_list>] [-p|-profile <profile>] [-pit|-time <yyyy-mo-dd hh.3 BR*Tools in Detail • • • • • • 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.mi. see Restore and Recovery [Page 156].4.1 Command Options for BRRECOVER This section describes the command options for the BRRECOVER tool. To use the options. these override the corresponding values in the initialization profile init<DBSID>. Syntax The syntax of a BRRECOVER command is: brrecover [<options>] brrecover –type complete –profile initGC2.sap.3. BRRECOVER writes the following logs: • • BRRECOVER detail log [Page 414] BRRECOVER summary log [Page 416] 4.4 BR*Tools for Oracle DBA 4. you can specify either letter indicated or the complete word.

Input syntax: -b|-backup [<log_name>|last] Default: last • <log_name> : BRRECOVER restores database files from the BRBACKUP backup with the log name entered in < log_name > as b<encoded_timestamp>.4 BR*Tools for Oracle DBA 4.<function_id>.3 BR*Tools in Detail [-scn|-change <scn>] [-seq|-sequence <seq_nr>] [-seq1|-sequence1 <seq_nr>] [-t|-type complete|dbpit|tspit|reset|restore|apply|disaster] [-tsp|-tablespace <tsp_name>|<tsp_name_list>] [-u|-user [<user>[/<password>]]|/] [-V|-VERSION [ALL]] See also: -b|-backup [Page 409] -c|-confirm [Page 410] -d|-device [Page 410] -e|-degree [Page 411] -h|-help [Page 411] -i|-interval [Page 411] -l|-language [Page 411] -own|-owner [Page 412] -p|-profile [Page 412] -pit|-time [Page 412] -r|-parfile [Page 412] -s|-scroll [Page 412] -scn|-change [Page 412] -seq|-sequence [Page 413] -seq1|-sequence1 [Page 413] -t|-type [Page 413] -tsp|-tablespace [Page 413] -u|-user [Page 414] -V|-VERSION [Page 414] -b|-backup This BRRECOVER command option specifies a BRBACKUP run from which to restore the database files. last : BRRECOVER restores the files from the last successful database backup. • April 2004 409 .

util_file|util: Used for a recover created by external backup programs for fileby-file backup. pipe: Tape device of a remote system. 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. You need to respond to the prompts and menus generated by BRRECOVER. Input syntax: -c|-confirm [force] Default value: Attended mode. The drivers for the data transfer (cpio. disk: Local disk. You can use this option when you regularly make database copies for an up-to-date test system. and carefully check the default choices and input values suggested by BRRECOVER. it continues processing with the default value. This is only useful when you use a tape device with automatic tape changing (tape changing device). you might have to create a file containing the parameters required for that type of recover. You also have to check the default choices and input values suggested by BRRECOVER. all confirmation messages are suppressed.4 BR*Tools for Oracle DBA 4. BRRECOVER only stops at menus. stage: Restore from remote disk. dd) are defined in the parameters tape_address or tape_address_arch. • • • • 410 April 2004 . Do not use the option -c force when recovering a production database. In unattended mode. If a parameter file of this type is required. 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. Input syntax: -d|device tape|tape_auto|tape_box|pipe|pipe_auto|pipe_box| disk|stage|util_file|util|rman_util|rman_disk|rman_stage|rman Default: tape BRRECOVER supports the following backup media: • • • tape: Local tape device. If you use this option. BRRECOVER automatically selects default choices and accepts default input values in menus. tape_auto or pipe_auto: Prompts for changing the tape are suppressed. or for similar actions where you are certain of the outcome. follow the BRRECOVER prompts and menus. You have to use stage for disaster recovery if backups were done with rman_stage. In addition. force: When you specify the option -c force. In this case. tape_box or pipe_box: Jukeboxes or autoloader tape devices that can be addressed locally or remotely. At other prompts.3 BR*Tools in Detail -c|-confirm This BRRECOVER command option specifies whether the recovery is attended or unattended.

You have to use util for disaster recovery if backups were done with rman_util. See also: See backup_dev_type [Page 490] -e|-degree This BRRECOVER command instructs SQLPLUS to apply offline redo log files in parallel mode.4 BR*Tools for Oracle DBA 4. • rman_util|rman_disk|rman_stage|rman: Used for a backup with the Oracle Recover Manager (RMAN).3 BR*Tools in Detail you must specify the name of the file in the profile parameter util_par_file or with the option -r. -l|-language This BRRECOVER command option sets the message language to either English or German. Input syntax: -l E|D Default value: E (English) April 2004 411 . Input syntax: -h|-help [version] Default value: No help -i|-interval This BRRECOVER command specifies the interval in which BRRECOVER searches for backups.sap. -h|-help This BRRECOVER command option provides help information and command line options about the version of BRRECOVER specified.sap. or rman_stage for restore of database files and offline redo log files. You can specify rman instead of rman_util. This command corresponds to the parameter recov_interval [Page 508] in init<DBSID>. rman_disk. This command corresponds to the parameter recov_degree [Page 508] in init<DBSID>. Syntax: -i|-interval <days> Default: 30 brrecover -i 60 BRRECOVER searches for backups in the last 60 days. Input syntax: -e|-degree <number> Default value: Oracle default <number> specifies the number of Oracle recovery processes or threads running in parallel.

04 This command recovers the database to the state it was in on 15th March 2003 at 16. Input syntax: -r <parameter_file> Default value: No parameter file -s|-scroll This BRRECOVER command specifies the number of lines for scrolling in list menus. -scn|-change This BRRECOVER command specifies the last Oracle system change number for a point-intime (PIT) recovery. This option is not valid for BRGUI.3 BR*Tools in Detail -own|-owner This BRRECOVER command specifies the SAP owner for a tablespace point-in-time (PIT) recovery.sap -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. -r|-parfile This BRRECOVER command option defines the BACKINT parameter file.mi. Input syntax: -p <profile> Default value: init<DBSID>.27. Input syntax: -own|-owner <own_name>|<own_name_list> Default value: none -p|-profile This BRRECOVER command option defines the profile name.sap. Input syntax: -scn|-change <scn> Default value: none 412 April 2004 .27.ss> Default value: none brrecover -pit 2003-03-15 16. Syntax: -pit|-time <yyyy-mo-dd hh. Input syntax: -s|-scroll <lines> Default value: 20 This command corresponds to the parameter scroll_lines [Page 516] in init<DBSID>.04.4 BR*Tools for Oracle DBA 4.

-seq|-sequence This BRRECOVER command specifies the sequence number of the last redo log file for a point-in-time (PIT) recovery. Input syntax: -seq1|-sequence1 <seq_nr> Default value: none brrecover –seq1 18487 BRRECOVER recovers the database from the redo log file with the sequence number 18487. Input syntax: -seq|-sequence <seq_nr> Default value: none brrecover –seq 19094 BRRECOVER recovers the database to the redo log file with the sequence number 19094. -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 [Page 413].3 BR*Tools in Detail brrecover –scn 10401368920 BRRECOVER recovers the database to system change number 10401368920.sap. -tsp|-tablespace April 2004 413 . archivelogs) disaster: disaster recovery This command corresponds to the parameter recov_type [Page 509] in init<DBSID>. -t|-type This BRRECOVER command specifies the type of recovery. Input syntax: -t|-type complete|dbpit|tspit|reset|restore|apply|disaster Default value: complete • • • • • • • complete: complete database recovery dbpit: database point-in-time recovery tspit: tablespace point-in-time recovery reset: whole database reset restore: restore of individual backup files apply: apply offline redo log files (that is.4 BR*Tools for Oracle DBA 4.

Input syntax: -V|-VERSION [ALL] ALL: patch information is displayed for all BR*Tools 4. Use The file displays information about the: • • • • • • Relevant parameters from the initialization profile init<DBSID>. The user must have SYSDBA privileges.4 BR*Tools for Oracle DBA 4.3. see: BRRECOVER Detail Log [Page 414] BRRECOVER Summary Log [Page 416] BRRECOVER Detail Log Definition The detail log file contains full information about what happened during the recovery.4. Input syntax: -tsp|-tablespace <tsp_name>|<tsp_name_list> Default value: none -tsp psapstabd.3 BR*Tools in Detail This BRRECOVER command specifies the tablespaces to be recovered in a tablespace point-in-time (PIT) recovery. control files. and redo log files 414 April 2004 .2 • • BRRECOVER Logs For more information.sap [Page 488] 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.psapstabi BRRECOVER recovers only the tablespace psapstabd and psapstabi for a tablespace PIT recovery. data files. Input syntax: -u [<user>[/<password>]] Default value: system/<default_password> -V|-VERSION This BRRECOVER command option displays patch information for BRRECOVER. and the results Remounting of the database Status of the tablespaces. -u|-user This BRRECOVER command option defines the user name and password with which BRRECOVER connects to the database.

3 BR*Tools in Detail • Names of the database files to be restored and/or recovered Structure BRRECOVER detail logs have names of the following form: v<encoded timestamp>.crv 2003-01-29 19.ora /oracle/GC2 /oracle/GC2/dbs/initGC2.40 (0) BR0705I Start of database recovery: vdjwhllh.25 BR0101I Parameters Name oracle_sid oracle_home oracle_profile sapdata_home sap_profile recov_type recov_copy_dir recov_interval scroll_lines backup_dev_type system_info Generic_108528-15 sun4u make_info command_line Value GC2 /oracle/GC2 /oracle/GC2/dbs/initGC2. • Function ID The suffix <ext> indicates the restore type: crv : Complete database recovery dpt : Database point-in-time recovery tpt : Tablespace point-in-time recovery drs : Whole database reset rif: Restore of individual backup files alf: Restore and application of offline redo log files drv: Disaster recovery Example This is an example of the start of a BRRECOVER detail log for complete database recovery: BR0701I BRRECOVER 6.12.<ext> The name consists of: • Action ID This consists of the fixed character v and the <encoded time> that the recovery was performed.8 sun OCI_901 Jan 29 2003 brrecover -t complete -c force April 2004 415 .4 BR*Tools for Oracle DBA 4.sap complete /oracle/GC2/sapbackup 100 20 tape oragc2/oragc2 uw1030 SunOS 5.

stop.25 BR0307I Shutting down database instance GC2 .31 BR0330I Starting and mounting database instance GC2 .12.Reset input values Standard keys: c .12.12.back.help -----------------------------------------------------------------BR0280I Time stamp 2003-01-29 19.log..refr.12.4 BR*Tools for Oracle DBA 4.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.25 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 * Apply incremental backup 5 * Restore and apply archivelog files 6 * Open database 7 .Exit program 8 .. h .31 BR0308I Shutdown of database instance GC2 successful BR0280I Time stamp 2003-01-29 19. b . 416 April 2004 .. r .no operator confirmation allowed BR0280I Time stamp 2003-01-29 19..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 .41 BR0331I Start and mount of database instance GC2 successful BRRECOVER Summary Log Definition Each recovery run has an entry in the summary log recov<DBSID>. BR0280I Time stamp 2003-01-29 19. BR0280I Time stamp 2003-01-29 19.25 BR0134I Unattended mode with 'force' active .12.12.3 BR*Tools in Detail BR0280I Time stamp 2003-01-29 19.12. s .cont.

5 Use BRSPACE The SAP tool BRSPACE for Oracle databases enables you to manage the space in your database: • Instance administration: Start up database Shut down database Alter database instance Alter database parameter • Tablespace administration: Extend tablespace Create tablespace Drop tablespace Alter tablespace Alter data file Move data file • Segment management: Reorganize tables Rebuild indexes Export tables Import tables Alter tables Alter indexes Integration BRSPACE is one of the BR*Tools for Oracle database administration [Page 181]. it is fully integrated in your SAP system running with Oracle. time) specifying the start of the restore Timestamp (date. time) specifying the end of the restore Return code Value of recov_type [Page 509] BRRECOVER version 4. Therefore.3.4 BR*Tools for Oracle DBA 4. April 2004 417 .3 BR*Tools in Detail Structure The entries in the file provide the following information about each recovery using BRRECOVER: • • • • • • • Action ID (encoded timestamp of the detail log [Page 414] name) Function ID (extension of the detail log name) Timestamp (date.

which you can specify in the Initialization Profile init<DBSID>.1 Command options for BRSPACE This section describes the command options for the BRSPACE tool. these override the corresponding values in the initialization profile init<DBSID>. To use the options.4 BR*Tools for Oracle DBA 4. Activities You can use BRSPACE from the command line or with BRGUI or BRTOOLS.3 BR*Tools in Detail Features BRSPACE has many parameters.sap [Page 488]. see: • • Command Options for BRSPACE [Page 418] BRGUI or BRTOOLS: Database Instance Management with BR*Tools [Page 201] Space Management with BR*Tools [Page 216] Segment Management with BR*Tools [Page 243] 4.3. you can specify either the letter indicated or the complete word.5.sap [Page 488]. Syntax The syntax of a BRSPACE command is: brspace [<main_options>] -f|-function <function> [<function_options>] brspace -f dbparam –p circuits -v 24 Options brspace [-c|-confirm [force]] [-h|-help [<function>]|[version]] [-l|-language E|D] [-p|-profile <profile>] [-s|-scroll <lines>] [-u|-user [<user>[/<password>]]] [-V|-VERSION [ALL]] -f|-function <function> [<function_options>] See also: -c|-confirm [Page 471] -h|-help [Page 481] -l|-language [Page 482] -p|-profile [Page 482] -s|-scroll [Page 439] 418 April 2004 . For more information. If you use BRSPACE with command options.

3 BR*Tools in Detail -u|-user [Page 483] -V|-VERSION [Page 484] -f|-function [Page 471] -c|-confirm This BRSPACE command option specifies whether processing is attended or unattended. In unattended mode. At other prompts. Do not use the option -c force unless you are sure of the outcome because it might produce unexpected results.4 BR*Tools for Oracle DBA 4. You need to respond to the prompts and menus generated by BRSPACE. force: When you specify the option -c force. -f|-function This BRSPACE command option specifies the function to be performed. Input syntax: -c|-confirm [force] Default value: Attended mode. all confirmation messages are suppressed. You also have to check the default choices and input values suggested by BRSPACE. Input syntax: -f dbstart|dbshut|dbalter|dbparam|dbshow|tsextend|tscreate|tsdrop| tsalter|dfalter|dfmove|tbreorg|idrebuild|tbexport|tbimport| tbalter|idalter Default value: current status of database instance is displayed Function Options • • • • • • dbstart Starts the database [Page 420] dbshut Shuts the database [Page 421] dbalter Alters the database instance [Page 422] dbparam Alters database parameters [Page 422] dbshow Shows database information [Page 423] tsextend Extends a tablespace [Page 425] April 2004 419 . BRSPACE automatically selects default choices and accepts default input values in menus. In addition. it continues processing with the default value. BRSPACE only stops at menus. You should always enter a function.

• -i|-instance: Defines which database instances are to be started Syntax: -i all_down|<instance>|<instance_list> all_down starts all database instances that are currently down. even if SAP users are connected Default: does not force a restart. stopped <instance> starts the specified instance <instance_list> starts the specified instances Default: the database instance defined by the ORACLE_SID environment variable 420 April 2004 . see Starting Up the Database with BR*Tools [Page 202].4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail • • • • • • • • • • • tscreate Creates a tablespace [Page 426] tsdrop Drops a tablespace [Page 428] tsalter Alters a tablespace [Page 429] dfalter Alters a data file [Page 429] dfmove Moves a data file [Page 430] tbreorg Reorganizes a table [Page 431] idrebuild Rebuilds an index [Page 432] tbexport Exports a table [Page 433] tbimport Imports a table [Page 435] tbalter Alters a table [Page 436] idalter Alters an index [Page 437] -f dbstart This BRSPACE function [Page 419] starts the database instance. Function options: • -f|-force: If the database is running. forces an immediate shutdown then restarts the instance. that is. For more information.

even if SAP users are connected Default: Does not force a shutdown. that is. • -m|-mode: Defines the mode in which the database instance starts Syntax: -m normal|restrict|force normal starts the database instance normally restrict starts the database in restricted mode for database administration only force forces a shutdown abort and then a restart Default: normal • -s|-state: Defines the state of the database after startup Syntax: -s open|mount|nomount open opens the database for normal user access mount associates the database with its instance and evaluates control files nomount builds up the database instance and allocates operating system resources For more information on database states. • -i|-instance: Defines which database instances are to be shut Syntax: -i all_up|<instance>|<instance_list> all_up shuts all database instances that are currently up. see Shutting Down the Database with BR*Tools [Page 204]. Default: open -f dbshut This BRSPACE function [Page 419] shuts the database instance.4 BR*Tools for Oracle DBA 4. For more information. see the Oracle documentation. Function options: • -f|-force: Forces an immediate shutdown of the database instance. running <instance> shuts the specified instance <instance_list> shuts the specified instances Default: the database instance defined by the ORACLE_SID environment variable You only need to specify database instances in an Oracle Real Application Cluster (RAC) system. • -m|-mode: Defines the mode in which the database instance shuts Syntax: -m immediate|normal|transactional|abort immediate shuts the database immediately after ending all user sessions and stopping all transactions (open transactions are rolled back) April 2004 421 .3 BR*Tools in Detail You only need to specify database instances in an Oracle Real Application Cluster (RAC) system.

For more information. Function options: • -a|-action: specifies the action to change the state of the database instance Syntax: -a switchlog|checkpoint|archlog|noarchlog switchlog switches the current online redo log file checkpoint performs a database checkpoint archlog turns on archivelog mode noarchlog turns off archivelog mode The database must normally run in archivelog mode.4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail normal shuts the database cleanly after waiting for all users to disconnect. transactional shuts the database cleanly after waiting for all transactions to finish abort shuts the database immediately without rolling back open transactions For more information on shutdown modes. which means you cannot restore and recover the database in the event of a crash. Function options: 422 April 2004 . Default: none. see the Oracle documentation. see the Oracle documentation. Otherwise you have no record of database transactions. see Altering the Database Instance with BR*Tools [Page 206]. -f dbparam This BRSPACE function [Page 419] changes the value of database parameters. For more information. as required to change archivelog mode Default: does not force a shutdown if SAP users are connected. • -i|-instance: Defines which database instances are to be altered Syntax: -i <instance>|<instance_list> <instance> alters the state of the specified instance <instance_list> alters the state of the specified instances Default: the database instance defined by the ORACLE_SID environment variable You only need to specify database instances in an Oracle Real Application Cluster (RAC) system. see Altering Database Parameters with BR*Tools [Page 208]. Default: immediate -f dbalter This BRSPACE function [Page 419] alters the state of the database instance. For more information. since you must always specify an action • -f|-force: forces an immediate shutdown of the database instance to mount state.

For more information.4 BR*Tools for Oracle DBA 4. -f dbshow This BRSPACE function [Page 419] shows information on objects in the database. since you must always specify a parameter to change • -s|-scope: defines the scope of the parameter change Syntax: -s memory|spfile|both memory changes the parameter immediately for the specified running instances spfile changes the parameter in the Oracle spfile for the specified instances. • -p|-parameter: defines which database parameter is to be changed Syntax: -p <parameter> <parameter> changes the specified parameter Default: none. since you must always specify the new parameter value. see: Function options: • -c|-class: specifies the class of database information to be shown Syntax: -c <info_class> April 2004 423 .3 BR*Tools in Detail • -a|-action: specifies the action to change the database parameter Syntax: -a change|reset|create change changes a database parameter reset resets a database parameter create creates the init. since you must always specify an action • • -c|-comment: lets you enter a comment on the parameter change Default: No comment -i|-instance: defines for which database instance the parameter change is to apply Syntax: -i <instance> <instance> changes the parameter of the specified instance Default: changes the parameter for all instances You only need to specify database instances in an Oracle Real Application Cluster (RAC) system. but this takes effect only after the instance has been restarted both changes the parameter in both memory and spfile for the specified instances Default: both • -v|-value: defines the new parameter value Syntax: -v <value> <value> specifies the new parameter value Default: None.ora file from the spfile Default: None.

3 BR*Tools in Detail <info_class> can be: dbstate shows database instance status [Page 211] dbparam shows database parameters [Page 213] tsinfo shows tablespaces [Page 232] dfinfo shows data files [Page 234] rfinfo shows redo log files [Page 237] cfinfo shows control files [Page 239] dvinfo shows disk volumes [Page 241] tbinfo shows tables [Page 261] idinfo shows indexes [Page 264] tpinfo shows table partitions [Page 267] ipinfo shows index partitions [Page 269] sginfo shows segments [Page 272] seinfo shows segment extents [Page 274] feinfo shows free extents [Page 277] Default: dbstate • -f|-file: specifies the data file name Syntax: -f <file>|<file_id>|<file_list> <file>|<file_id>|<file_list> specifies the data file(s) Default: all files • -i|-index: specifies the index name Syntax: -i [<owner>. Default: all indexes • • -l|-log: logs database information shown Default: do not log -n|-instance: specifies the database instance name Syntax: -i <instance>|<instance_list> Default: all database instances • -o|-owner: specifies the SAP owner of the tables or indexes Syntax:-o <owner> <owner> specifies the name of the SAP owner Default: all SAP owners 424 April 2004 .]<prefix>%|%|[<owner>. see “Selecting Objects” in Segment Management with BR*Tools [Page 243].]<index>| [<owner>.]<index>|[<owner>.4 BR*Tools for Oracle DBA 4.]<prefix>*|*|<index_list>] Wildcards: “%” and “*” both mean final selection For more information on selection wildcards.

For more information.]<table>|[<owner>. Default: all tables -f tsextend This BRSPACE function [Page 419] extends a tablespace.4 BR*Tools for Oracle DBA 4. Default: generated automatically according to SAP naming conventions (recommended) • -i|-incrsize: defines the increment by which the file is extended if autoextend is set Syntax: -i <size> <size> specifies the size of the increment in MB Default: as for the last data file added to the tablespace April 2004 425 . see “Selecting Objects” in Segment Management with BR*Tools [Page 243].]<table>| [<owner>.]<prefix>*|*|<table_list>] Wildcards: “%” and “*” both mean final selection For more information on selection wildcards.]<prefix>%|%|[<owner>. Function options: • -a|-autoextend: sets autoextend mode for the data file so that Oracle automatically extends the tablespace as it grows Default: as for the last data file added to the tablespace • -f|-file: defines the data file to extend the tablespace Syntax: -f <file>|<sapdata_dir>|sapdata<N> <file> specifies the full name of the data file <sapdata_dir> specifies the path name to the sapdata directory where the new file will be located sapdata<N> specifies the name of the sapdata directory where the new file will be located BRSPACE automatically extends the incomplete file name to the full name using the SAP naming conventions [Page 44].3 BR*Tools in Detail • -p|-parameter: specifies which database parameters are to be shown Syntax: -p <parameter>|<parameter_list> <parameter> or <parameter_list> specifies the parameter(s) Default: all parameters • -s|-tablespace: specifies the tablespace name for the objects to be shown Syntax: -s <tablespace>|<tablespace_list> <tablespace> or <tablespace_list> specifies the tablespace(s) Default: all tablespaces • -t|-table: specifies the table name of the objects to be shown Syntax: -t [<owner>. see Extending a Tablespace with BR*Tools [Page 217].

such as to /oracle/temp. the new file is added as a symbolic link Syntax: -r <link dest> <link dest> specifies the link destination Default: no raw link • -s|-size: defines the data file size Syntax: -s <size> <size> specifies the data file size in MB Default: as for the last file added to the tablespace • -t|-tablespace: Defines the tablespace to be extended Syntax: -t <tablespace> <tablespace> specifies the tablespace name Default: none. the SAP convention is to specify a softlink in the directory /oracle/<DBSID>/sapraw For a link to a destination outside sapdata.4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail • -m|-maxsize: defines the maximum file size to which the file can be extended if autoextend is set Syntax: -m <size> <size> specifies the maximum file size in MB Default: as for the last data file added to the tablespace • -r|-rawlink: defines the destination of a raw disk or a link to a non-sapdata directory. according to SAP convention 426 April 2004 . see Creating a Tablespace with BR*Tools [Page 219]. since you must always define the tablespace name -f tscreate This BRSPACE function [Page 419] creates a new tablespace. Function options: • -a|-autoextend: sets autoextend mode for the data file so that Oracle automatically extends the tablespace as it grows Default: as for the last data file added to the database • -c|-contents: defines the contents of the new tablespace Syntax: -c data|temp|undo data: normal data contents temp: temporary tablespace for certain large-scale actions (for example. sorts) undo: undo tablespace For more information on temp and undo. see the Oracle documentation. Default: data • -d|-data: defines the type of data in the new tablespace. For more information. This is defined as follows: For a raw disk.

a pair of joined tablespaces. according to the old tablespace naming conventions.4 BR*Tools for Oracle DBA 4. PSAPSTABD and PSAPSTABI are. Syntax: -j <tablespace> <tablespace> specifies the joined tablespace name Default: follows SAP conventions • -m|-maxsize: defines the maximum file size to which the file can be extended if autoextend is set Syntax: -m <size> <size> specifies the maximum file size in MB Default: as for the last data file added to the database • -o|-owner: defines the SAP owner of the tables or indexes that will be located in the new tablespace – required in Multiple Components in One Database (MCOD) configurations Syntax:-o <owner> <owner> specifies the name of the SAP owner Default: no default in MCOD. Default: generated automatically according to SAP naming conventions in the sapdata directory used by the last file added to the database (recommended) • -i|-incrsize: Defines the increment by which the file is extended if autoextend is set Syntax: -i <size> <size> specifies the size of the increment in MB Default: as for the last data file added to the database • -j|-join: defines the tablespace joined to the tablespace already defined with the above parameters. For example.3 BR*Tools in Detail Syntax: -d table|index|both table: table data index: index data both: both table and index data – this is the current SAP recommendation Default: both • -f|-file: defines the first data file of the new tablespace Syntax: -f <file>|<sapdata_dir>|sapdata<N> <file> specifies the full name of the data file <sapdata_dir> specifies the path name to the sapdata directory where the new file will be located sapdata<N> specifies the name of the sapdata directory where the new file will be located BRSPACE automatically extends the incomplete file name to the full name using the SAP naming conventions [Page 44]. if option –d|-data was set to table or index. otherwise the single SAP owner • -p|-space: defines the type of Oracle segment space management in the tablespace April 2004 427 .

such as to /oracle/temp. This is defined as follows: For a raw disk. the new file is added as a symbolic link Syntax: -r <link dest> <link dest> specifies the link destination Default: no raw link • -s|-size: defines the tablespace file size Syntax: -s <size> <size> specifies the data file size in MB Default: as for the last data file added to the database • -t|-tablespace: defines the tablespace to be created Syntax: -t <tablespace> <tablespace> specifies the tablespace name [Page 44] Default: none. the SAP convention is to specify a softlink in the directory /oracle/<DBSID>/sapraw For a link to a destination outside sapdata. Function options: • • -f|-force: forces the tablespace to be dropped. since you must always define the tablespace name The options below all refer to the joined index tablespace. • • • • • • -xa|-xautoextend: refers to the joined index tablespace – see –a|-autoextend above -xf|-xfile: refers to the joined index tablespace – see –f|-file above -xi|-xincrsize: refers to the joined index tablespace – see –i|-incrsize above -xm|-xmaxsize: refers to the joined index tablespace – see –m|-maxsize above -xr|-xrawlink: refers to the joined index tablespace – see –r|-rawlink above -xs|-xsize: refers to the joined index tablespace – see –s|-size above -f tsdrop This BRSPACE function [Page 419] drops a tablespace. For more information. see Dropping a Tablespace with BR*Tools [Page 222].4 BR*Tools for Oracle DBA 4. even if not empty Default: tablespace only dropped if already empty -t|-tablespace: defines the tablespace to be dropped 428 April 2004 .3 BR*Tools in Detail Syntax: -p auto|manual auto: bitmap management manual: freelist management Default: auto • -r|-rawlink: defines the destination of a raw disk or a link to a non-sapdata directory.

Function options: • -a|-action: specifies the action to alter the tablespace Syntax: -a online|offline|autoext|fixsize|resize online sets the data file online offline sets the data file offline autoext switches on or maintains autoextend fixsize switches off autoextend resize resizes the data file April 2004 429 . Function options: • -a|-action: specifies the action to alter the tablespace Syntax: -a online|offline|begback|endback|coalesce online sets the tablespace online offline sets the tablespace offline begback sets backup status endback resets backup status coalesce coalesces free extents Default: none. see Altering a Data File with BR*Tools [Page 227]. For more information. since you must always define the action • • -f|force: forces offline mode Default: do not set offline if a SAP user is connected -m|-mode: defines the mode in which the tablespace is set offline Syntax: -m normal|immediate|temporary For more information on offline mode. since you must always define the tablespace name -f tsalter This BRSPACE function [Page 419] alters a tablespace. For more information. see the Oracle documentation. since you must always define the tablespace name -f dfalter This BRSPACE function [Page 419] alters a data file.3 BR*Tools in Detail Syntax: -t <tablespace> <tablespace> specifies the tablespace name Default: none. see Altering a Tablespace with BR*Tools [Page 224].4 BR*Tools for Oracle DBA 4. • -t|-tablespace: defines the tablespace to be altered Syntax: -t <tablespace>|<tablespace list> <tablespace> or <tablespace list> specifies the tablespace name(s) Default: none.

For more information. since you must always specify the maximum file size • -s|size: specifies the new data file size Syntax: -s <size> <size> specifies the size in MB Default: none. see Moving a Data File with BR*Tools [Page 229].4 BR*Tools for Oracle DBA 4. since you must always define the file name • -p|-parallel: specifies how many copy processes run in parallel to move multiple files Syntax: -p <count> 430 April 2004 . Function options: • • -c|force: forces database shutdown for move Default: do not force shutdown if a SAP user is connected -d|-destination: specifies the destination for the move Syntax: -d <sapdata_dir>|<sapraw_dir> <sapdata_dir>|<sapraw_dir> specifies a sapdata or sapraw (UNIX only) directory Default: none. since you must always define the file name • -i|incrsize: specifies the new data file increment size Syntax: -i <size> <size> specifies the size in MB Default: none. since you must always specify the new file size -f dfmove This BRSPACE function [Page 419] moves a data file. since you must always specify the move destination • -f|-file: specifies the data file name Syntax: -f <file>|<file_id>|<file_list> <file>|<file_id>|<file_list> specifies the data file(s) Default: none.3 BR*Tools in Detail Default: none. since you must always specify the new file increment size • -m|maxsize: specifies the new maximum data file size Syntax: -m <size> <size> specifies the size in MB Default: none. since you must always specify the action • • -c|force: forces offline mode and stop database Default: do not set offline or stop database if a SAP user is connected -f|-file: specifies the data file name Syntax: -f <file>|<file_id>|<file_list> <file>|<file_id>|<file_list> specifies the data file(s) Default: none.

4 BR*Tools for Oracle DBA 4. that is. the SAP convention is to specify a softlink in the directory /oracle/<DBSID>/sapraw For a link to a destination outside sapdata. such as to /oracle/temp. Default: yes • -i|-indts: specifies that a separate index tablespace is to be used to store the indexes Syntax: -i <tablespace> <tablespace> specifies the tablespace name Default: current index tablespace if option –n|-newts is not specified. Function options: • -d|-ddl: specifies how the Data Definition Language (DDL) statements for tables to be reorganized are handled Syntax: -d yes|no|first|only yes is the default and specifies that the DDL statements are generated and saved immediately before a table is reorganized no specifies that the DDL statements are not saved – we do not recommend this normally. the new table tablespace. although there is a small performance gain first specifies that all DDL statements are generated before the reorganization begins. no separate index tablespace • -n|-newts: specifies that the tables are reorganized to a new tablespace April 2004 431 . Processing then stops before the reorganization so that you can change the statements if required.3 BR*Tools in Detail <count> specifies the number of parallel copy processes Default: 1. If you change some attributes. see Reorganizing Tables with BR*Tools [Page 245]. There is no actual reorganization. This is defined as follows: For a raw disk. For more information. make sure that they: • • • Are syntactically correct Do not contain any new fields Are compatible with the SAP dictionary only specifies that only the DDL statements are generated and saved. a single process • -r|-rawlink: defines the destination of a raw disk or a link to a non-sapdata directory. that is. Otherwise. the new file is added as a symbolic link Syntax: -r <link dest> <link dest> specifies the link destination Default: no raw link -f tbreorg This BRSPACE function [Page 419] reorganizes tables.

]<prefix>%|%|[<owner>. “*” means final select For more information on wildcards for preselect and select. “*” means final select For more information on wildcards for preselect and select. Function options: • -i|-index: specifies the indexes to be rebuilt Syntax: -i [<owner>. Default: none. that is. Default: none.4 BR*Tools for Oracle DBA 4.]<prefix>%|%|[<owner>.]<table>|[<owner>. see “Selecting Objects” in Segment Management with BR*Tools [Page 243].3 BR*Tools in Detail Syntax: -n <tablespace> <tablespace> specifies the tablespace name Default: current tablespace where the tables are located • -o|-owner: defines the SAP owner of tables– useful for Multiple Components in One Database (MCOD) configurations Syntax: -o <owner> <owner> specifies the name of the SAP owner Default: no default in MCOD.]<table>| [<owner>.]<prefix>*|*|<index_list> Wildcards: “%” means preselect.]<prefix>*|*|<table_list> Wildcards: “%” means preselect. no parallel processing • -s|-tablespace: specifies the tablespace of the tables to be reorganized Syntax: -s <tablespace>|<tablespace list> <tablespace> or <tablespace list> specifies the tablespace name(s) Default: none • -t|-table: specifies the tables to be reorganized Syntax: -t [<owner>.]<index>|[<owner>. For more information. see “Selecting Objects” in Segment Management with BR*Tools [Page 243].]<index>| [<owner>. otherwise the single SAP owner • -p|-parallel: specifies parallel processing for the reorganization Syntax: -p <threads> <threads> specifies the number of processing threads running in parallel Default: 1. since you must always specify indexes for rebuild • -n|-newts: specifies that the indexes are rebuilt to a new tablespace Syntax: -n <tablespace> 432 April 2004 . since you must always specify tables for reorganization -f idrebuild This BRSPACE function [Page 419] rebuilds indexes. see Rebuilding Indexes with BR*Tools [Page 248].

]<table>|[<owner>. Default: none -f tbexport This BRSPACE function [Page 419] exports tables into an operating system file.4 BR*Tools for Oracle DBA 4.]<prefix>%|%|[<owner>. no parallel processing • -s|-tablespace: specifies the tablespace of the indexes to be reorganized Syntax: -s <tablespace>|<tablespace list> <tablespace> or <tablespace list> specifies the tablespace name(s) Default: none • -t|-table: specifies the tables of the indexes to be reorganized Syntax: -t [<owner>. For more information. that is.]<table>| [<owner>. Since this function directly uses the Oracle table export tool EXP.]<prefix>*|*|<table_list>] Wildcards: “%” and “*” mean preselect For more information on wildcards for preselect and select. see Exporting a Table with BR*Tools [Page 250]. Function options: • -b|-buffer: specifies the export buffer size Syntax: -b <size> <size> specifies the size in KB Default: 1024 • -c|-constraints: specifies whether table constraints are exported Syntax: -c yes|no Default: yes April 2004 433 .3 BR*Tools in Detail <tablespace> specifies the name of the new tablespace Default: current tablespace that the indexes are located in • -o|-owner: defines the SAP owner of the tables – useful for Multiple Components in One Database (MCOD) configurations Syntax: -o <owner> <owner> specifies the name of the SAP owner Default: no default in MCOD. otherwise the single SAP owner • -p|-parallel: specifies parallel processing for the rebuild Syntax: -p <threads> <threads> specifies the number of processing threads running in parallel Default: 1. see the Oracle documentation for more information on most of the parameters listed below. see “Selecting Objects” in Segment Management with BR*Tools [Page 243].

“*” means final select 434 April 2004 .4 BR*Tools for Oracle DBA 4. even if SAP users are connected Default: export is not forced if SAP user is connected -g|-grants: specifies whether table grants are exported Syntax: -g yes|no Default: yes • -i|-indexes: specifies whether table indexes are exported Syntax: -i yes|no Default: yes • -m|-compress: specifies whether table extents are compressed Syntax: -m yes|no Default: yes • -n|-consistent: specifies whether the export is consistent to a single point-in-time Syntax: -n yes|no Default: no • -o|-owner: defines the SAP owner of the tables to be exported – useful in Multiple Components in One Database (MCOD) configurations Syntax: -o <owner> <owner> specifies the name of the SAP owner Default: no default in MCOD.]<table>| [<owner>.]<prefix>%|%|[<owner>.]<table>|[<owner>.3 BR*Tools in Detail • -d|-direct: specifies whether direct path is used for the export mode Syntax: -d yes|no Default: yes • -e|-triggers: specifies whether table triggers are exported Syntax: -e yes|no Default: yes • • -f|-force: forces export. otherwise the single SAP owner • -r|-rows: specifies whether table rows are exported Syntax: -r yes|no Default: yes • -s|-tablespace: specifies the tablespace of the tables to be exported Syntax: -s <tablespace>|<tablespace list> <tablespace> or <tablespace list> specifies the tablespace name Default: none • -t|-tables: specifies the table(s) to be altered Syntax: -t [<owner>.]<prefix>*|*|<table_list> Wildcards: “%” means preselect.

see Importing Tables with BR*Tools [Page 253]. 2000 is the normal maximal dump file size. Default: none.4 BR*Tools for Oracle DBA 4. the maximum is 20000. see the Oracle documentation for more information on most of the parameters listed below. If your operating system has large file support. even if SAP users are connected Default: import is not forced if SAP user is connected -g|-grants: specifies whether table grants are imported Syntax: -g yes|no Default: yes • -i|-indexes: specifies whether table indexes are created Syntax: -i yes|no Default: yes • -m|-commit: specifies whether there is a commit after each array insert Syntax: -m yes|no Default: yes April 2004 435 . For more information.3 BR*Tools in Detail For more information on wildcards for preselect and select. Function options: • -b|-buffer: specifies the import buffer size Syntax: -b|-buffer <size> <size> specifies the size in KB Default: 1024 • -c|-constraints: specifies whether table constraints are imported Syntax: -c yes|no Default: yes • • -f|-force: forces import. since you must always select a table • -u|-dumpdir: specifies the export dump directory Syntax: -u <dir> <dir> specifies the dump directory name Default: work directory • -z|-filesize specifies the dump file size Syntax: -z <size> <size> specifies the maximal dump file size in MB Default: 2000/20000. -f tbimport This BRSPACE function [Page 419] imports tables from an operating system file. see “Selecting Objects” in Segment Management with BR*Tools [Page 243]. Since this function directly uses the Oracle import tool IMP.

that is.]<table|<table_list> Default: none • -x|-export: specifies the export file Syntax: -x <exp_run>|<exp_dump>|<exp_dump_list> <exp_run> specifies the BRSPACE run identifier. the BRSPACE log name <exp_dump> specifies the export dump file (not necessarily a BRSPACE export) <exp_dump_list> specifies a list of export dump files (not necessarily BRSPACE export dump files) Default: last export run • -y|-type specifies the type of import Syntax: -y full|tables|indexfile|show full imports everything tables imports individual tables as specified in the –t|-table parameter (see above) indexfile dummy import – the DDL statements are written to an SQL file but there is no import show shows the DDL statements in the export dump file but there is no import Default: full • -z|-filesize specifies the dump file size Syntax: -z <size> <size> specifies the maximal dump file size in MB Default: value from export -f tbalter 436 April 2004 .3 BR*Tools in Detail • -n|-ignore: specifies whether table creation errors are ignored Syntax: -n yes|no Default: no • -o|-owner: defines the SAP owner of the tables to be imported – useful in Multiple Components in One Database (MCOD) configurations Syntax: -o <owner> <owner> specifies the name of the SAP owner Default: no default in MCOD.4 BR*Tools for Oracle DBA 4. otherwise the single SAP owner • -r|-rows: specifies whether table rows are imported Syntax: -r|-rows yes|no Default: yes • -t|-tables: specifies the table(s) to be imported Syntax: -t [<owner>.

see Altering a Table with BR*Tools [Page 256].]<table>|[<owner>. For more information.4 BR*Tools for Oracle DBA 4. since you must always specify a table to alter -f idalter This BRSPACE function [Page 419] alters indexes.]<prefix>%|%|[<owner>. Default: none. For more information. Function options: • -a|-action: specifies the action to alter indexes Syntax: -a coalesce|parallel coalesce merges internal index data April 2004 437 . otherwise the single SAP owner • -s|-tablespace: specifies the tablespace of the tables to be altered Syntax: -s <tablespace>|<tablespace list> <tablespace> or <tablespace list> specifies the tablespace name(s) Default: none • -t|-table: specifies the tables to be altered Syntax: -t [<owner>. “*” means final select For more information on wildcards for preselect and select.]<prefix>*|*|<table_list> Wildcards: “%” means preselect. see Altering an Index with BR*Tools [Page 258].]<table>| [<owner>.3 BR*Tools in Detail This BRSPACE function [Page 419] alters tables. since you must always specify the action • -d|-degree: specifies the degree for parallel queries Default: 0 (use Oracle default) 1 specifies normal serial processing >1 specifies parallel query • -o|-owner: defines the SAP owner of the tables to be altered – useful in Multiple Components in One Database (MCOD) configurations Syntax: -o <owner> <owner> specifies the name of the SAP owner Default: no default in MCOD. see “Selecting Objects” in Segment Management with BR*Tools [Page 243]. Function options: • -a|-action: specifies the action to alter tables Syntax: -a monit|nomonit|parallel monit sets the monitoring attribute on nomonit sets the monitoring attribute off parallel sets the degree of parallelism for queries Default: none.

]<table>| [<owner>. Using this option. since you must always specify the action • -d|-degree: specifies the degree for parallel queries Default: 0 (use Oracle default) 1 specifies normal serial processing >1 specifies parallel query • -i|-index: specifies the indexes to be altered Syntax: [-i|-index [<owner>. you can obtain an overview of BRSPACE functions. otherwise the single SAP owner • -s|-tablespace: specifies the tablespace of the indexes to be altered Syntax: -s <tablespace>|<tablespace list> <tablespace> or <tablespace list> specifies the tablespace name(s) Default: none • -t|-table: specifies the table of the index(es) to be altered Syntax: -t [<owner>. Input syntax: -h [<function>]|[version] Default value: Display help information about all BRSPACE functions.]<index>|[<owner>.]<prefix>*|*|<index_list> Wildcards: “%” means preselect. “*” means final select For more information on wildcards. see “Selecting Objects” in Segment Management with BR*Tools [Page 243]. Default: none -h|-help This BRSPACE command option provides help information. 438 April 2004 .]<prefix>%|% |[<owner>. Default: none. • <function>: Displays help information about main options and specified functions only.]<table>|[<owner>. see “Selecting Objects” in Segment Management with BR*Tools [Page 243].4 BR*Tools for Oracle DBA 4. since you must always specify an index to alter • -o|-owner: defines the SAP owner of the indexes to be altered – useful in Multiple Components in One Database (MCOD) configurations Syntax: -o <owner>|<owner list> <owner> or <owner list> specifies the name of the SAP owner Default: no default in MCOD.]<index>|[<owner>.]<prefix>*|*|<table_list>] Wildcards: “%” and “*” mean preselect For more information on wildcards for preselect and select.3 BR*Tools in Detail parallel sets the degree of parallelism for queries Default: none.]<prefix>%|%|[<owner>.

Input syntax: -u [<user>[/<password>]] Default value: system/manager If you only enter -u .3 BR*Tools in Detail • version: Displays detailed information on the versions of the program modules. Input syntax: -p <profile> Default value: init<DBSID>. -s|-scroll This BRSPACE command specifies the number of lines for scrolling in list menus. You can enter the user name and the password separately (only enter the user name or the option -u <user> ). These measures are taken to protect the DBA password. This option is not valid for BRGUI. the value specified with this option applies. The tool then prompts entry of the password. If you want to use a different profile. -u|-user This BRSPACE command option defines the user name and password used by the SAP tool to log on to the database. In this case.sap. you do not have to specify the user and password if the operating system user belongs to the dba group. In shell scripts. -l|-language This BRSPACE command option sets the language for messages.4 BR*Tools for Oracle DBA 4. If this file is not in the standard directory <ORACLE_HOME>/dbs . an interactive query of the user name and the password is performed by the SAP tool. Input syntax: -l E|D Default value: E You can determine whether you want the messages to appear in English (E) or in German (D). and does not appear in the process list. Since BRSPACE connects to the database as SYSDBA. specify the name of the profile file here. you can structure the call as follows: April 2004 439 . Input syntax: -s <lines> Default value: 20 This command corresponds to the parameter scroll_lines [Page 516] in init<DBSID>. specify the complete path. The default becomes invalid if you specify another value by setting the environment variable BR_LANG (language variable). -p|-profile This BRSPACE command option defines the profile name. If you set option -l . the password is not displayed during entry.sap This profile is contained in directory <ORACLE_HOME>/dbs (UNIX) or <ORACLE_HOME>\database on Windows.

3 BR*Tools in Detail brspace -c -u -f stats <<END <user>/<password> END However.5. BRSPACE needs this to remotely manage the database instances. If you are working with an OPS$ user. use this command only if the option -c is active. For setups with Oracle Real Application Cluster (RAC).sap [Page 488] that were set during the BRSPACE run Function name Menus that were displayed and the options that you chose BRSPACE commands and results 440 April 2004 . -V|-VERSION This BRSPACE command option displays patch information for BRSPACE. use the following call: brspace -u / -c -f tsextend In this case. you normally have to specify the database user and password. Use The file displays information about the: • • • • Relevant parameters from the initialization profile init<DBSID>. Input syntax: -V [ALL] ALL: patch information is displayed for all BR*Tools 4. BRSPACE tries to log on to the database as OPS$ user (see Oracle documentation and information in the SAP Service Marketplace).4 BR*Tools for Oracle DBA 4.3. With this method.2 Definition BRSPACE Logs BRSPACE writes a series of logs to record what happens during processing: • • • • BRSPACE Detail Log [Page 440] BRSPACE Summary Log [Page 442] BRSPACE Structure Change Log [Page 443] BRSPACE Parameter Change Log [Page 447] BRSPACE Detail Log Definition The detail log file contains full information about what happened during the BRSPACE function. The OPS$ user must be defined in the database and have at least SYSDBA authorization. it is not necessary to specify the password when calling BRSPACE.

50 BR0101I Parameters Name oracle_sid oracle_home oracle_profile sapdata_home Value GC2 /oracle/GC2 /oracle/GC2/dbs/initGC2. • Function ID The suffix <ext> indicates the function type: dbr: Start up database dbs : Shut down database dba : Alter database instance dbp : Alter database parameter dbw: Show database information (default) tse: Extend tablespace tsc: Create tablespace tsd: Drop tablespace tsa: Alter tablespace dfa: Alter data file dfm: Move data file tbr: Reorganize tables idr: Rebuild indexes tbe: Export tables tbi: Import tables tba: Alter tables ida: Alter indexes Example This is an example of the start of a BRSPACE detail log for the function show database information: BR1001I BRSPACE 6.23.ora /oracle/GC2 April 2004 441 .<ext> The name consists of: • Action ID This consists of the fixed character s and the <encoded time> that the function was performed.4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail Structure BRSPACE detail logs have names of the following form: s<encoded timestamp>.dbw 2003-08-26 10.40 (0) BR1002I Start of BRSPACE processing: sdljsvqc.

audit_trail 7 .51 BR0659I List menu 257 + you can select one or more entries -------------------------------------------------------------------List of database parameters Pos.aq_tm_processes 3 . Parameter Modif.active_instance_count 2 .background_dump_dest /oracle/GC2/saptrace/bdump 9 .audit_file_dest ?/saptrace/audit 5 .3 BR*Tools in Detail sap_profile space_function space_copy_dir scroll_lines system_info Generic_108528-15 sun4u oracle_info sap_info make_info command_line /oracle/GC2/dbs/initGC2. * * * * * * * * * * FALSE 1048576 FALSE NONE partial Value <null> 1 0 1 . spfile both both spfile spfile spfile spfile both both spfile Inst.23.audit_sys_operations 6 .0 8192 8856 17005445 620 SAPR3 sun OCI_901 Aug 26 2003 brspace -f dbshow -c dbparam -l BR0280I BRSPACE time stamp: 2003-08-26 10.1.0.log.23.archive_lag_target 4 .50 BR1009I Name of database instance: GC2 BR1010I BRSPACE action ID: sdljsvqc BR1011I BRSPACE function ID: dbw BR1012I BRSPACE function: dbshow BR1034I Class of information to be shown: dbparam BR0280I BRSPACE time stamp: 2003-08-26 10.bitmap_merge_area_size BRSPACE Summary Log Definition Each executed BRSPACE function has an entry in the summary log space<DBSID>.4 BR*Tools for Oracle DBA 4. Structure 442 April 2004 .2.background_core_dump 8 .backup_tape_io_slaves 10 .8 GC2 9.sap dbshow /oracle/GC2/sapreorg 20 oragc2/oragc2 uw1030 SunOS 5.

42 idalter sdkxrftz dbr 2003-06-23 15.07 dbstart sdkxdpaq tbe 2003-06-24 20.40 (0) 2003-06-20 20.00 0 6.53.39.44.40 (0) 425984 /oracle/GC2/sapreorg 2003-06-24 20. example.27 tbalter sdkxdqes tba 2003-06-20 20.40 (0) 0000-00-00 00.54. sdkwipbg.22 tbalter sdkxdqhu ida 2003-06-20 20.40(0) tbexport 4 20000 1 425984 /oracle/GC2/sapreorg The combination of action id and function id – in the above.39.17.40 (0) 2003-06-24 20.40 (0) BRSPACE Structure Change Log Definition The structure change log contains a history of all database structure changes that you perform with BRSPACE.40 (0) 2003-06-23 15.49.4 BR*Tools for Oracle DBA 4.22 1 6.00.42 0 6.00 6 6.19 idrebuild sdkxdpvr tba 2003-06-20 20.52.41.25 tbimport 4 2003-06-20 20.3 BR*Tools in Detail The entries in the file provide the following information about each executed run of a BRSPACE function: Entry Example BRSPACE action id (encoded timestamp) BRSPACE function id Timestamp for start of BRSPACE run Timestamp for end of BRSPACE run Return code BRSPACE version Function Number of objects successfully processed The following only applies to tablespace export Max size of export dump file (MB) Number of export dump files Total size of export dump file (B) Export dump directory sdkwjpbg tbe 2003-08-28 18:05:24 2003-08-28 18:05:24 0 (successful) 6.tbe – represents the name of the BRSPACE detail log [Page 414].54. Structure changes consist of the following functions: April 2004 443 .41.20 tbexport 4 20000 1 sdkxdpdd tbi 2003-06-24 20.40.14 1 6. Example This is an example of a BRSPACE summary log: sdkxdoyh idr 2003-06-20 20.40 (0) 2003-06-20 20.30 0 6.56 4 6.17.

time) for when the structure change finished Tablespace name 2003-08-01 14.47. The first line is standard but the following lines vary according to the function.47.log and is located in the $SAPDATA_HOME/sapreorg directory.3 BR*Tools in Detail • • • • • Extend tablespace Create tablespace Drop tablespace Alter datafile (changes to file size attributes) Move datafile Use The file helps you to keep track of database structure changes. Structure The file is called struc<DBSID>. sdlfavte. time) for when you start BRSPACE for the structure change BRSPACE action id (encoded timespace) BRSPACE function ID Function name Effective and real user name 2003-08-01 14.27 PSAP2222 /oracle/GC2/sapdata4/2222_6/2222.tse – represents the name of the BRSPACE detail log [Page 414].18 sdlfavte tse tsextend user=oragc2/oragc2 The combination of action id and function id – in the above example.4 BR*Tools for Oracle DBA 4.data6 size=1M autoext=yes incrsize=1M maxsize=10M #FILEADD New datafile name Parameters for new datafile • Create tablespace 444 April 2004 . • Extend tablespace Line Entry Example #TSPEXT Timestamp (date. • Standard first line Line Entry Example #BRSRUN Timestamp (date.

data1 size=1M autoext=yes incrsize=1M maxsize=10M • Drop tablespace #TSPDROP Timestamp (date. time) for when the structure change finished Tablespace name Attributes of deleted tablespace 2003-08-01 14.50.data5 size=2M autoext=no April 2004 445 .4 BR*Tools for Oracle DBA 4.52.data1 size=1M • Alter datafile Switch on autoextend #FILEAUTO Datafile name Datafile parameters /oracle/GC2/sapdata4/2222_1/2222.3 BR*Tools in Detail Line Entry Example #TSPCRT Timestamp (date. time) for when the structure change finished Tablespace name Parameters for new tablespace 2003-08-01 14.35 PSAP3333D conts=data assm=auto data=table #FILEADD New datafile name Parameters for new datafile /oracle/GC2/sapdata4/3333d/3333d.41 PSAP4444I files=2 size=2M #FILEDEL Deleted datafile name Datafile parameters /oracle/GC2/sapdata4/4444i_1/4444i.data1 size=1M autoext=yes incrsize=2M maxsize=22M Switch off autoextend #FILEFIX Datafile name Parameters to specify the affected datafile /oracle/GC2/sapdata1/testd_5/ttttd.

data3 size=3M Example This is an example of part of a structure change log showing each of the functions described above: #BRSRUN. 2003-08-01 14. 2003-08-01 14..47. 2003-08-01 14.27 PSAP2222 size=1M #FILEADD. /oracle/GC2/sapdata4/4444i_2/4444i.31 user=oragc2/oragc2 #TSPCRT.50.data2 446 April 2004 ..47... /oracle/GC2/sapdata4/2222_6/2222..data2 #FILEMO VE New datafile name Old datafile name Datafile size oldfile=/oracle/GC2/sapdata2/1111d_3/1111d . time) for the move Tablespa ce 2003-08-01 17.35 data=table sdlfavvz tsc PSAP3333D func=tscreate assm=auto conts=data #FILEADD....data1 autoext=yes maxsize=10M incrsize=1M # #BRSRUN.. 2003-08-01 14.data1 #FILEDEL.. /oracle/GC2/sapdata4/4444i_1/4444i.52.29 user=oragc2/oragc2 #TSPDROP.data6 autoext=yes maxsize=10M incrsize=1M # #BRSRUN..18 sdlfavte tse func=tsextend user=oragc2/oragc2 #TSPEXT.41 sdlfawfd tsd PSAP4444I size=1M func=tsdrop size=2M size=1M size=1M files=2 #FILEDEL. /oracle/GC2/sapdata4/3333d_1/3333d. 2003-08-01 14....52.14 PSAP1111D /oracle/GC2/sapdata5/1111d_2/1111d.data1 size=8M oldsize=4M • Move datafile #TSP Timestam p (date. 2003-08-01 14.55.4 BR*Tools for Oracle DBA 4.48.3 BR*Tools in Detail Resize datafile #FILESIZE Datafile name Parameters for new and old size of datafile /oracle/GC2/sapdata6/testd_1/testd..

data5 autoext=no #FILEFIX...14 sdlfbmid dfm PSAP1111D size=8M size=8M func=dfmove #FILEMOVE..4 BR*Tools for Oracle DBA 4. /oracle/GC2/sapdata3/ttttd_1/ttttd. 2003-08-01 16. 2003-08-01 21.data1 autoext=yes maxsize=22M incrsize=2M #FILEAUTO.data1 autoext=no # #BRSRUN.37. /oracle/GC2/sapdata4/2222_1/2222.data3 size=3M BRSPACE Parameter Change Log Definition The parameter change log contains a history of all database parameter changes that you perform with BRSPACE.55. /oracle/GC2/sapdata5/1111d_3/1111d.data2 autoext=yes maxsize=22M incrsize=2M # #BRSRUN.data2 oldfile=/oracle/GC2/sapdata2/1111d_2/1111d.. /oracle/GC2/sapdata6/testd_1/testd.. 2003-08-01 17. /oracle/GC2/sapdata5/1111d_2/1111d.48.20 user=oragc2/oragc2 #TSP. It has the following structure: Line Entry Example April 2004 447 ...54.data2 size=3M #FILEMOVE.data1 oldsize=4M #FILESIZE... 2003-08-01 21.. Use The file helps you to keep track of database parameter changes.... /oracle/GC2/sapdata4/2222_2/2222.49 sdlfcdjw dfa PSAPTESTD func=dfalter #FILESIZE..06. /oracle/GC2/sapdata1/testd_5/ttttd.03 user=oragc2/oragc2 #TSP.. 2003-08-01 17.18 user=oragc2/oragc2 sdlfbgmk dfa func=dfalter size=2M size=4M #FILEFIX.3 BR*Tools in Detail # #BRSRUN. /oracle/GC2/sapdata6/testd_2/testd. 2003-08-01 16.06.36 user=oragc2/oragc2 sdlfbfns dfa func=dfalter size=2M size=1M #FILEAUTO...data2 oldsize=4M # #BRSRUN...data3 oldfile=/oracle/GC2/sapdata2/1111d_3/1111d. Structure The file is called param<DBSID>.log and is located in the $SAPDATA_HOME/sapreorg directory..

or both control_file_record_keep_time scope=both 2003-08-01 11.. 2003-08-01 10. Example This is an example of part of a parameter change log: #BRSRUN. sdlezzlu.09 control_file_record_keep_time scope=both #VALUE.03..3 BR*Tools in Detail #BRSRUN Timestamp (date... 2003-08-01 10. spfile..36.14 #PARCHNG – change parameter value Timestamp (date. spfile...41 sdlezzpd dbp func=dbparam user=oragc2/oragc2 oldval=[30] spfval=[<same>] 448 April 2004 .36. [32] # #BRSRUN.4 BR*Tools for Oracle DBA 4.. time) for when BRSPACE completes the parameter reset Name of parameter changed Scope – in memory.14 sdlezzlu dbp func=dbparam user=oragc2/oragc2 #PARCHNG.37.14 sdlezzlu dbp dbparam user=oragc2/oragc2 2003-08-01 10.dbp – represents the name of the BRSPACE detail log [Page 414].10 #PARRST – reset parameter value Timestamp (date. time) for when BRSPACE completes the parameter change Name of parameter changed Scope of change: in memory.36. #COMMENT (optional) Your comment For incremental backups The combination of action id and function id – in the above example. or both control_file_record_keep_time scope=both 30 10 10 #VALUE New parameter value Old value Value in spfile The value [null] means that Oracle now takes the default value for the parameter.37. time) for when you start BRSPACE for the parameter change BRSPACE action id (encoded timespace) BRSPACE function ID Function name (always dbparam) Effective and real user name 2003-08-01 10. 2003-08-01 10.

2003-08-01 14..39 scope=both #VALUE...35.3.... 2003-08-01 11..05. [null] # #BRSRUN.35 sdlfabwx dbp func=dbparam user=oragc2/oragc2 #PARRST. 2003-08-01 11. [33] # #BRSRUN.. 2003-08-01 11... 2003-08-01 11. which you can call yourself from the command line A utility tool..36. Activate incremental backups 4.30 control_file_record_keep_time scope=both #VALUE..13 sdlfaeuf dbp func=dbparam ser=oragc2/oragc2 #PARRST. [null] # #BRSRUN..10 control_file_record_keep_time scope=both #VALUE.........3 BR*Tools in Detail #PARRST.03. [null] # #BRSRUN.....38..33 sdlfaubx dbp func=dbparam user=oragc2/oragc2 #PARCHNG..03. 2003-08-01 11.26 scope=both #VALUE.35. 2003-08-01 14.28.29..07 sdlfaerr dbp func=dbparam ser=oragc2/oragc2 #PARCHNG... 2003-08-01 11. [30] oldval=[7] control_file_record_keep_time oldval=[33] control_file_record_keep_time spfval=[<same>] oldval=[32] control_file_record_keep_time oldval=[32] oldval=[32] spfval=[<same>] #COMMENT..6 Use BRCONNECT The SAP tool BRCONNECT for Oracle databases is used as: • • A database administration tool. 2003-08-01 11. in which you have more than one SAP System in the same Oracle database: April 2004 449 .15 scope=both #VALUE. which BRBACKUP [Page 359]calls in the background BRCONNECT is specially designed to administer multi-schema databases.4 BR*Tools for Oracle DBA 4..

3 BR*Tools in Detail C11 (R/3) Application Server SAPC11 C12 (CRM) Application Server SAPC12 Oracle Database Tables Tables SAPC11 SAPC12 Single Oracle Database Features • Database administration tool As a database administration tool. BRCONNECT has the following functions [Page 471]: Main functions. which write a detailed [Page 484]and a summary [Page 485] log Check database system. If you select backup mode online (backup_type = online). the database remains in this state during the backup. 450 April 2004 . -f cleanup [Page 473] Additional functions. -f crsyn [Page 475]– these are used by BR*Tools Start database. -f dbstate [Page 471] • Utility tool – monitor database status during a backup BRBACKUP starts BRCONNECT during the backup to see if the status of the database corresponds to the backup mode. which only write messages to the standard output device Change passwords of SAP database users. -f check [Page 472] Adapt next extents. If you select backup mode offline (backup_type = offline or backup_type = offline_force). -f dbshut [Page 475] Determine database state. -f stats [Page 477] Clean up old logs and trace files. -f chpass [Page 473] Create global synonyms. the database is shut down and remains in the closed state during the backup. -f dbstart [Page 471] Stop database. -f next [Page 475] Update statistics.4 BR*Tools for Oracle DBA 4.

6. This means that the database is left started. such as backup results. Activities For more information about using BRCONNECT from the command line. or it is shut down. After the backup. and so on Critical database messages in the Oracle alert file. such as configuration. such as log_archive_start = false When a critical situation is discovered. which you can specify in the Initialization Profile init<DBSID>. You can use BRCONNECT to check the following conditions: • • • • Database administration. BRCONNECT writes an alert message to the detail log [Page 484] and to the results table DBMSGORA. Prerequisites BRCONNECT can also use internal default conditions. if it was shut down before the backup.ora file.3. space management. such as ORA-00600 Incorrectly set database profile parameters in the init<DBSID>. The aim is to prevent database problems that might lead to downtime for the database. if it was running before the backup. Integration The check conditions are specified in the control table DBCHECKORA. which mostly correspond to the initial state of the DBCHECKORA table when we deliver it. see Monitoring the Oracle Database [Extern]. BRCONNECT Default Conditions for Database Messages April 2004 451 . BRCONNECT Default Conditions for Database Administration See BRCONNECT Default Conditions for Database Administration [Page 453]. For up-to-date information on the BRCONNECT default conditions. BRCONNECT Default Conditions for Database Operations See BRCONNECT Default Conditions for Database Operations [Page 458]. see SAP Note 435290.sap [Page 488]. For more information. state of the database. see Command Options for BRCONNECT [Page 470]. the database is always restored to its original status.1 Use Database System Check with BRCONNECT You can use BRCONNECT [Page 449] to check the Oracle database system. and so on Database operations. BRCONNECT has many parameters. Detected alerts are also reported to the database monitor (transaction RZ20). 4. BRCONNECT terminates the backup and displays the messages BR312E or BR313E.3 BR*Tools in Detail If the state of the database changes unexpectedly during the backup.4 BR*Tools for Oracle DBA 4. failed operations. You can change these with transaction DB17.

'Cannot switch to the next online redo log due to pending checkpoint'). 'Increase the size of online redo log files'. CORRNAME. CHKOP.4 BR*Tools for Oracle DBA 4. ' '. ACTIVE. ' '. depending on the changed recommendations and for new Oracle releases. CORRTYPE. PARAM. The following Oracle error codes are taken into account for the standard test conditions (-d option): ORA-00272 Error writing archive log ORA-00376 Database file cannot be read ORA-00600 Oracle internal error ORA-01113 Data file needs media recovery ORA-01115 I/O error reading database file ORA-01122 File verification check failed ORA-01135 Database file is offline ORA-01149 Cannot shutdown . MODFLAG. You can also search any texts (character strings) in the Oracle Alert file by specifying the text in the PARAM field. OBJECT. ' '. You can use transaction DB17 to easily adjust the test conditions for the database profile parameters. 'Y'. CHKVAL.data file in backup mode ORA-01555 Snapshot too old ORA-01562 Failed to extend rollback segment ORA-01578 Database block corrupted ORA-03113 End-of-file on communication channel ORA-07445 Exception encountered: core dump Checkpoint not complete You can easily add any Oracle error codes as new test conditions for database messages using transaction DB17. CHKDESC) VALUES ('ORA'. ' '. SEVERITY. MODDATE. ' '. REACTION. as in the following example: INSERT INTO DBCHECKORA (TYPE. 'D'. BRCONNECT searches the Oracle Alert log for corresponding Oracle error messages and might generate Alert messages. 'Checkpoint not complete'. MODUSER. ' '. CHKREP. ' '. Activities 452 April 2004 . UNIT. The standard test conditions for the database profile (-d option) correspond to the current SAP recommendations described in note 124361 and 180605 (SAP BW). REPUNIT. BRCONNECT Default Conditions for Database Profile Parameters These test conditions check the values of Oracle parameters. Since the search in the Oracle Alert file takes the upper/lower case spelling into account and the entry in the PARAM field is always converted into upper case letters using DB17. ' '.3 BR*Tools in Detail You can enter any Oracle error codes or error text as a condition name for this condition type. ' '. ' '. 'W'. the entry must be made using SQL with SQLPLUS.

daily). or exception). see Displaying Alert Messages from Database System Check [Extern]. You use transaction DB17 to configure database system check. Condition Severit y Description NOARCHIVELOG_MODE (previously NOARCHIVELOG) Error Checks whether the database is in NOARCHIVELOG mode. threshold values. You can exclude specified tables or indexes from the checks using the check_exclude parameter. • <.3 BR*Tools in Detail • You run the checks regularly (for example. This includes activating or deactivating check conditions and changing the threshold and severity levels (that is. see -f check [Page 472]. • • • For more information on the command line options for the database checks. For more information. For more information.4 BR*Tools for Oracle DBA 4. >= <number> The space used is larger than (or the same as) <number> % of the total space in the archiving directory. which is not allowed for production databases. • >. <= <number> The free space is smaller than (or the same as) <number> % of the total space in the archiving directory. This condition does not have test operands. <= <number> April 2004 453 . >= <number> The space used is larger than (or the same as) <number> K|M|G bytes. We recommend you to use the Database Planning Calendar in the SAP System for this. You use transaction DB16 to view alerts written by BRCONNECT to the results table DBMSGORA. ARCHIVER_STUCK (previously ARCHIVE_STUCK) Warning Checks the highest fill level of the archiving directory (by default. For more information. The OBJECT field is not specified for this condition. For more information. BRCONNECT Default Conditions for Database Administration The check conditions for database administration are specified in the control table DBCHECKORA. The OBJECT field is not specified for this condition. or value units. error. • <. threshold values. value units: • >. warning. Possible test operands. saparch or oraarch). see Database System Check with BRCONNECT [Page 451]. see Configuring Database System Check (Oracle) [Extern]. see Database System Check [Extern].

>= <number> The space used is larger than (or the same as) <number> K|M|G bytes.. SAPBACKUP. • <. Possible test operands. SAPDATA2. >= <number> The space used is larger than (or the same as) <number> % of the total space in the file system.4 BR*Tools for Oracle DBA 4. you can specify any other file systems by entering the full path of a directory from this file system into the field (you can use upper/lower case spelling in DB17 only as of the Service Packages mentioned in note 427673.. This condition does not have test operands. . threshold values. ORIGLOG. TABLESPACE_IN_BACKUP (previously TSP_BACKUP_MODE) Warning Checks whether there are tablespaces that have the BACKUP status although BRBACKUP is not active The OBJECT field is not specified for this condition. SAPDATA1. SAPREORG and SAPTRACE. TABLESPACE_OFFLINE (previously TSP_OFFLINE) Error Checks whether there are tablespaces that are offline. you can define different threshold values for individual file systems by specifying the file system in the OBJECT field of the DBCHECKORA table (transaction DB17). or value units. <= <number> The free space is less than (or the same as) <number> % of the total space in the file system. threshold values. Alternatively.3 BR*Tools in Detail The free space is smaller than (or the same as) <number> K|M|G bytes.. you can 454 April 2004 . TABLESPACE_FULL (previously TSP_FULL) Warning Checks the maximum level of tablespaces in the database. This condition does not have test operands. MIRRLOG. • <. <= <number> The free space is smaller than (or the same as) <number> K|M|G bytes. SAPDATA_HOME. The OBJECT field is not specified for this condition. SAPCHECK. • >. However. Here you can use the following keywords for the database file systems: ORACLE_HOME. value units: • >. All file systems are checked by default against the same threshold value. All tablespaces are checked by default against the same threshold value. or value units. threshold values. However. otherwise you have to use native SQL). FILE_SYSTEM_FULL (previously FS_FULL) Warning Checks the fill level of file systems on the database host. SAPARCH.

threshold values. • <. This condition does not have test operands. threshold values. INVALID_FILE_TYPE (previously FILE_TYPE_UNKNOWN) Error Checks whether there are database files that have an illegal operating system type. • >. • <.4 BR*Tools for Oracle DBA 4. REDOLOG_FILE_MIRROR Error Checks whether there are online redo log files that April 2004 455 . or value units. or value units. threshold values. This condition does not have test operands. The OBJECT field is not specified for this condition. DATA_FILE_MISSING (previously FILE_MISSING) Warning Checks whether there are data files that no longer exist in the file system. threshold values. value units: • >. This condition does not have test operands. <= <number> The free space is less than (or the same as) <number> % of the total space in the tablespace. threshold values. The OBJECT field is not specified for this condition. or value units. This condition does not have test operands. The OBJECT field is not specified for this condition. The OBJECT field is not specified for this condition. >= <number> The space used is larger than (or the same as) <test> K|M|G bytes. The OBJECT field is not specified for this condition. block raw files on Unix or compressed files on Windows. Possible test operands. >= <number> The space used is larger than (or the same as) <number> % of the total space in the tablespace. <= <number> The free space is smaller than (or the same as) <number> K|M|G bytes. threshold values. for example. CONTROL_FILE_MISSING (previously CONTROL_FILE_MISSING) Error Checks whether there are control files that no longer exist in the file system. or value units. or value units. This condition does not have test operands. DATA_FILE_MISMATCH (previously FILE_MISMATCH) Error Checks whether there are data files that are flagged as MISSING in Oracle control file. REDOLOG_FILE_MISSING (previously REDOLOG_MISSING) Error Checks whether there are online redo log files that no longer exist in the file system.3 BR*Tools in Detail define different threshold values for individual tablespaces by specifying the tablespace name in the OBJECT field of the DBCHECKORA table (transaction DB17).

A check is made to see whether the file system can be brought to overflow. Possible test operands. However. or value units. threshold values. However. threshold values. • <. you can define different threshold values 456 April 2004 . The OBJECT field is not specified for this condition. <= <number> Fewer than <number> extents can still be allocated. threshold values. Error Checks whether there are data files or online redo log files that are OFFLINE. threshold values. All tables or indices are checked by default against the same threshold value. The OBJECT field is not specified for this condition. This condition does not have test operands. The OBJECT field is not specified for this condition. All tables or indices are checked by default against the same threshold value. due to the existing parameter setting (NEXT and MAXSIZE) during the automatic file extension. you can define different threshold values for individual tablespaces by specifying the tablespace name in the OBJECT field of the DBCHECKORA table (transaction DB17). >= <number> More than <number> extents were already allocated • <. • >. or value units. CRITICAL_SEGMENT (previously CRITICAL_SEGS) Warning Checks whether there are tables or indexes that can bring the tablespace to overflow when up to 5 next extents are allocated. This condition does not have test operands. <= <number> Fewer than <number> % of the maximum number of extents can still be allocated.3 BR*Tools in Detail (previously REDOLOG_MIRROR) are not mirrored on the Oracle side. Error Checks whether there are control files that are not mirrored on the Oracle side. >= <number> More than <number> % of the maximum number of extents was already allocated. threshold values. This condition does not have test operands. The OBJECT field is not specified for this condition. This condition does not have test operands. value units: • >. CONTROL_FILE_MIRROR (previously CONTROL_MIRROR) FILE_OFFLINE (previously DF_OFFLINE) CRITICAL_FILE TOO_MANY_EXTENTS (previously MANY_EXTENTS) Warning Checks whether there are tables or indices.4 BR*Tools for Oracle DBA 4. or value units. or value units. for which the number of allocated extents exceeds the specified threshold value. Warning Examines the data files with an activated auto extend feature.

or value units. The OBJECT field is not specified for this condition. value units: <= <number> The tablespace overflows when you allocate up to 1. You can exclude individual tables and indexes or even complete tablespaces from certain checks that run at table or index level.4 BR*Tools for Oracle DBA 4. MISSING_STATISTICS (previously NO_OPT_STATS) Error Checks whether there are tables or indices that do not have any statistics. HARMFUL_STATISTICS Error Checks whether there are tables or indices that have statistics. you cannot add new conditions to the DBCHECKORA table. MISSING_INDEX (previously MISSING_INDEXES) Error Checks whether there are tables that do not have any indices and are not specified in the DBDIFF table exception.]<index> | <tablespace> | (<object_list>) April 2004 457 . PCTINCREASE_NOT_ZERO Error Checks whether there are tables or indexes for which the PCTINCREASE storage parameter is not equal to zero. or 5 next extents. IN_WRONG_TABLESPACE (previously TABLES_NOT_IN_TABLE_T ABLESPACE) Error Checks whether there are tables that not in a table tablespace or indices. This condition does not have test operands. 4. The OBJECT field is not specified for this condition. threshold values. although they should not have these (for example. threshold values. To do this. Possible test operands. The OBJECT field is not specified for this condition.]<table> | [<owner>. This condition does not have test operands. or value units. The OBJECT field is not specified for this condition. threshold values. threshold values. specify the objects in the check_exclude [Page 495] parameter: check_exclude = [<owner>. or value units.3 BR*Tools in Detail for individual tablespaces by specifying the tablespace name in the OBJECT field of the DBCHECKORA table (transaction DB17). The OBJECT field is not specified for this condition. threshold values. 3. This can lead to storage fragmentation and is not suitable for the SAP System. This condition does not have test operands. although they should have these. This condition does not have test operands. This condition does not have test operands. Since the check conditions for database administration are hard-coded in BRCONNECT (known as built-in check conditions). or value units. or value units. which are not in an index tablespace. threshold values. 2. pool and cluster tables).

cds The OBJECT field is not specified for this condition. This condition does not have test operands. or value units. ffp. MISSING_INDEX. LAST_STATS_FAILED Warning Checks whether the last update of the optimizer statistics with BRCONNECT failed. ssd. afp. aly These refer to the entire database. ffd. and. fnd. cpd. fft. HARMFUL_STATISTICS. This condition does not have test operands. This condition does not have test operands. CRITICAL_SEGMENT. fnt The OBJECT field is not specified for this condition. BRCONNECT takes the following function IDs into account: sve. see Database System Check with BRCONNECT [Page 451]. cps. threshold values. threshold values. afs. fnr. This condition does not have test 458 April 2004 . ffr. or value units. anp. ans. which is identified by a function ID specified in the OBJECT field of the DBCHECKORA table. For more information. BRCONNECT takes the following function IDs into account: sta. BRCONNECT takes the following function IDs into account: afd. anr. ant. afr. MISSING_STATISTICS. The OBJECT field is not specified for this condition. fns. LAST_BACKUP_FAILED Warning Checks whether the last complete backup of the database with BRBACKUP failed. ssv. cpy. threshold values. or value units. IN_WRONG_TABLESPACE. fnp.4 BR*Tools for Oracle DBA 4. ffs. svd.3 BR*Tools in Detail You can restrict the following check conditions in this way: TOO_MANY_EXTENTS. LAST_OPERATION_FAILED Warning Checks whether the last DBA operation failed. aft. Condition Severit y Description LAST_ARCHIVE_FAILED Warning Checks whether the last backup of the offline redo log files with BRARCHIVE failed. PCTINCREASE_NOT_ZERO BRCONNECT Default Conditions for Database Operations The check conditions for database operations are specified in the control table DBCHECKORA.

anr. ant. cpy. afp. BRCONNECT takes the following function ID into account: sta.3 BR*Tools in Detail operands. anp. where the OBJECT field is not yet defined in DBCHECKORA. STATS_TOO_OLD Warning Checks whether the last successful update of the Optimizer statistics with BRCONNECT is too old. BRCONNECT takes into account the following function IDs: afd. In SAP Releases 4. fft. cpd. >= <Number> D The last successful complete backup of the database is older than <number> day(s). ssv. threshold values. Possible test operands. you can define this condition by specifying the function ID in the PARAM field. ffp. value units: April 2004 459 . fnt The OBJECT field is not specified for this condition. fnp. BACKUP_TOO_OLD Warning Checks whether the last successful complete backup of the database with BRBACKUP is too old. BRCONNECT takes into account the following function ids: sve. ans. threshold values. ffr. threshold values.4 BR*Tools for Oracle DBA 4. svd. threshold values. ssd. afr. value units: >. fnr. and. ffs. aft. You can also use this convention in later (including current) SAP releases. fns. >= <number> D The last successful backup of the offline redo log files is older than <number> day(s). cps. Possible test operands. aly The OBJECT field is not specified for this condition. or value units. Possible test operands. cds The OBJECT field is not specified for this condition. afs.5. fnd. value units: >. ffd. ARCHIVE_TOO_OLD Warning Checks whether the last successful backup of the offline redo log files with BRARCHIVE is too old.0 and 4.

OPERATION_TOO_OLD Warning Checks whether the last successful DBA operation. 460 April 2004 . is too old. value units: >. Since the test conditions for database operations are programmed in a specific way in BRCONNECT (known as built-in test conditions). >= <number> D The last successful update of the optimizer statistics is older than <number> day(s).3. threshold values.5. This also makes sure that the value of MAXEXTENTS for a table or index is not less than the value defined in the TGORA or IGORA table. this is generally not necessary because operations can be monitored by the LAST_OPERATION_FAILED and OPERATION_TOO_OLD check conditions. You can also use this convention in later (including current) SAP releases.4 BR*Tools for Oracle DBA 4. However. the size of the next extent is determined using an algorithm.2 Use Adapt Next Extents with BRCONNECT You can use BRCONNECT [Page 449] to adapt the next extents size. >= <number> D The last successful DBA operation is older than <number> day(s). The standard size of the next extent for each category is defined in the tables TGORA (for tables) and IGORA (for indexes). Possible test operands. breaking up into a large number of small extents – because this reduces database performance. identified by a function ID specified in the OBJECT field of the DBCHECKORA table. 4. The aim is to avoid the structure of tablespaces deteriorating – that is.3 BR*Tools in Detail >.6. You can exclude specified tables or indexes from this function by using the next_exclude parameter. you can define this condition by specifying the function ID in the PARAM field. or by specifying function IDs in the PARAM field.0 and 4. you cannot add new check conditions to the DBCHECKORA table. Activities When a table requires adapting. where the OBJECT field is not yet defined in DBCHECKORA. Prerequisites The database tables and indexes are assigned to one of a number of categories. In SAP Releases 4.

BRCONNECT compares the value from step 8 with the current next extent size. 4. BRCONNECT reduces the value from step 7 to the next smaller multiple of 5 times the database block size. The tables are shown below at the end of this section. see -f next [Page 475]. BRCONNECT looks up the table in the DD09L table and selects the category given. size category 0 is assumed.4 BR*Tools for Oracle DBA 4. BRCONNECT works out the value of 10% of the space currently allocated to the table or index. see Adapt Next Extents [Page 460].. 7. if necessary reducing it to the value of next_max_size. 1.3 BR*Tools in Detail You can specify individual values for NEXTEXTENTS or MAXEXTENTS using the next_special parameter. 9. If the table is not there. it changes the NEXTEXTENT storage parameter of the table or index to the newly determined next extent size. If the next_special parameter is defined for the table. 2. Using this value. If there is a difference.. NEXT Values in TGORA/IGORA Size category NEXT value for table (KB) NEXT value for indexes (KB) 0 1 2 3 4 5 40 160 640 2560 10240 20480 40 80 160 640 2560 5120 April 2004 461 . 6. . 8. BRCONNECT always uses this instead of the value determined so far. BRCONNECT reduces the value from step 4 to the size of the largest free space segment in the tablespace. to reduce free space wastage. See also: Internal Rules for Determining Next Extent Size [Page 461] Internal Rules for Determining Next Extent Size This algorithm is used by BRCONNECT to determine the next extent size when a table needs adapting. The smallest possible value is 5 times the database block size. 3. The DD09L is a data dictionary table in which most SAP tables are entered. For more information on the command line options for adapting the next extents. 5. BRCONNECT compares the value from step 5 with the current value of NEXTEXTENT and chooses the larger value. BRCONNECT selects the next smaller category from the table TGORA (for tables) or IGORA (for indexes). For more information. BRCONNECT chooses the larger of the values from steps 2 and 3. If the required space is greater than the remaining free space in the tablespace and no file in the affected tablespace permits an autoextend.

Otherwise. as described here Prerequisite To use the CBO. For more information. The Oracle cost-based optimizer (CBO) uses the statistics to optimize access paths when retrieving data for queries. the database system uses the cost-based optimizer. it uses the rulebased optimizer.ora [Page 42] is set to CHOOSE. InfoCube tables [Page 466]for the SAP Business Information Warehouse (SAP BW) Integration You can update statistics using one of the following methods: • DBA Planning Calendar in the Computing Center Management System (CCMS) For more information. resulting in poor performance.3 Use Update Statistics with BRCONNECT You can use this BRCONNECT [Page 449] function to update the statistics on the Oracle database for the cost-based optimizer. you make sure that the database statistics are up-todate. • BRCONNECT. From Release 4. the CBO might generate inappropriate access paths (such as using the wrong index).4 BR*Tools for Oracle DBA 4. If statistics are available for a table.0. see Update Statistics for the Cost-Based Optimizer in CCMS (Oracle) [Extern]. except where partitioned tables are explicitly excluded by setting the active flag in the DBSTATC table to I. We recommend you to use this approach because you can easily schedule update statistics to run automatically at specified intervals (for example. BRCONNECT supports update statistics for the following: • • Partitioned tables. see SAP Note 424243. the CBO is a standard part of the SAP System. weekly). The DBA Planning Calendar uses the BRCONNECT commands. so improving database performance.3 BR*Tools in Detail 6 7 8 9 10 11 12 13 14 40960 81920 163840 327680 655360 1310720 2621440 5242880 10485760 10240 20480 40960 81920 163840 327680 655360 1310720 2621440 4.6. If the statistics are out-ofdate. 462 April 2004 .3. By running update statistics regularly. make sure that the parameter OPTIMIZER_MODE in the Oracle initialization profile init<DBSID>.

. It runs using the OPS$ user without operator intervention. see force with Update Statistics [Page 463]. using one of the following tools to schedule it on a regular basis (for example.. Checks each table to see if the statistics are out-of-date 2. For more information. see -f stats [Page 477]. as described above in "Integration. see -f stats [Page 477]. BRCONNECT: .3 BR*Tools in Detail Features BRCONNECT performs update statistics using a two-step approach.4 BR*Tools for Oracle DBA 4. updates the statistics on the table immediately after the check For more information about how update statistics works. including pool and cluster tables brconnect -u / -c -f stats -t psapbtabd -f allsel • Update statistics without check for all tables relevant to the application monitor brconnect -u / -c -f stats -t dbstatc_mon -f collect April 2004 463 . Only use these options in exceptional circumstances. we recommend you to perform the standard update statistics. • Check and update statistics for all tables in tablespace PSAPBTAD. For more information about the -force options. Unless you have special requirements. 1. -force with Update Statistics This section gives examples of how you can use the -force options to override the internal rules for update statistics [Page 465]. If required. Activities You can influence how update statistics works by using the -force options. see Internal Rules for Update Statistics [Page 465]. The following are also standard commands that you can use to update statistics: • • Update statistics only for tables and indexes with missing statistics brconnect -u / -c -f stats -t missing Check and update statistics for all tables defined in the DBSTATC table brconnect -u / -c -f stats -t dbstatc_tab Example For examples of how you can override the internal rules for update statistics [Page 465]. weekly): • • DBA Planning Calendar." A tool such as cron (UNIX) or at (Windows NT) to execute the following standard call: brconnect -u / -c -f stats -t all This is also adequate after an upgrade of the database or SAP System.

4 BR*Tools for Oracle DBA 4. Pool and cluster tables and tables that have the ACTIVE flag set to N or R in the DBSTATC control table should not normally have statistics. However. You can delete such damaging statistics immediately: brconnect -u / -c -f stats -d To delete statistics for other tables as well (only for test purposes). the statistics are immediately deleted. enter the following command: 464 April 2004 .method... Second phase: Update statistics on tables identified in the first phase brconnect -u / -c -f stats -t all -f nocheck Deletion of Damaging Statistics Use This section describes how BRCONNECT deletes damaging statistics for the cost-based optimizer of the Oracle database. Finally. using brconnect -f stats -t all. This is an alternative to DBVERIFY.keep • . BRCONNECT checks whether such damaging statistics exist and deletes them if so. If you want to keep the statistics – for example. the scope of the checks is not the same. Example To check the structure of all tables and their indexes in the tablespace PSAPBTABD. Activities In the standard update statistics run.sdbad -d -f allsel Verification of Table and Index Structure Use This section describes how you can use BRCONNECT for the Oracle database to check the internal structure of table and index blocks.3 BR*Tools in Detail • Update statistics for a pool table specified in the DBSTATC table. since such statistics can negatively affect database performance. as follows: brconnect -u / -c -f stats -t rfblg -m EI -s P10 -f allsel.sample. for test purposes – you must include the keep option in the command. First phase: Check statistics brconnect -u / -c -f stats -t all -f nocoll b. using method "estimate 10% rows" brconnect -u / -c -f stats -t atab -m EI -s P10 -f allsel. to determine space usage.method.sample BRCONNECT stores the space usage data in tables DBSTATTORA (for tables) and DBSTATIORA (for indexes). Check and update statistics according to the two-phase concept: a. you can use the option -f allsel: brconnect -u / -c -f stats -t sdbah.

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

brconnect -u / -c -f stats -t psapbtabd -v cascade

This type of verification locks the tables and indexes being checked in Oracle 8.1. Therefore, only use it when database activity is low. Starting with Oracle 9, tables and indexes are no longer locked.

Internal Rules for Update Statistics
This algorithm is used by BRCONNECT to update statistics. For more information, see Update Statistics with BRCONNECT [Page 462].
...

1. BRCONNECT determines the working set of tables and indexes to be checked and updated. To do this, it uses: Options -t|-table and -e|-exclude, as described in -f stats [Page 477] (these options take priority) stats_table [Page 522] and stats_exclude [Page 520] parameters 2. If the working set contains pool, cluster or other tables that have the ACTIVE flag in the DBSTATC table set to N or R, BRCONNECT immediately deletes the statistics for these tables, because they negatively affect database performance. 3. BRCONNECT checks statistics for the remaining tables in the working set, including tables that have the ACTIVE flag in the DBSTATC table set to A or P, as follows: If the table has the MONITORING attribute set, BRCONNECT reads the number of inserted, deleted, and updated rows from the DBA_TAB_MODIFICATIONS table (this is available from Oracle 8.1 onwards). Otherwise, BRCONNECT uses the standard method (see table below) to update statistics by using the unique index.

BRCONNECT uses the following standard method to check and update a table's statistics:

• •

Method and sample defined for the table in the DBSTATC table (has highest priority) Method and sample from the options -m|-method or -s|-sample of -f stats -method [Page 477] (takes priority) or the stats_method [Page 521] and stats_sample_size [Page 522] parameters

• Default method and sample (has lowest priority) The following table describes the default method:
Number of rows in table Analysis method Sample size

Rows 10,000 <= 100,000 <= 1,000,000 <= 10,000,000 <= Rows Rows Rows Rows

< 10,000 < 100,000 < 1,000,000 < 10,000,000

C E E E E P30 P10 P3 P1

Analysis method C means compute the statistics exactly. Analysis method E means estimate the statistics using the sample size specified.

April 2004

465

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

For example, “E P10” means that BRCONNECT takes an estimated sample using 10% of rows. For the CH, CX, EH, and EX methods, histograms are created. For the CI, CX, EI and EX methods, the structure of indexes is validated in addition to collecting statistics. 4. BRCONNECT uses the number of new rows for each table in the working set, as derived in the previous step, to see if either of the following is true: Number of new rows is greater than or equal to number of old rows * (100 + threshold) / 100 Number of new rows is less than or equal to number of old rows * 100 / (100 + threshold) The standard threshold is 50, but the value defined in -f stats -change [Page 477] or the stats_change_threshold [Page 519] parameter is used if specified. 5. BRCONNECT immediately updates statistics after checking for the following tables: Tables where either of the conditions in the previous step is true Tables from the DBSTATC table with either of the following values:


ACTIVE field U ACTIVE field R or N and USE field A (relevant for the application monitor)

6. BRCONNECT writes the results of update statistics to the DBSTATTORA table and also, for tables with the DBSTATC history flag or usage type A, to the DBSTATHORA table. 7. For tables with update statistics using methods EI, EX, CI, or CX, BRCONNECT validates the structure of all associated indexes and writes the results to the DBSTATIORA table and also, for tables with the DBSTATC history flag or usage type A, to the DBSTAIHORA table. 8. BRCONNECT immediately deletes the statistics that it created in this procedure for tables with the ACTIVE flag set to N or R in the DBSTATC table.

Update Statistics for InfoCube Tables
Use
The InfoCube tables used in SAP Business Information Warehouse (SAP BW) and Advanced Planner and Optimizer (APO) need to be processed in a special way when the statistics are being updated. Usually, statistics should be created using histograms, as described in SAP Note 129252. Statistics for the InfoCube tables can be updated, together with other tables in a run. In this case, the statistics for the InfoCube tables are always created with histograms. You specify which tables are to be handled as InfoCube tables using the init<DBSID>.sap parameter stats_info_cubes [Page 520].

Prerequisites
The control table RSNSPACE for Business Information Warehouse (BW) and Advanced Planner and Optimizer (APO) dynamically determines which tables are to be handled as InfoCube tables. The content of the control table might change in future.

Features
Tables whose names start with the following prefixes are dealt with by BRCONNECT as InfoCube tables:

466

April 2004

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

/BIC/F*, /BIC/A9F*, /BI0/F*, /BI0/A9F*, /BIC/E*, /BIC/A9E*, /BI0/E*, /BI0/A9E*, /BIC/D*, /BIC/A9D*, /BI0/D*, /BI0/A9D*, /BIC/S*, /BIC/A9S*, /BI0/S*, /BI0/A9S*, /BIC/X*, /BIC/A9X*, /BI0/X*, /BI0/A9X*, /BIC/Y*, /BIC/A9Y*, /BI0/Y*, /BI0/A9Y*, /BIC/I*, /BIC/A9I*, /BI0/I*, /BI0/A9I*, /BIC/P*, /BIC/A9P*, /BI0/P*, /BI0/A9P*, /BIC/Q*, /BIC/A9Q*, /BI0/Q*, /BI0/A9Q*
The above list provides the default value of the init<DBSID>.sap parameter stats_info_cubes, that you can use to include the following kinds of tables in the list of InfoCube tables:

• •

Groups with names starting with a certain prefix Individual tables in the list of InfoCube tables

To include the above default list, specify the keyword DEFAULT in the first position, as in the following example: stats_info_cubes = (DEFAULT, XYZ*) To suppress special handling of the InfoCube tables completely, use the keyword NULL: stats_info_cubes = NULL If certain prefixes are omitted in the parameter definition, the corresponding tables are not to be handled as InfoCube tables. However, we do not recommend you to do this. For additional, special handling of InfoCube tables, you can use the keyword INFO_CUBES for the following:

• •

BRCONNECT with the -f stats function [Page 477] using the -t|-table and -e|exclude options

init<DBSID>.sap parameters:
stats_table [Page 522] stats_exclude [Page 520] stats_dbms_stats [Page 519]

April 2004

467

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

The function of this keyword is to ensure that only InfoCube tables are processed in accordance with the selected parameter settings.

Examples
• • • brconnect -u / -c -f stats -t info_cubes
Statistics are only checked for InfoCube tables and updated, if required

brconnect -u / -c -f stats -t all -e info_cubes
Statistics are checked for all tables besides InfoCube tables and updated, if necessary.

stats_dbms_stats = INFO_CUBES:R:4 brconnect -u / -c -f stats -t all
Statistics are checked for all tables and updated, if necessary. New statistics for InfoCube tables are created with the DBMS_STATS package using row sampling and an internal parallel degree of 4. For more information, see stats_dbms_stats [Page 519].

brconnect -u / -c -f all
This is the default. Statistics are checked for all tables and updated, if necessary. If InfoCube tables are present and selected following the update check, statistics are generated for them using histograms.

In the current SAP standard system, all InfoCube tables are entered in control table DBSTATC with active flag "I" (ignore). This means that InfoCube tables from BRCONNECT are ignored and not processed at all. Before you can process them, the corresponding DBSTATC entries must be changed or deleted. Alternatively, you can use option -f allsel to force processing of InfoCube tables, for example: brconnect -u / -c -f stats -t info_cubes -f allsel

4.3.6.4 Changing Database User Passwords with BRCONNECT
Use
You can use BRCONNECT to change the password of database users, such as SAPR3 or SAP<SAPSID>.

Do not leave the passwords for the database user set to the default values.

Procedure
...

For more information, see -f chpass [Page 473].

Result
BRCONNECT stores the new password as follows:
User Table Encryption (from Release 4.5B)

SAPR3

"OPS$<ORACLE_SID>ADM".SAPUSER

Stored as SAPR3-CRYPT

468

April 2004

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

SAP<SAPSID>

"OPS$<SAPSID>ADM".SAPUSER

Stored as SAP<SAPSID>CRYPT

In the case of the SAP<SAPSID> user, <SAPSID> refers to the SAP System ID. For example, if the SAP System ID is C11, the SAP<SAPSID> user is SAPC11, stored in the table OPS$C11ADM.SAPUSER. The first character of <SAPSID> must be a letter and there is no distinction between uppercase and lowercase. Database users other than SAPR3 and SAP<SAPSID> are not stored in SAPUSER database tables.

4.3.6.5 Clean Up Old Logs and Trace Files with BRCONNECT
Use
You can use BRCONNECT [Page 449] to clean up old log files, disk backups, export files, trace files and database logs. The aim is to avoid unnecessary use of disk space by deleting files that are no longer required.

Features
BRCONNECT cleans up the following files:

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

Detailed BRARCHIVE logs in the saparch directory Detailed BRBACKUP logs in the sapbackup directory Detailed BRCONNECT logs in the sapcheck directory Detailed BRRESTORE logs in the sapbackup directory Detailed BRSPACE logs in the sapreorg directory BRBACKUP disk backups of the database files BRARCHIVE disk backups of the offline redo log files BRSPACE export dump and export script directories Oracle trace and audit files Log records in the SDBAH and SDBAD tables Log records in the XDB tables Database check results in DBMSGORA table

Activities
Using the cleanup parameters in the Initialization Profile init<DBSID>.sap [Page 488] you can determine how old the objects are before they are deleted. For example, see cleanup_brarchive_log [Page 495]. For more information on the command line options for cleaning up the log files, see -f cleanup [Page 473].

4.3.6.6

Additional BRCONNECT Functions

April 2004

469

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

Use
These additional BRCONNECT [Page 449] functions only write messages to the standard output device.

Features

Change Passwords of Database Users You can use this function to specify a new password for all SAP database users. At the same time, the encrypted password in the SAPUSER table is changed. The work processes of the application server use this password to connect to the database. For more information, see -f chpass [Page 473].

Setting Up SAP DBA Synonyms You can use this function to specify the SAP System for database administration activities in a multi-schema database. You can then start and monitor database actions in the specified SAP System. For more information, see -f crsyn [Page 475].

Starting the Database Instance You can start the database instance using -f dbstart. There are no function options for this.

Stopping the Database Instance You can use this function to stop the database instance. BRCONNECT first checks whether an SAP System is still running. For more information, see -f dbshut [Page 475].

Determine Database State You can use this function to determine the database state. The return codes have the following meanings: 0 – Database is running 1 – Database is stopped 2 – Database is in nomount or mount state 3 – Error, database status cannot be determined There are no function options for this.

4.3.6.7

Command Options for BRCONNECT

This section describes the command options for the BRCONNECT tool. If you use BRCONNECT with command options, these override the corresponding values in the initialization profile init<DBSID>.sap [Page 488]. To use the options, you can specify either the letter indicated or the complete word.

Syntax
The syntax of a BRCONNECT command is:

brconnect [<command_options>] -f|-function <function> [<function_options>]

470

April 2004

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

brconnect -output detail -function check -default

Options
brconnect [-c|-confirm] [-h|-help [<function>]|[version]] [-l|-language E|D] [-o|-output detail|process|summary|[,]time] [-p|-profile <profile>] [-q|-query [check]] [-s|-sapsid <sid>|<sid_list>] [-u|-user [<user>[/<password>]]] [-V|-VERSION] -f|-function <function> [<function_options>]
See also:

-c|-confirm [Page 471] -h|-help [Page 481] -l|-language [Page 482] -o|-output [Page 482] -p|-profile [Page 482] -q|-query [Page 483] -s|-sapsid [Page 483] -u|-user [Page 483] -V|-VERSION [Page 484] -f|-function [Page 471]

-c|-confirm
This BRCONNECT command option activates processing in unattended mode. Input syntax: -c|-confirm Default value: Confirmation required for processing to be started. Use this option if BRCONNECT is started by an automatic scheduler such as cron (UNIX) or at (Windows NT).

-f|-function
This BRCONNECT command option specifies the function to be performed. You must always enter a function. Input syntax: -f chpass|crsyn|dbshut|dbstart|dbstate|check|cleanup|next|stats

April 2004

471

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

Default value: None, since you must always specify a function option

Function Options
• • • • check
Checks the database system [Page 472]

chpass
Changes the password of SAP database users [Page 473]

cleanup
Cleans up database logs [Page 473]

crsyn
Creates public synonyms for tables [Page 475] used by BRARCHIVE, BRBACKUP, BRCONNECT.

• • • • •

dbshut
Shuts down the database [Page 475]

dbstart
Starts up the database (no additional options)

dbstate
Checks the database state (no additional options)

next
Adapts next extents [Page 475]

stats
Updates optimizer statistics [Page 477]

-f check
This BRCONNECT function [Page 471] checks the database system. For more information, see Database System Check [Page 451]. Function options:

-d|-default: Uses internal BRCONNECT default settings to check the database system
Input syntax: -d Default value: Uses settings from the control table DBCHECKORA .

-e|-exclude: Defines tables and indexes to be excluded from the check
Input syntax: -e [<owner>.]<table>,[<owner>.]<index>,<tablespace>|<object_list>|non _sap|all_part|null

non_sap means that non-SAP objects (for example, Oracle dictionary objects) are excluded from the check. all_part means that SAP partitions (such as in Business Information Warehouse and Advanced Planner and Optimizer) are excluded from the check.

472

April 2004

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

null invalidates the exclusion list defined by the check_exclude [Page 495] parameter. This means that no tables are excluded from processing.
Default value: no exclusion You can use this option to exclude tables or indexes with exceptional space parameters or statistics handling. This option overrides the check_exclude [Page 495] parameter.

-o|-owner: Defines the database owner of tables and indexes to be checked
Input syntax: -o <owner1>[,<owner2>,...] Default value: All SAP owners in a multi-schema database or SAPR3/SAP<SID> in a standard SAP database This option overrides the check_owner [Page 495] parameter.

-f chpass
This BRCONNECT function [Page 471] changes the database user password. Function options:

-o|-owner: Defines for which database owner (that is, user) the password is to be changed.
Input syntax: -o <owner1>[,<owner2>,...] Default value: SAPR3/SAP<SID> in a standard SAP database or all SAP owners in a multi-schema database

-p|-password: Defines the password for the SAP database owner (that is, user)
Input syntax: -p <password> Default value: interactive entry of the password

-f cleanup
This BRCONNECT function [Page 471] cleans up the database logs. For more information, see Clean Up Old Logs and Trace Files [Page 469]. Function options:

-a|-archive: Defines the retention period in days for BRARCHIVE detail log files
Input syntax: -a <days> Default: 30 This option controls which BRARCHIVE log files are deleted by the BRCONNECT cleanup function. It overrides the cleanup_brarchive_log [Page 495] parameter.

-b|backup: Defines the retention period in days for BRBACKUP detail log files
Input syntax: -b <days> Default: 30 This option controls which BRBACKUP log files are deleted by the BRCONNECT cleanup function. It overrides the cleanup_brbackup_log [Page 496] parameter.

-c|-connect: Defines the retention period in days for BRCONNECT detail log files

April 2004

473

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

Input syntax: -c <days> Default: 30 This option controls which BRCONNECT log files are deleted by the BRCONNECT cleanup function. It overrides the cleanup_brconnect_log [Page 496] parameter

-d|-dblog: Defines the retention period in days for records in the tables SDBAH and SDBAD
Input syntax: -d <days> Default: 100 This option controls which records in the tables SDBAH and SDBAD are deleted by the BRCONNECT cleanup function. It overrides the cleanup_db_log [Page 496] parameter.

-e|-expdump: Defines the retention period in days for BRSPACE export dumps and scripts
Input syntax: -e <days> Default: 30 This option controls which directories and their contents for BRSPACE export dumps and scripts are deleted by the BRCONNECT cleanup function. It overrides the cleanup_exp_dump [Page 497] parameter.

-i|-diskarch: Defines the retention period for offline redo log files saved on disk.
Input syntax: -i <days> Default: 30 This option controls which offline redo log files backed up on disk are deleted by the BRCONNECT cleanup function. It overrides the cleanup_disk_archive [Page 496] parameter.

-k|-diskback: Defines the retention period in days for database files saved on disk.
Input syntax: -k <days> Default: 30 This option controls which database files backed up on disk are deleted by the BRCONNECT cleanup function. It overrides the cleanup_disk_backup [Page 497] parameter.

-l|-limit: Defines that only objects explicitly specified by other function options are to be cleaned up
Input syntax: -l Default: Clean up all database logs

-m|-msg: This parameter defines the retention period in days for the alert messages from the database check runs. The messages are deleted from the DBMSGORA table when the retention period has expired.
This option overrides the cleanup_check_msg [Page 496] parameter.

-o|-owner: Defines the database owner of SDBAH, SDBA, DBMSGORA, and XDB tables to be processed by BRCONNECT cleanup function.
Input syntax: -o <owner1>[,<owner2>,...] Default: SAPR3/SAP<SAPSID> in a standard SAP database or all SAP owners in a multischema database

474

April 2004

4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail

This option overrides the cleanup_owner [Page 497] parameter.

-r|-restore: Defines the retention period in days for BRRESTORE detail log files
Input syntax: -r <days> Default: 30 This option controls which BRRESTORE log files are deleted by the BRCONNECT cleanup function. It overrides the cleanup_brrestore_log [Page 496] parameter.

-s|-space: Defines the retention period in days for BRSPACE log files
Input syntax: -s <days> Default: 30 This option controls which BRSPACE log files are deleted by the BRCONNECT cleanup function. It overrides the cleanup_brspace_log [Page 497] parameter.

-t|-trace: Defines the retention period in days for Oracle trace and audit files
Input syntax: -t <days> Default: 30 This option controls which Oracle trace and audit files are deleted by the BRCONNECT cleanup function. It overrides the cleanup_ora_trace [Page 497] parameter.

-x|-xdb: Defines the retention period in days for records in the XDB tables Input syntax: -x <days> Default: 100 This option controls which records in the XDB tables are deleted by the BRCONNECT cleanup function. It overrides the cleanup_xdb_log [Page 497] parameter.

-f crsyn
This BRCONNECT function [Page 471] creates public synonyms for the SAP tools. Function options:

-o|-owner: Defines the database owner pointed to by the public synonyms used by BR*Tools.
Input syntax: -o <owner> Default value: SAPR3/SAP<SID>

-f dbshut
This BRCONNECT function [Page 471] shuts down the database in immediate mode. Function options:

-f|-force: Shuts down the database, whether or not the SAP user is connected.
Input syntax: -f Default value: If the SAP user is connected to the database, then it is not shut down.

-f next

April 2004

475

null invalidates the exclusion list defined by the next_exclude [Page 505] parameter. see: • • • Adapt Next Extents [Page 460] Algorithm for Determining Next Extent Size [Page 461] Function options: -e|-exclude: Defines tables and indexes to be excluded from adapting next extents Input syntax: -e [<owner>.5 * <database block size> 0 means unlimited next extent size 476 April 2004 .[<owner>. which must not be exceeded when a next extent is adapted Input syntax: -m <size> Default: 2 GB .3 BR*Tools in Detail This BRCONNECT function [Page 471] adapts the next extents of database tables. process all selected objects all_part means that SAP partitions (such as in Business Information Warehouse and Advanced Planner and Optimizer) are excluded from the check. You can use this option to exclude from processing tables or indexes with exceptional space parameters.]<table>. For more information. • -f|-force: Forces the next extent size of all selected tables and indexes to be reduced to the maximum free extent size in the tablespace or to the maximum next extent size (next_max_size parameter) if required.4 BR*Tools for Oracle DBA 4.]<index>.<tablespace>|<object_list> |all_part|null Default: No exclusion. This option overrides the next_exclude [Page 505] parameter. This means that no tables or indexes are excluded from processing. • -m|-max: Defines the maximum size for next extents. you can prevent the check and. the adjustment of NEXT extents from being implicitly performed for all indexes for the selected tables. free: reduces the next extent size to the maximum free extent size in the tablespace max: reduces the next extent size to the value of parameter next_max_size both: reduces the next extent size to the smaller of the values free and max nocasc: With this option. but only rounded down to the next multiple of 5 times the database block size. Input syntax: -f free|max|both|nocasc Default: both The next extent size is not normally reduced. This option is only provided for exceptional situations. • -l|-limit: Defines the maximum number of next extents (MAXEXTENTS) Input syntax: -l <count> Default: Settings from tables TGORA and IGORA 0 means unlimited number of extents This option overrides the next_limit_count [Page 505] parameter. if necessary.

or tablespaces) to be processed Input syntax: -t all|special|[<owner>. <size>: size of next extent for specified table or index (NEXTEXTENT) <limit>: maximum number of next extents for specified table or index (MAXEXTENTS) all_sel: sets NEXTEXTENT and MAXEXTENTS attributes to a certain value for all the database objects selected using the -t function option or the next_table parameter (see below). indexes.]<index>:<size>[/<limi t>]|<special_list>|all_sel:<size>[/<limit>]|null Default: Derived from internal rules for determining next extent size [Page 461] This option overrides the next_special [Page 506] parameter.] Default: SAPR3/SAP<SID> in a standard database or all SAP owners in a multi-schema database. • -t|-table: Defines the database objects (that is.4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail You can specify this option in KB. -f stats This BRCONNECT function [Page 471] updates optimizer statistics. see Update Statistics [Page 462]. • -o|-owner: Defines the database owner of tables and indexes to be processed Input syntax: -o <owner1>[.. It means that no tables or indexes are to be processed in a special way.This option is provided for exceptional situations..]<table>|[<owner>. For more information. tables.<owner2>. This option overrides the next_owner [Page 506] parameter. • -s|-special: Defines special sizes of next extent and maximum number of next extents for exceptional tables and indexes Input syntax: -s|-special [<owner>. Function options: • -b|-bucket: Defines the number of buckets in histograms Input syntax: -b <count> Default: 75 April 2004 477 .. null invalidates the special list defined by the next_special [Page 506] parameter.]<index>|<tablespace> |<object_list> Default: All objects of selected owners all: All SAP tables and indexes special: Only tables and indexes defined in the next_special [Page 506] parameter This option overrides the next_table [Page 507] parameter. MB.]<table>:<size>[/<limit>]|[<owner>. This option overrides the next_max_size [Page 506] parameter. or GB.

keep][.nocoll][. and for tables specified in the DBSTATC control table with the active flags set to N or R. See stats_method [Page 521] parameter monit: BRCONNECT automatically sets the MONITORING attribute for all tables without this attribute and forces update statistics for them. including non-pool and non-cluster tables collect: Update statistics without checking them first history: Stores the results of update statistics in the history tables DBSTATHORA and DBSTAIHORA.sample] Default: Internal rules [Page 465] determine the update statistics method [Page 465] allsel: Updates statistics for all selected objects (option -t or the stats_table parameter). Default: no exclusions You can use this option to exclude tables or indexes with exceptional statistics handling. • -c|change: Changes threshold for the percentage of inserted or deleted rows causing update statistics Input syntax: -c <threshold> Default: 50 This option overrides the stats_change_threshold [Page 519] parameter.noca sc][. Working threads are aborted.]<table>. also for tables specified in DBSTATC. • -f|-force: Forces a specific action while updating statistics Input syntax: -f [allsel][. null invalidates the exclusion list defined by the stats_exclude [Page 520] parameter. also for tables specified in the DBSTATC control table keep: Does not delete statistics after updating them for pool and cluster tables (option -f allsel) or for tables with the active flag set to N or R in DBSTATC limit: Forces hard processing time limit defined in option -l or stats_limit_time [Page 520] parameter.precision][.]<index>. including pool and cluster tables. or deletes statistics for selected objects.history][. This means that no tables or indexes are excluded from processing. • -e|-exclude: Defines tables and indexes to be excluded from update statistics Input syntax: -e [<owner>.3 BR*Tools in Detail This option overrides the stats_bucket_count [Page 518] parameter. This option overrides the stats_exclude [Page 520] parameter.nocheck][.4 BR*Tools for Oracle DBA 4. 478 April 2004 . method: Uses the method defined in option -m or stats_method [Page 521] parameter.<tablespace>|<object_list>|inf o_cubes|null info_cubes excludes check and update statistics for InfoCube tables. • -d|-delete: Deletes only damaging table and index statistics Input syntax: -d Default: Collect outdated and delete damaging statistics You can use this option to delete statistics for pool and cluster tables.collect][.[<owner>.method][.monit][.limit][.

This option overrides the stats_limit_time [Page 520] parameter. determine which tables to update statistics for by using the check results from the previous BRCONNECT run with -f nocoll. Input syntax: -m E|EH|EI|EX|C|CH|CX|E=|C=|=H|=I|=X|+H|+I Default: Internal rules [Page 465] determine the update statistics method This option overrides the stats_method [Page 521] parameter. sample size) defined in option -s or stats_sample_size [Page 522] parameter for all tables if statistics are collected with method E. processing terminates immediately (this is the "hard limit"). E: Estimates EH: Estimates with histograms EI: Estimates with index validation EX: Estimates with histograms and index validation C: Computes CH: Computes with histograms CI: Computes with index validation CX: Computes with histograms and index validation April 2004 479 . This is part of the two-phase concept for update statistics. Statistics are updated for tables that need new statistics in the next BRCONNECT run with f nocheck. Only use this option in exceptional situations. • -m|-method: Defines the method for updating statistics for tables that are not specified in the control table DBDSTATC. If you set the option -f limit (see above). This is part of the two-phase concept for update statistics. also for tables specified in the control table DBSTATC • -h|-history: Stores the results of updating statistics in the history tables DBSTATHORA and DBSTAIHORA for tables not specified in DBSTATC. The processing terminates after statistics have been collected for the current table or index (this is the "soft limit"). Instead. • -l|-limit: Defines the processing time limit in minutes for updating statistics Input syntax: -l <minutes> Default: 0. nocheck: Does not check statistics.4 BR*Tools for Oracle DBA 4. no limit You can use this parameter to terminate long-running update statistics jobs after a certain period of time. nocoll: Checks statistics only by analyzing the primary index. sample: Uses sample size defined in option -s or stats_sample_size [Page 522] parameter.3 BR*Tools in Detail nocasc: Prevents update statistics from being implicitly performed for all indexes of the selected tables. precision: Forces minimum precision (that is. Input syntax: -h Default: no history records are saved The history data in the tables DBSTATHORA and DBSTAIHORA is used by the application monitor.

3 BR*Tools in Detail E=: Forces estimate for all tables. including tables in DBSTATC control table..4 BR*Tools for Oracle DBA 4. Input syntax: -s P<p>|R<r> Default: Internal rules [Page 465] determine the update statistics method This option overrides the stats_sample_size [Page 522] parameter. if specified in DBSTATC control table.. You can use this option to restart an aborted BRCONNECT run of update statistics. Option -f method must be set +H: Forces collect statistics with histograms for all tables. including tables in DBSTATC control table. including tables in DBSTATC control table. • -p|-parallel: Defines the number of parallel threads for updating statistics Input syntax: -p <number> Default: 1 For example. Option -f method must be set =H: Forces collect statistics with histograms for all tables. Option -f method must be set C=: Forces compute for all tables. Option -f method must be set =X: Forces collect statistics with histograms and index validation for all tables. including tables in DBSTATC control table in addition to index validation. Option f method must be set. including tables in DBSTATC control table. Option -f method must be set. including tables in DBSTATC control table in addition to index validation. including tables in DBSTATC control table. This option overrides the stats_parallel_degree [Page 522] parameter.<owner2>. if specified in DBSTATC control table. • -r|-retain: Skips check and update of statistics of tables for which statistics were checked or updated in the specified time period Input syntax: -r <days>|last Default: last <days>: Skips tables and indexes for which statistics were checked or updated in the last <days> days last: Skips tables and indexes for which statistics were checked or updated in the last BRCONNECT run. • -s|-sample: Defines the sample size in percentage or thousands of rows for updating statistics with method E for tables that are not specified in the DBSTATC control table..] Default: SAPR3/SAP<SID> in a standard SAP database or all SAP owners in a multischema database This option overrides the stats_owner [Page 521] parameter. 480 April 2004 . +I: Forces collect statistics with index validation for all tables. Option -f method must be set =I: Forces collect statistics with index validation for all tables. you can set this parameter to the number of CPUs to speed up update statistics. • -o|-owner: Defines the database owner of tables and indexes for updating statistics Input syntax: -o <owner1>[.

including relation between index and data rows. Input syntax: -t all|all_ind|missing|dbstatc_tab|dbstatc_mon|dbstatc_mona |[<owner>. For example.]<table>|[<owner>. cascade_store: Same as cascade. so that they are available for the application monitor (ST07). • -v|-validate: Validates a table or index structure. index_store: Same as index. missing: Only tables and indexes with missing statistics dbstatc_tab: Only tables specified in the DBSTATC control table dbstatc_mon: Only tables specified in the DBSTATC control table that are relevant for the application monitor dbstatc_mona: Only application tables specified in the DBSTATC control table that are relevant for the application monitor info_cubes checks statistics only for InfoCube tables and updates them if necessary. Indexes are locked. Therefore. -h|-help This BRCONNECT command option provides help information. so that they are available for the application monitor (ST07). Tables and indexes are locked. This function can run for a long time and always locks the table and indexes in Oracle 8. determined during the validation of the index structures. we recommend performing it when there is little processing on the database. Tables are not locked. but also store the statistical values. you can use this to create the space statistics for all indexes. cascade: Validate internal structure of table and index blocks. but also store the statistical values.]<index>|<tablespace>|<object_list>|in fo_cubes This option overrides the stats_table [Page 522] parameter. Tables and indexes are not locked. index: Validate internal structure of index blocks.4 BR*Tools for Oracle DBA 4. Indexes are not locked. in the DBSTAIHORA table. determined during the validation of the index structures. in Oracle 9 it does not lock tables and indexes for the attributes table. all: All SAP tables and indexes all_ind: Processes all indexes only. but no update statistics is performed Input syntax: -v table|index|cascade|index_store|cascade_store Default: cascade table: Validate internal structure of table blocks. index. in the DBSTATIORA table. April 2004 481 . and cascade.3 BR*Tools in Detail P<p>: Percentage of rows R<r>: Number of thousand rows • -t|-table: Defines the objects to be processed by update statistics. However.

specify the complete path.time] Default value: process • • detail: Writes detailed processing information to the log file. including the analysis methods and sample sizes for updating the index statistics while statistics are being updated. If you set option -l . If this file is not in the standard directory <ORACLE_HOME>/dbs . version: Displays detailed information on the versions of the program modules. which can be helpful to investigate problems. -l|-language This BRCONNECT command option sets the language for messages. Input syntax: -l E|D Default value: E You can determine whether you want the messages to appear in English (E) or in German (D). Using this option. Input syntax: -p <profile> Default value: init<DBSID>. time: Generates additional time stamps that enable you to determine the time required for the individual operations. summary: Writes only summary information and total counts to the log file. The log file is then comprehensive.sap This profile is contained in directory <ORACLE_HOME>/dbs (UNIX) or <ORACLE_HOME>\database on Windows NT. If you want to use a different profile. Input syntax: -o [detail|process|summary][. process: Writes detailed information to the log file. These are used to determine whether tables need new statistics. 482 April 2004 .4 BR*Tools for Oracle DBA 4. the value specified with this option applies. -o|-output This BRCONNECT command option controls the information written to the detail log. The default becomes invalid if you specify another value by setting the environment variable BR_LANG (language variable). This can be useful for creating initial statistics to avoid a large log file.3 BR*Tools in Detail Input syntax: -h [<function>]|[version] Default value: Display help information about all BRCONNECT functions. specify the name of the profile file here. • • <function>: Displays help information about main options and specified functions only. you can obtain an overview of BRCONNECT functions. • • -p|-profile This BCONNECT command option defines the profile name.

] Default value: all SAP tables and indexes in the database This parameter can be used for SAP objects with the owner name in the form SAP<SID>.. If you are working with an OPS$ user. Input syntax: -q [check] Default value: start processing With this option. BRCONNECT displays information about the work to be done (for example. -f stats [Page 477]. the number of database objects to be processed) by the selected function. -f next [Page 475]. In general. and does not appear in the process list. The OPS$ user must be defined in the database and have at least SYSOPER authorization and April 2004 483 . Input syntax: -s <SAPSID1>[. BRCONNECT tries to log on to the database as OPS$ user (see Oracle documentation and information in the SAP Service Marketplace).<SAPSID2>. use the following call: brconnect -u / -c -f stats In this case.3 BR*Tools in Detail -q|-query This BRCONNECT command option sets the query mode. The tool then prompts entry of the password. No processing is started. This option is only relevant for a multi-schema database. For the standard SAP owner SAPR3 use R3 as the system ID. You can enter the user name and the password separately (only enter the user name or the option -u <user> ). -u|-user This BRCONNECT command option defines the user name and password used by the SAP tool to log on to the database. this option has the same meaning as the option -o|-owner. These measures are taken to protect the DBA password. the objects for which NEXT extents would be adapted by the -f next function) -s|-sapsid This BRCONNECT command option defines the SAP System ID for the objects to be processed. which we recommend you to use. • check: displays objects that would be changed by the function (for example. an interactive query of the user name and the password is performed by the SAP tool. In this case. you can structure the call as follows: brconnect -c -u -f stats <<END <user>/<password> END However.. the password is not displayed during entry.4 BR*Tools for Oracle DBA 4. -o|-owner is used in the BRCONNECT functions -f check [Page 472]. In shell scripts.. use this command only if the option -c is active. Input syntax: -u [<user>[/<password>]] Default value: system/manager If you only enter -u .

<ext> The first characters indicate the encoded time the restore was performed (action ID). function -f stats -d [Page 477] . it is not necessary to specify the password when calling BRCONNECT.aly: Collect statistics for tables with outdated statistics. BRCONNECT only writes logs for the functions check [Page 472]. -V|-VERSION This BRCONNECT command option displays detailed information on the program version and patches.cln: Clean up database log.nxt: Adapt next extents.3 BR*Tools in Detail SAPDBA role.3. see: Names of the BRCONNECT Detail Logs [Page 484] BRCONNECT Detail Log [Page 484] BRCONNECT Summary Log [Page 485] Names of the BRCONNECT Detail Logs Every BRCONNECT detail log contains a name with the following format: c<encoded timestamp>.6. Input syntax: -V 4.dst: Delete damaging statistics. The logs are stored in the sapcheck directory. Possible function IDs: • • • • • • • • • . The extension (function ID) indicates the type of processing.chk: Check database system [Page 472]. function -f stats -f nocheck [Page 477] .sta: Check and update statistics. function -f stats -f nocoll [Page 477] .4 BR*Tools for Oracle DBA 4. function -f next [Page 475] .8 • • • BRCONNECT Logs For more information.vst: Verify table and index structure. function -f stats [Page 477] . function -f cleanup [Page 473] . next [Page 475] and stats [Page 477]. function -f stats -v [Page 477] . cleanup [Page 473].opt: Check statistics only. With this method.quc: Determine objects to be processed for a given function. command option -q|query [Page 483] BRCONNECT Detail Log The detail log file contains information about the actions that were performed by BRCONNECT: 484 April 2004 . function -f check [Page 472] .

log . The entries in the file provide the following information about each function using BRCONNECT: • • • • • • Action ID (encoded timestamp of the log name) Function ID (extension of the log name) Timestamp (date. time) specifying the end of the function Return code BRCONNECT version 4. BRRESTORE. and BRRESTORE Distinguish between the following: • BR*Tools [Page 181] is the program package containing BRSPACE. BRRECOVER. BRARCHIVE. BRTOOLS is the program that displays the character-based menus from which the other BR programs are called. BRARCHIVE.3 BR*Tools in Detail • • • • The relevant parameters of initialization profile init<DBSID>.3. and BRRESTORE has the following features: April 2004 485 . and BRTOOLS. The logs are stored in the sapcheck directory.7 Use BRTOOLS You can use BRTOOLS as a tool: • • To display the menus for the BR*Tools user interface [Page 189] using a characterbased interface That is started internally by BRBACKUP. • Features BRTOOLS as an internal tool started by BRBACKUP.sap that were set during the BRRESTORE run Information about the numbers of objects to be processed For the check function. BRARCHIVE. time) specifying the start of the function Timestamp (date. BRCONNECT. BRBACKUP. the conditions to be checked Processing details: Check function [Page 472]: Alert conditions detected Cleanup function [Page 473]: Database logs that were deleted Next function [Page 475]: Tables and indexes for which the next extent was adapted Stats function [Page 477]: Tables and indexes for which statistics were collected • Summary information and total counts of objects processed BRCONNECT Summary Log You can display a brief entry for each restore in the summary log conn<DBSID>. It works together with BRGUI to generate a graphical user interface.4 BR*Tools for Oracle DBA 4.

1 Command Options for BRTOOLS This section describes the command options for BRTOOLS [Page 485]. see -c|-confirm [Page 364]. For more information.4 BR*Tools for Oracle DBA 4.7. If you use BRTOOLS with command options.3. • Parallel backup [Page 117] to a remote host (backup_dev_file = pipe). Syntax The syntax of a BRTOOLS command is: brtools [<options>] brtools –scroll 40 Options brtools [-h|-help [version]] [-l|-language E|D] [-p|-profile <profile>] [-s|-scroll <lines>] [-u|-user [<user>[/<password>]]|/] [-w|-show <days>] [-V|-VERSION [ALL]] See also: -h|-help [Page 486] -l|-language [Page 487] -p|-profile [Page 487] -s|-scroll [Page 487] -u|-user [Page 487] -w|-show [Page 487] -V|-VERSION [Page 488] -h|-help 486 April 2004 . 4.3 BR*Tools in Detail • Backup verification The saved files are compared with their originals. For more information. • The option -c force This denies the commands that are started (such as cpio) access to the console.sap. these override the corresponding values in the initialization profile init<DBSID>. you can specify either the letter indicated or the complete word. To use the options. see -w|-verify [Page 375].

-u|-user This BRTOOLS command option defines the user name and password for RMAN to connect to the database.4 BR*Tools for Oracle DBA 4.sap. This option is not valid for BRGUI.sap -s|-scroll This BRTOOLS command specifies the number of lines for scrolling in list menus.3 BR*Tools in Detail This BRTOOLS command option provides help information and command line options about the version of BRTOOLS specified. Input syntax: -s|-scroll <lines> Default value: 20 This command corresponds to the parameter scroll_lines [Page 516] in init<DBSID>. Syntax: -w|-show <days> Default: 30 Possible values: • • • 0: Show all available log files 1: Show log files created today >1: Show log files created in the previous specified number of days April 2004 487 . Input syntax: -l E|D Default value: E (English) -p|-profile This BRTOOLS command option defines the profile name. Input syntax: -u [<user>[/<password>]] Default value: system/<default_password> -w|-show This BRTOOLS command option specifies the time period for which BRTOOLS displays log files. Input syntax: -h|-help [version] Default value: No help -l|-language This BRTOOLS command option sets the message language to either English or German. Input syntax: -p <profile> Default value: init<DBSID>.

sap. BRRESTORE. <ORACLE_HOME>/dbs/init<DBSID>. Messages.3 BR*Tools in Detail This command corresponds to the parameter show_period [Page 516] in init<DBSID>. or the initialization profile. It is usually stored in directory <ORACLE_HOME>/dbs (UNIX) or <ORACLE_HOME>\database (Windows). messages and return codes [Page 532] for BR*Tools 4. Use To configure the SAP tools BRBACKUP.8.sap contains parameters that influence how the SAP tools perform various functions. You can edit the file with a text editor.sap look as follows: <Parameter> = <value>|(<value_list>) where value_list = <value_1>. you can continue the parameter values can be continued on the next line (the line break is then treated as a blank). Pay particular attention to parameters without default values and parameters that have device-specific information or require special platform-specific commands. Structure The parameters and values in profile init<DBSID>.4 BR*Tools for Oracle DBA 4. and enclose the entire list in parentheses. compare your input format with the format in the sample profile. BRARCHIVE.sap The initialization profile init<DBSID>. You can use blanks between any symbols of such commands. If you do not make any changes.8 Profiles. Before you use one of the SAP tools. and BRCONNECT. /usr/sap/<SAPSID>/SYS/exe/run/initSID.3.3. you must use the initialization profile init<DBSID>.ora. you must enclose the value in double quotes.sap.1 Definition Initialization Profile init<DBSID>. 488 April 2004 . -V|-VERSION This BRTOOLS command option displays patch information of BRTOOLS Input syntax: -V|-VERSION [ALL] ALL: patch information is displayed for all BR*Tools 4. find out exactly which parameters you have to configure. and Return Codes for BR*Tools Definition This section deals with the profiles [Page 488]. logs [Page 529].sap. If necessary.<value_2> You separate the individual values in a value list by commas. as in the following example: rewind = "mt -f $ rewind" If you are unsure. the SAP tools use the default values for the parameters. If a parameter value contains special characters such as space or $. Logs.

if this become necessary in connection with a recovery.3 BR*Tools in Detail Integration You can override many of the parameters in init <DBSID>. Backing up to disk is not a substitute for backing up the offline redo log files to tape. you can only use the BRARCHIVE options -s.4 BR*Tools for Oracle DBA 4. which is similar to a Two-Phase Backup [Page 113]. This is generally only required when you are working with a two-phase backup procedure. When you back up the offline redo log files to disk. always back up the offline redo log files to tape. or BRRESTORE. The offline redo log files are first collected in a directory on a disk and then written to tape using BRARCHIVE option -a [Page 384] or external means. For more information. BRCONNECT. archive_function This parameter defines the type of backing up with BRARCHIVE. April 2004 489 . Only use BRARCHIVE backing up to disk in the situations mentioned above. Syntax: archive_function = save|second_copy|delete_saved|deleted_copied|save_delete|second_copy_ delete|double_save|double_save_delete|copy_save|copy_delete_save Default value: save Possible values: • save: Back up the offline redo log files.sap by using a command option when you call BRBACKUP. If external tools are used. see: • • • • • Effects of the Command Options Command Options for BRBACKUP Command Options for BRARCHIVE Command Options for BRCONNECT Command Options for BRRESTORE Changes to parameter values do not take effect until you call the corresponding tool. archive_copy_dir This parameter defines the directory used by BRARCHIVE to back up the offline redo log files to a local disk. You cannot combine back up to disk and tape during a single BRARCHIVE run. the user is responsible for backing up to tape and for restoring from the tape to the disk. Syntax: archive_copy_dir = <dir> Default: First value of the parameter backup_root_dir [Page 493] Required value: A directory in which the offline redo log files should be backed up. -sd and -ds. BRARCHIVE. In all other cases.

4 BR*Tools for Oracle DBA 4. delete_saved: Delete offline redo log files that were backed up once. double_save: Back up the offline redo log files on two backup devices (tape devices) in parallel. Syntax: backup_dev_type = disk|tape|pipe|tape_auto|pipe_auto|tape_box|pipe_box|disk_copy|disk_s 490 April 2004 . The offline redo log files that have been created in the meantime are backed up. copy_save: Create a second copy of offline redo log files that were already backed up and then back up the offline redo log files that have been created in the meantime. If there is only one tape device. This can also be done by first calling BRARCHIVE with archive_function = save and then with archive_function = second_copy or second_copy_delete. archive_stage_dir = $SAPDATA_HOME/sapbackup See also: Backup to a Remote Disk [Page 110] backup_dev_type Determines the backup medium that you want to use. delete_copied: Delete offline redo log files that were copied a second time. These are then deleted. copy_delete_save: Create a second copy of offline redo log files that were already backed up. double_save_delete: Back up the offline redo log files on two backup devices (tape devices) in parallel and then delete the files. save_delete: Back up the offline redo log files and then delete these files. the second possibility is not of great interest and should only be used with the corresponding BRARCHIVE command option call if it must be used at all. two BRARCHIVE calls with modified parameters are necessary in this case. you can use parameter archive_function = copy_save or copy_delete_save to ensure that BRARCHIVE creates a second copy of the offline redo log files in one run. deletes it if necessary and continues backing up immediately. second_copy_delete: Create a second copy of offline redo log files that were already backed up and then delete these files. In practice. archive_stage_dir This parameter identifies the directory used by BRARCHIVE to back up the offline redo log files to a remote disk. However. This parameter corresponds to archive_copy_dir [Page 489] for a backup to a local disk.3 BR*Tools in Detail • • • • • • • • • second_copy: Create a second copy of offline redo log files that were already backed up. Syntax: archive_stage_dir = <dir> Default: First value of the parameter stage_root_dir [Page 518] Required value: A directory in which the offline redo log files should be backed up.

g. The directory that should be used for the backups is defined in parameter backup_root_dir or archive_copy_dir. All the functions that are available for a local backup on tape are also available here.4 BR*Tools for Oracle DBA 4. tape_auto: Use of a local tape device with a tape changer. pipe: Backup to a remote system using the commands entered in the profile parameters remote_host [Page 509]. provided the supplier provides corresponding backup programs and a BACKINT interface. pipe_auto: Use of a tape device with a tape changer on a remote system. For all tape device types. optical media). • • • • tape_box: Use of jukeboxes and autoloader. the drivers defined in the parameter tape_address or tape_address_arch are used for the data transfer (cpio. The prompts for changing the volumes are suppressed. and copy_out_cmd [Page 500]. See Standby Database Configuration [Page 135]. Instead. copy_in_cmd [Page 499]. since that program does not support continuation tapes. The prompts for changing the volumes are suppressed. The name of the new Oracle_Home directory is defined in the parameter new_db_home. a standby control file is generated and copied. do not forget to set the parameters copy_in_cmd. disk_standby: Copying of database files to a disk with an identical directory structure (compare disk_copy). util_file: Backup or restore is carried out file-by-file using the backup program specified by the BACKINT interface program util_file_online: (if supported by the manufacturer of the external backup program) backup or restoration is made file-by-file using an external backup program addressed by the BACKINT interface. • disk_copy: Copying of database files to a disk with an identical directory structure. remote_user [Page 509]. The parameters tape_auto and pipe_auto generally have no effect on BRARCHIVE. The parameter util_file allows you to use other storage media (e. in which case the backup is not stopped before calling BACKINT. remote_host and remote_user appropriately. The accompanying tape devices must be locally accessible. To let you construct a standby database. it is stopped when the first file is about to be backed up by BACKINT and started again after the last file has been saved. When you use this parameter specification. copy_out_cmd. See Structure-Retaining Database Copy [Page 115]. The backup status is also set and ended dynamically for the tablespaces to be saved in an online backup. • • tape: Use one or more local tape devices. the SAP utilities can call the external backup program for the physical backup or restore of the corresponding files. remote_user). This value can also be set for an offline backup. If parameter util_file_online • • • April 2004 491 .3 BR*Tools in Detail tandby|util_file|util_file_online|stage|stage_copy|stage_standby|rman _prep|rman_util|rman_disk|rman_stage Default: tape Possible values: • disk: Database backups to disk. In such cases. dd). For the rewind those defined in the parameter tape_address_rew or tape_address_rew_ are used. pipe_box: Use of jukeboxes and autoloader. The accompanying tape devices must be remotely accessible (remote_host.

For data files. stage_standby: Copying of database files to a remote disk with an identical directory structure (compare disk_copy). <file_ID>: The file with this file ID are backed up. store this information in an appropriately maintained parameter file. See Incremental Backup [Page 90]. Control files can be addressed with the file ID 0. this is the Oracle file ID. incr: Incremental backup with RMAN. stage_copy: Copying of database files to a remote disk with an identical directory structure. See External Backup Programs [Page 154]. See RMAN Backup with an External Backup Library [Page 567]. <n> is the redo log group number. full: Full database backup (level 0). but without BACKINT • • • • • • backup_mode This parameter is used by BRBACKUP to determine the scope of the backup activity. rman_util: RMAN backup in combination with a backup library and the backup tool of another manufacturer. The name of the new Oracle_Home directory is defined in the parameter stage_db_home. for incremental backups while using the RMAN functions. a standby control file is generated and copied. <tablespace>: The files of the specified tablespaces are backed up by BRBACKUP. See Backup to a Remote Disk [Page 110]. rman_disk: Backup to local disk with an external backup library and RMAN. See Incremental Backup [Page 90]. rman_stage: Backup to remote disk with an external backup library and RMAN. If necessary. but without BACKINT. 492 April 2004 . Specify file ID 00 to back up all existing online redo log files. Syntax: backup_mode = all|all_data|full|incr|<tablespace>|<file_ID>|<file_ID1><file_ID2>|<generic_path>|sap_dir|ora_dir|<object_list> Default: all Possible values: • • • • • • all: Whole database backup using BRBACKUP.3 BR*Tools in Detail is used. rman_prep: The best distribution of the files to save sets is determined before a RMAN backup to tape with file multiplexing. • stage: Backup to a remote disk. the volume of offline redo log files is also drastically reduced during an online backup. all_data: Save the files of all tablespaces which are not pure index tablespaces. log files and the control file.4 BR*Tools for Oracle DBA 4. Ask the supplier of the non-SAP backup programs and the interface BACKINT for any additionally required parameters for the backup program call. BACKINT provides an interface to the external backup tool and is also used to back up profiles. See RMAN Save-Set Grouping [Page 574]. This can be used for standard backups with BRBACKUP. To let you construct a standby database. Online redo log files can be addressed using the file ID 0<n>. which you should also enter in the parameter util_par_file or the command option -r|-parfile of the SAP utilities.

you can save database files. as otherwise you will not have the authorizations required for the directory to be saved. as described in Initialization Profile init<DBSID>. sapdata<n>) in the path. If you enter more than one directory. you can automatically determine and save all the files of the SAP environment. use this option after an Oracle migration.4 BR*Tools for Oracle DBA 4.3 BR*Tools in Detail • • <file_ID1>-<file_ID2>: The files in this interval are backed up. You could. for example. The root user must have the environment of the corresponding ora<sid> user for BRBACKUP to be started successfully. • You can only use this option when saving to tape and when not performing a verification of the backup. This means that the following directory trees are saved: /sapmnt/<SAPSID>. /usr/sap/<SAPSID>. you can save database data files whose name starts with that path. This means that the directory trees under <ORACLE_HOME> (except for the directories sapdata<n> and saplog. In exceptions (for example. Syntax: backup_root_dir = <dir>|(<dir_list>) Default: <SAPDATA_HOME>/sapbackup Required value: Directories to which the backups performed on disk should be written.sap [Page 488]. or the specified directory. no definition of the parameter archive_copy_dir). However. <generic_path>: By entering a full path. for example be used after an SAP upgrade. • ora_dir: With this option. BRARCHIVE also uses the directories defined in this parameter if disk backup is required. Saving with the sap_dir option should not replace regular backups of the file systems using operating system tools. This list can also include the key word all. backup_root_dir This is the parameter that is used only by BRBACKUP to identify the directories in which database backups to disk are performed. you can automatically determine and save all the nondatabase files of the Oracle environment. By entering a generic path. In this case. Saving with the option ora_dir should not replace regular backups of the file systems with operating system tools. non-database files.or origlog/mirrlog) are saved. You can only use this option when saving to tape and when not carrying out a verification of the backup. the path must contain at least the SAPDATA_HOME directory and an additional generic specification (for example. sap_dir: With this option. Saving and restoring under root also has the advantage that you can be sure that the settings for the user and authorizations for the files and directories will be kept after restoring. we recommend processi ng database files and non-database files separately. you must enclose the names in parentheses and separate them by commas. April 2004 493 . • <object list>: You can enter an object list. /usr/sap/trans This option could. For UNIX systems: Start BRBACKUP to save the SAP or Oracle environment (backup_mode = sap_dir | ora_dir) under user root.

• online_mirror: The mirror disks are split and backed up while the database is running. The backup of the mirror disks can take place whilst the database is running. This backup of the offline redo log files with BRBACKUP runs completely independently of other BRARCHIVE backups. This backup mode is only relevant for the standby database configuration. the offline redo log files generated during the backup are copied to the same volume. the database is shut down during backup. BRBACKUP checks that no SAP system users are connected to the database. BRBACKUP calls SPLITINT to perform the split. The tablespaces to be backed up are only placed in BACKUP status during the split. • • • • • offline_split: The database is only shut down to split the mirror disks. When you select this parameter. online_cons: Database backup in online mode. even if the SAP System is active. This backup mode is only relevant for the split command scenario of Split Mirror Backup [Page 142]. offline_standby: Data backup of a standby database in offline mode. 494 April 2004 . As well as the database files. online_split: The mirror disks are split and backed up while the database is running. you should provide directories on other disks and add their names in the parameter backup_root_dir. You then have a logically consistent dataset available. with the database running. See also: Backup to Multiple Disks [Page 109] backup_type This BRBACKUP parameter identifies the type of the database backup. BRBACKUP always shuts down the database. in other words. in other words. See Standby Database [Page 133]. the standby database is shut down during the backup. However. the database is not shut down and BRBACKUP terminates the process with an error message (message number BR0068E).4 BR*Tools for Oracle DBA 4. The tablespaces to be backed up are only placed in BACKUP status during the split. This backup mode is only relevant for the split command scenario of Split-Mirror Disk Backup [Page 142]. no transactions can be performed during the short period of time that the database is shut down. in other words. This backup mode is only relevant for the SPLITINT scenario of Split Mirror Backup [Page 142]. If an SAP System is active. Syntax: backup_type = online|online_cons|offline|offline_force|offline_standby|online_split |offline_split|offline_stop|online_mirror|online_mirror Default: offline Possible values: • • online: Database backup in online mode. The SAP system is running during the entire split mirror backup. the database is shut down during backup. BRBACKUP then uses these directories for database backup. offline_force: Database backup in offline mode.3 BR*Tools in Detail If you do not have enough storage space in one of the directories on your disk. in other words. offline: Database backup in offline mode.

indexes. see Standby Database [Page 133]. This type of backup is only relevant in the following case: The productive database is saved and then takes over the role of a standby database. The backup itself becomes a productive system. Syntax: check_exclude = [<owner>. • offline_stop: Database backup in offline mode without a consequent startup of the database. After its backup the database can be transferred directly into the mount standby status. You can use this parameter to exclude tables or indexes with exceptional space parameters or statistics handling from the checks.3 BR*Tools in Detail • offline_mirror: The database is only shut down to split the mirror disks. See also: Online and Offline Backup [Page 87] check_exclude This parameter defines the database objects (that is. This backup mode is only relevant for the SPLITINT scenario of Split Mirror Backup [Page 142]. For more information. and tablespaces) to be excluded from the BRCONNECT check function [Page 472]. systems). The backup of the mirror disks can take place whilst the database is running. cleanup_brarchive_log This parameter defines the retention period in days for BRARCHIVE detail log files. all SAP tables and indexes are checked non_sap means that non-SAP objects are excluded from the check (for example. tables.]<index>|<tablespace>|(<object_list>)|non_ sap|all_part Default: No exclusion. Syntax: check_owner = <owner>|(<owner_list>) Default: SAPR3/SAP<SID> in a standard SAP database or all SAP owners in a multi-schema database You can use this parameter to limit the check to objects of selected SAP owners (that is.4 BR*Tools for Oracle DBA 4.]<table>|[<owner>. BRBACKUP calls SPLITINT to perform the split. However. The SAP system is running during the entire split mirror backup. check_owner This parameter defines the database owner of tables and indexes to be checked by the BRCONNECT check function [Page 472]. which are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. no transactions can be performed during the short period of time that the database is shut down. all_part means that SAP partitions (such as in Business Information Warehouse and Advanced Planner and Optimizer) are excluded from the check. Syntax: cleanup_brarchive_log = <days> Default: 30 April 2004 495 . Oracle dictionary objects).

which are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. which are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. Syntax: cleanup_check_msg = <days> Default: 100 cleanup_db_log This parameter defines the retention period in days for records in the SDBAH and SDBAD tables. Syntax: cleanup_db_log = <days> Default: 100 cleanup_disk_archive This parameter defines the retention period in days for offline redo log files saved on disk. Syntax: cleanup_brconnect_log Default: 30 cleanup_brrestore_log This parameter defines the retention period in days for BRRESTORE detail log files. Syntax: cleanup_disk_archive = <days> Default: 30 496 April 2004 . which are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. Syntax: cleanup_brbackup_log = <days> Default: 30 cleanup_brconnect_log This parameter defines the retention period in days for BRCONNECT detail log files. Syntax: cleanup_brrestore_log = <days> Default: 30 cleanup_check_msg This parameter defines the retention period in days for the alert messages in the DBMSGORA table from the database check runs using BRCONNECT check function [Page 472]. which are excluded for the specified period from the BRCONNECT cleanup function [Page 473].4 BR*Tools for Oracle DBA 4. The messages are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. which are excluded for the specified period from the BRCONNECT cleanup function [Page 473].3 BR*Tools in Detail cleanup_brbackup_log This parameter defines the retention period in days for BRBACKUP detail log files.

which are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. which are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. systems). Syntax: cleanup_disk_backup = <days> Default: 30 cleanup_exp_dump This parameter defines the retention period in days for BRSPACE export dumps and scripts. and tablespaces) to be excluded from the BRCONNECT cleanup function [Page 473].3 BR*Tools in Detail cleanup_disk_backup This parameter defines the retention period in days for database files saved on disk. cleanup_brspace_log This parameter defines the retention period in days for BRSPACE detail log files. which are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. tables. which are excluded for the specified period from the BRCONNECT cleanup function [Page 473]. Syntax: cleanup_exp_dump = <days> Default: 30 cleanup_ora_trace This parameter defines the retention period in days for Oracle trace and audit files.4 BR*Tools for Oracle DBA 4. Syntax: cleanup_owner = <owner>|(<owner_list>) Default: SAPR3/SAP<SID> in a standard SAP database or all SAP owners in a multi-schema database You can use this parameter to limit the cleanup to objects of selected SAP owners (that is. indexes. Syntax: cleanup_xdb_log = <days> Default: 100 April 2004 497 . Syntax: cleanup_ora_trace = <days> Default: 30 cleanup_owner This parameter defines the database of objects (that is. Syntax: cleanup_brspace_log = <days> Default: 30 cleanup_xdb_log This parameter defines the retention period in days for records in the XDB tables. which are excluded for the specified period from the BRCONNECT cleanup function [Page 473].

When you use this parameter. Syntax: compress_cmd = <cmd> Default value: None If you want to use the software compression. transfer of large quantities of data). release upgrade. To determine these files. hardware: Should be set when tape units that support hardware compression are used. You also have to configure your backup device accordingly. This value is also supported for backups on disk with hardware-compressing file systems on Windows NT and AIX operating systems. You can enter the following command. for example: compress_cmd = "compress -c $ > $" 498 April 2004 . yes: Software compression of files during backup. Just setting this parameter does not activate hardware compression. but no backup of files is started. compare the compression rates of all files in two subsequent compression operations. you should always start the software compression in order to determine the compression rates for the entire database. The command must contain two $ characters which stand for the file to be compressed and the compressed file. BRRESTORE handles this setting as compress = no. • Notes on Software Compression (Without Starting a Backup) with compress = only If you use tape units that support hardware compression. The compression rates for files that have not changed will probably remain constant in the future. so that the current compression rate can be determined for each of the data files. only: Software compression. backup is not started. After extreme database changes (reorganization. Syntax: compress = no|yes|hardware|only Default: no Possible values: • • • no: No file compression. If you do not want to compress the entire database. The setting of parameter backup_dev_type is not relevant for this activity.3 BR*Tools in Detail compress Define whether files are to be compressed (software or hardware compression). compress_cmd Provides the command to be used for software file compression (if activated using the compression parameter such as: compress = yes). It is merely information for BRBACKUP/BRARCHIVE. you should at least compress those database files where a lot of changes take place. as well. Check the setting of option -b 12 in command compress_cmd [Page 498]. This setting is not used by BRRESTORE. since no backup is started. you must enter a command.4 BR*Tools for Oracle DBA 4. SAP recommends that you perform software compression of the entire database with parameter compress = only at least once a month.

see exec_parallel [Page 502]). You can specify the directory in which compression is to be performed in parameter compress_dir.Z”. SAP therefore recommends that you always use the option -c of the compress command (when available) so that the original is not deleted. you should define as many directories as there are copy processes (the number of copy processes generally corresponds to the number of connected tape devices. and therefore enable optimized file distribution and volume load balancing. Ensure that the compression command you enter does not delete the original of the compressed file. The second variable is replaced with the name of the compressed file. you should define in directory compress_dir as many directories as there are copy processes. compress_dir Directories in which file compression will be performed. Syntax: compress_dir = <dir>|(<dir_list>) Default value: The directories specified in parameter backup_root_dir Because file compression is performed on disk. Syntax: copy_in_cmd = <cmd> Default value: None April 2004 499 . If you use compression with the parameter compress = only or option -k only.in particular. the double quotes " are essential.3 BR*Tools in Detail Make sure that you adhere to the syntax rules when you enter parameters composed of several values . In order to be able to use this parallel copy effectively also for the compression. If you want a parallel backup with software compression on local or remote tape devices. copy_in_cmd Defines the command used to read data from remote tape devices. where <n> is normally the number of defined backup devices which are connected. The second file name is assigned the extension “. compress_cmd = "compress -b 12 -c $ > $" The compression rates determined in this manner correspond much more closely to the actual hardware compression rates. Compression is performed on disk. <n> copy processes are generally started in parallel.4 BR*Tools for Oracle DBA 4. you must provide enough space to compress the largest file in your database. In order to carry out this process in parallel as effectively as possible. See also exec_parallel [Page 502]. the files are restored back to the directories defined in compress_dir. BRBACKUP replaces the first variable in the command with the source file which you want compressed. SAP recommends using option -b 12 of the compress command. If you check the readability and completeness of the backup using -w|-verify [Page 375].

You can also use a higher block size. Do not forget to enclose the parameter specifications composed of several values in double quotes. For more information. see backup_dev_type [Page 490]. Syntax: copy_out_cmd = <cmd> Default: None You must enter a value before you switch to “remote piping”. such as 64 KB (if cpio permits this for your hardware platform) to increase performance when writing to tape. This parameter specification is only useful in combination with parameters remote_host and remote_user for reading from remote systems.3 BR*Tools in Detail You must enter a value before you switch to “remote piping. Do not forget to enclose the parameter specifications composed of several values in double quotes. cpio_disk_flags Flags for cpio commands used by BRBACKUP if directories are copied to disk. The $ character is replaced by the device address.4 BR*Tools for Oracle DBA 4. you can also use higher blocking to improve performance. Parameter cpio_disk_flags must be set here. This parameter specification is only useful in combination with the parameter remote_host and remote_user for performing backups on remote systems. The block size in cpio_flags and cpio_in_flags has to be the same. copy_out_cmd Defines the command used to write data to remote tape devices. copy_in_cmd = "dd bs=5o if=$". Syntax: cpio_flags = <flags> Default: -ovB The option B causes a block size of 5KB to be used. copy_out_cmd = "dd bs=50k of=$". You can also use higher blocking to improve performance.” that is. backup_dev_type = pipe|pipe_auto. 500 April 2004 . cpio_flags Flags for cpio commands that the SAP tools use. The $ character is replaced by the device address. Syntax: cpio_disk_flags = <flags> Default: -pdcu The call brbackup -d disk -m /sapmnt/C11/bin makes a backup copy of directory /sapmnt/C11/bin on disk. However.

to increase performance when writing to tape. dd_flags Defines the dd options required for writing to tape. April 2004 501 . You can also use a higher block size. Syntax: cpio_in_flags = <flags> Default value: -iuvB The option B causes a block size of 5KB to be used. rman: Oracle Recovery Manager (RMAN) is called to copy data to disk. See Raw Devices with BRBACKUP and BRRESTORE [Page 34]. for example 64 KB. See RMAN Backup with an External Backup Library [Page 567]. The block size in cpio_flags and cpio_in_flags must match. This parameter is required if you are working with raw devices. Syntax: dd_flags = <flags> Default: "obs=16k" If you define the default value. but you can also use a higher value.3 BR*Tools in Detail cpio_in_flags Flags for cpio commands that the SAP tools use for reading files from a volume. the data is read from tape in blocks of 16 KB. such as 64 KB (if cpio permits this for your hardware platform). but you can also use a higher value.4 BR*Tools for Oracle DBA 4. Syntax: dd_in_flags = <flags> Default value: "ibs=16k" If you define the default value. In order to access raw devices. See Raw Devices with BRBACKUP and BRRESTORE [Page 34]. disk_copy_cmd This parameter specifies the copy command to be used to copy files to local disks. for example 64 KB. dd_in_flags Defines the dd options required for reading from tape. dd: Data is copied by dd command to disk. This parameter is required if you are working with raw devices. Syntax: disk_copy_cmd = copy|dd|rman Default: copy Possible values: • • • copy: Data is copied by a cp (UNIX) or copy (Windows NT) command to disk. the dd command is used. the data is written to tape in blocks of 16 KB. To access raw devices. the dd command is used.

The only possible outputs not recognized as errors are messages beginning with the characters #INFO. The addresses of the tape devices 3. For backup_dev_type = tape_box the command is called locally. See also: Backup with Automatic Tape Changers [Page 150] Mount and Dismount Commands [Page 150] mount_cmd [Page 504] mount_par_file [Page 504] exec_parallel This parameter specifies the maximum number of parallel copy processes.4 BR*Tools for Oracle DBA 4. If the dismount command has been performed successfully the exit code 0 is displayed. a shell script or a batch file.3 BR*Tools in Detail dismount_cmd In this parameter the dismount command for the automatic dismounting of a tape is defined.. The name of the database to be backed up 2.csh. Syntax: dismount_cmd = <cmd> Default: none (for backup_dev_type = tape_box | pipe_box this parameter must be defined in the initialization profile). 1. for example. this means that you can only use n of the 502 April 2004 . the number of parallel copy processes corresponds to the number of disks (or logical volumes) on which the database files reside. If you use option -k only to determine the compression rates. • Backup on tape The value n should be less than or equal to the number of backup devices. dismount. Do not forget to enclose the parameter specifications composed of several values in double quotes. The $ characters stand. Optional: name of a file for additional configuration parameters (parameter: mount_par_file) The dismount or mount command must be created by the user in the form of a program. No other output is displayed. Syntax: exec_parallel = <number> Default value: 0 The number of parallel copy processes corresponds to the number of backup devices available (tape devices/disks) in this case. If you define a value n less than the number of tape devices. in the following order. for backup_dev_type = pipe_box it is called on a machine defined in the parameter remote_host. for: .. The dismount command uses its own options: dismount_cmd = "<dismount_cmd> $ $ [$]" <dismount_cmd>: Command name The command name might be.

3 BR*Tools in Detail available tape devices in parallel. exp_dump_dir This parameter specifies the directory for the export dump file. The number of copy processes can be reduced. there is an automatic change to the next disk which has not been used and backup continues there. If you choose the number of copy processes n to be less than the number of disks. If a tape change should then become necessary in one of the tape devices used in parallel. Syntax: expir_period = <days> Default: 30 Required values: Indicate the period (in days) for which the tapes to be used for the backup should be locked by entering a whole number.SDBAD) expir_period This parameter specifies the expiration period for the tape volumes. SAPR3. One or more disks are then written by several processes at the same time. If one of the disks used in parallel is full.4 BR*Tools for Oracle DBA 4.]<table> | (<table_list>) Default: none exp_table = (SDBAH. • Restoring The maximum number of parallel copy processes which BRRESTORE can restore is the number of parallel copy processes used in the backup. • Backup to disk The number of parallel copy processes can be greater than the number of disks defined in backup_root_dir or stage_root_dir (but not greater than 255). Syntax: exp_dump_dir = <directory name> Default: $SAPDATA_HOME/sapreorg exp_dump_dir = $SAPDATA_HOME/sapreorg exp_table This parameter specifies the tables for an export. there is an automatic change to the next free backup device and the backup continues there. imp_table April 2004 503 . See also Volume Expiration Period [Page 100]. this means that you can only use n of the available disks in parallel. the system checks whether the expiration period set by expir_period for this volume has expired. Before BRBACKUP or BRARCHIVE start the backup to a volume. Syntax: exp_table = [<owner>.

Syntax: mount_cmd = <cmd> Default: none If backup_dev_type = tape_box | pipe_box is defined. command name might be mount. See also: Backup with Automatic Tape Changers [Page 150] Mount and Dismount Commands [Page 150] dismount_cmd [Page 502] mount_par_file [Page 504] mount_par_file This parameter is used in conjunction with the mount or dismount commands for automatic mounting or dismounting of tapes during backups with jukeboxes or autoloaders. The name of the database to be backed up 2. 1..SDBAD) mount_cmd This parameter defines the dismount command for the automatic demounting of a tape. The tape names 4. The addresses of the tape devices 3. for backup_dev_type = pipe_box it is called on a machine defined in parameter remote_host. SAPR3. Do not forget to enclose the parameter specifications composed of several values in double quotes. The command is called locally for backup_dev_type = tape_box. see backup_dev_type [Page 490]. for: .]<table> | (<table_list>) Default: non