Top Banner
SAP ® AG Neurottstr. 16 D-69190 Walldorf BRCONNECT SAP Web Application Server Release 6.20
109

SAP BRCONNECT utility guide

Sep 28, 2015

Download

Documents

blackfish5

SAP BRCONNECT utility guide
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • SAP AG Neurottstr. 16 D-69190 Walldorf

    BRCONNECT

    S AP Web Appl ica t ion ServerRe lease 6 .20

  • BRCONNECT

    2 April 2002

    Copyright Copyright 2002 SAP AG. All rights reserved.

    No part of this publication may be reproduced or transmitted in any form or for any purposewithout the express permission of SAP AG. The information contained herein may bechanged without prior notice.

    Some software products marketed by SAP AG and its distributors contain proprietarysoftware components of other software vendors.

    Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint and SQL Server are registeredtrademarks 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

    TM are trademarks of

    IBM Corp. in USA and/or other countries.

    ORACLE is a registered trademark of ORACLE Corporation.

    UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

    Citrix, the Citrix logo, ICA, Program Neighborhood, MetaFrame, WinFrame,VideoFrame, MultiWin and other Citrix product names referenced herein are trademarks ofCitrix Systems, Inc.

    HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C, World WideWeb Consortium, Massachusetts Institute of Technology.

    JAVA is a registered trademark of Sun Microsystems, Inc.

    JAVASCRIPT is a registered trademark of Sun Microsystems, Inc., used under license fortechnology invented and implemented by Netscape.

    SAP, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAPEarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.comare trademarks or registered trademarks of SAP AG in Germany and in several othercountries all over the world. All other products mentioned are trademarks or registeredtrademarks of their respective companies.

    Disclaimer

    Some components of this product are based on Java. Any code change in thesecomponents may cause unpredictable and severe malfunctions and is therefore expressivelyprohibited, as is any decompilation of these components.

    Any Java Source Code delivered with this product is only to be used by SAPs SupportServices and may not be modified or altered in any way.

    Documentation in the SAP Service MarketplaceYou can find this documentation at the following address:http://service.sap.com/instguides

  • BRCONNECT

    April 2002 3

    Typographic Conventions

    Type Style Represents

    Example Text Words or characters that appear on the screen. Theseinclude field names, screen titles, pushbuttons as well asmenu names, paths and options.

    Cross-references to other documentation

    Example text Emphasized words or phrases in body text, titles of graphicsand tables

    EXAMPLE TEXT Names of elements in the system. These include reportnames, program names, transaction codes, table names, andindividual key words of a programming language, whensurrounded by body text, for example, SELECT andINCLUDE.

    Example text Screen output. This includes file and directory names andtheir paths, messages, names of variables and parameters,source code as well as names of installation, upgrade anddatabase tools.

    Example text Exact user entry. These are words or characters that youenter in the system exactly as they appear in thedocumentation.

    Variable user entry. Pointed brackets indicate that youreplace these words and characters with appropriate entries.

    EXAMPLE TEXT Keys on the keyboard, for example, function keys (such asF2) or the ENTER key

    Icons

    Icon Meaning

    Caution

    Example

    Note

    Recommendation

    Syntax

  • BRCONNECT

    4 April 2002

    1 BRCONNECT....................................................................................... 71.1 New Features in SAP Release 6.20 .......................................................91.2 Database System Check with BRCONNECT ......................................11

    1.2.1 BRCONNECT Default Conditions for Database Administration .................................131.2.2 BRCONNECT Default Conditions for Database Operations ......................................18

    1.3 Adapt Next Extents with BRCONNECT...............................................211.3.1 Internal Rules for Determining Next Extent Size.........................................................21

    1.4 Update Statistics with BRCONNECT ..................................................231.4.1 -force with Update Statistics........................................................................................241.4.2 Deletion of Damaging Statistics ..................................................................................251.4.3 Verification of Table and Index Structure....................................................................251.4.4 Internal Rules for Update Statistics.............................................................................261.4.5 Update Statistics for InfoCube Tables.........................................................................27

    1.5 Clean Up Old Logs and Traces with BRCONNECT............................301.6 Additional BRCONNECT Functions ....................................................311.7 Command Options for BRCONNECT..................................................32

    1.7.1 -c|-confirm ...................................................................................................................331.7.2 -f|-function ...................................................................................................................33

    -f check ..............................................................................................................................34-f chpass ............................................................................................................................34-f cleanup ...........................................................................................................................35-f crsyn ...............................................................................................................................37-f dbshut.............................................................................................................................37-f next.................................................................................................................................37-f stats ................................................................................................................................39

    1.7.3 -h|-help ........................................................................................................................431.7.4 -l|-language .................................................................................................................441.7.5 -o|-output .....................................................................................................................441.7.6 -p|-profile .....................................................................................................................441.7.7 -q|-query ......................................................................................................................441.7.8 -s|-sapsid.....................................................................................................................451.7.9 -u|-user ........................................................................................................................451.7.10 -V|-VERSION ............................................................................................................46

    1.8 BRCONNECT Logs ...............................................................................471.8.1 Names of the BRCONNECT Detail Logs....................................................................471.8.2 BRCONNECT Detail Log ............................................................................................471.8.3 BRCONNECT Summary Log ......................................................................................48

    1.9 Initialization Profile init.sap..................................................491.9.1 archive_copy_dir .........................................................................................................491.9.2 archive_function ..........................................................................................................501.9.3 archive_stage_dir ........................................................................................................511.9.4 backup_dev_type ........................................................................................................511.9.5 backup_mode..............................................................................................................531.9.6 backup_root_dir...........................................................................................................541.9.7 backup_type ................................................................................................................541.9.8 check_exclude.............................................................................................................551.9.9 check_owner ...............................................................................................................561.9.10 cleanup_brarchive_log ..............................................................................................561.9.11 cleanup_brbackup_log ..............................................................................................561.9.12 cleanup_brconnect_log .............................................................................................561.9.13 cleanup_brrestore_log ..............................................................................................561.9.14 cleanup_check_msg .................................................................................................56

  • BRCONNECT

    April 2002 5

    1.9.15 cleanup_db_log.........................................................................................................571.9.16 cleanup_disk_archive................................................................................................571.9.17 cleanup_disk_backup................................................................................................571.9.18 cleanup_exp_dump...................................................................................................571.9.19 cleanup_ora_trace.....................................................................................................571.9.20 cleanup_owner ..........................................................................................................571.9.21 cleanup_sapdba_log .................................................................................................581.9.22 cleanup_xdb_log .......................................................................................................581.9.23 compress...................................................................................................................581.9.24 compress_cmd..........................................................................................................591.9.25 compress_dir.............................................................................................................591.9.26 copy_in_cmd .............................................................................................................601.9.27 copy_out_cmd...........................................................................................................601.9.28 cpio_disk_flags..........................................................................................................611.9.29 cpio_flags ..................................................................................................................611.9.30 cpio_in_flags .............................................................................................................611.9.31 dd_flags.....................................................................................................................611.9.32 dd_in_flags ................................................................................................................611.9.33 disk_copy_cmd .........................................................................................................621.9.34 dismount_cmd...........................................................................................................621.9.35 exec_parallel .............................................................................................................631.9.36 expir_period...............................................................................................................631.9.37 mount_cmd................................................................................................................641.9.38 mount_par_file...........................................................................................................641.9.39 new_db_home...........................................................................................................651.9.40 next_exclude .............................................................................................................651.9.41 next_limit_count ........................................................................................................651.9.42 next_max_size ..........................................................................................................661.9.43 next_owner................................................................................................................661.9.44 next_special ..............................................................................................................661.9.45 next_table..................................................................................................................661.9.46 orig_db_home ...........................................................................................................671.9.47 parallel_instances......................................................................................................671.9.48 primary_db ................................................................................................................671.9.49 remote_host ..............................................................................................................681.9.50 remote_user ..............................................................................................................681.9.51 restore_mode ............................................................................................................681.9.52 resync_cmd...............................................................................................................691.9.53 rewind........................................................................................................................701.9.54 rewind_offline ............................................................................................................701.9.55 rman_channels..........................................................................................................711.9.56 rman_diskratio...........................................................................................................711.9.57 rman_duplex..............................................................................................................711.9.58 rman_filesperset........................................................................................................711.9.59 rman_kbytes..............................................................................................................721.9.60 rman_maxopenfiles...................................................................................................721.9.61 rman_parms ..............................................................................................................721.9.62 rman_pool .................................................................................................................731.9.63 rman_proxy ...............................................................................................................731.9.64 rman_readrate...........................................................................................................731.9.65 rman_setsize .............................................................................................................731.9.66 saveset_members.....................................................................................................741.9.67 split_cmd ...................................................................................................................741.9.68 stage_copy_cmd .......................................................................................................741.9.69 stage_db_home ........................................................................................................751.9.70 stage_root_dir ...........................................................................................................751.9.71 stats_bucket_count ...................................................................................................75

  • BRCONNECT

    6 April 2002

    1.9.72 stats_change_threshold ............................................................................................761.9.73 stats_dbms_stats ......................................................................................................761.9.74 stats_exclude ............................................................................................................771.9.75 stats_info_cubes .......................................................................................................771.9.76 stats_limit_time..........................................................................................................771.9.77 stats_method.............................................................................................................771.9.78 stats_owner ...............................................................................................................781.9.79 stats_parallel_degree................................................................................................781.9.80 stats_sample_size.....................................................................................................791.9.81 stats_table .................................................................................................................791.9.82 tape_address.............................................................................................................791.9.83 tape_address_arch ...................................................................................................801.9.84 tape_address_ctl .......................................................................................................801.9.85 tape_address_ctl_arch..............................................................................................801.9.86 tape_address_rew.....................................................................................................811.9.87 tape_address_rew_arch............................................................................................811.9.88 tape_copy_cmd.........................................................................................................811.9.89 tape_pos_cmd...........................................................................................................831.9.90 tape_size ...................................................................................................................831.9.91 tape_size_arch..........................................................................................................831.9.92 tape_use_count.........................................................................................................841.9.93 uncompress_cmd......................................................................................................841.9.94 util_par_file ................................................................................................................841.9.95 volume_archive .........................................................................................................851.9.96 volume_backup .........................................................................................................85

    1.10 Monitoring the Oracle Database........................................................871.10.1 Space Management Alerts........................................................................................881.10.2 Database Performance Alerts ...................................................................................901.10.3 Database Backup and Restore Alerts.......................................................................921.10.4 Database R/3 Consistency Alerts .............................................................................931.10.5 Database Health Alerts .............................................................................................951.10.6 Information on Oracle Database Alerts...................................................................108

  • 1 BRCONNECT

    April 2002 7

    1 BRCONNECT

    This documentation is an extract from the following documentation: SAP Database Guide: Oracle Computing Center Management System (CCMS)You can find these at http://service.sap.com/dbaoraSince this is an extract, not all links can be resolved. Links marked [Ext.]could not be resolved because they point to sections outside this extract.

    UseThe SAP tool BRCONNECT for Oracle databases is used as:

    A database administration tool, which you can call yourself from the command line

    A utility tool, which BRBACKUP [Ext.] calls in the background

    BRCONNECT was originally only a utility tool. Now you can also start it fromthe command line and it has taken over some of the functionality of SAPDBA.Therefore, certain SAPDBA functions are no longer being developed.We strongly recommend you to use BRCONNECT rather than SAPDBAwhere the two tools perform the same tasks.

    BRCONNECT is specially designed to administer multi-schema databases, in which youhave more than one SAP System in the same Oracle database:

    SAPC11 SAPC12

    Oracle Database

    TablesTables

    C11 (R/3) C12 (CRM)

    Application Server Application Server

    Single Oracle Database

    SAPC11 SAPC12

    Features Database administration tool

    As a database administration tool, BRCONNECT has the following functions [Page 33]:

  • 1 BRCONNECT

    8 April 2002

    Main functions, which write a detailed [Page 47] and a summary [Page 48] log

    Check database system [Page 11], -f check [Page 34]

    Adapt next extents [Page 21], -f next [Page 37]

    Update statistics [Page 23], -f stats [Page 39]

    Clean up old logs and traces [Page 30], -f cleanup [Page 35]

    Additional functions [Page 31], which only write messages to the standard outputdevice

    Change passwords of SAP database users, -f chpass [Page 34]

    Create global synonyms, -f crsyn [Page 37] these are used by BR tools andSAPDBA

    Start database, -f dbstart [Page 33]

    Stop database, -f dbshut [Page 37]

    Determine database state, -f dbstate [Page 33]

    Utility tool - monitor database status during a backup

    BRBACKUP starts BRCONNECT during the backup to see if the status of the databasecorresponds to the backup mode. If you select backup mode online (backup_type =online), the database remains in this state during the backup.

    If you select backup mode offline (backup_type = offline or backup_type =offline_force), the database is shut down and remains in the closed state during thebackup.

    If the state of the database changes unexpectedly during the backup, BRCONNECTterminates the backup and displays the messages BR312E or BR313E. After the backup,the database is always restored to its original status. This means that the database is leftstarted, if it was running before the backup, or it is shut down, if it was shut down beforethe backup.

    BRCONNECT has many parameters, which you can specify in the Initialization Profileinit.sap [Page 49].

    ActivitiesFor more information about using BRCONNECT from the command line, see CommandOptions for BRCONNECT [Page 32].

  • 1 BRCONNECT

    1.1 New Features in SAP Release 6.20

    April 2002 9

    1.1 New Features in SAP Release 6.20There are the following new features in SAP Web Application Server (SAP Web AS) Release6.20:

    Support for Oracle 9i:

    SAPDBA [Ext.] and the BR tools [Ext.] now support Oracle 9i.

    RMAN backup without BACKINT:

    RMAN Backup with an External Backup Library [Ext.]

    SAP Note 420698

    Update statistics for partitioned tables with BRCONNECT:

    Update Statistics with BRCONNECT [Page 23]

    SAP Note 424243

    Update statistics for InfoCube tables with BRCONNECT:

    Update Statistics for InfoCube Tables [Page 27]

    SAP Note 428212

    BRCONNECT support for Oracle monitoring in SAP Transaction RZ20:

    Monitoring the Oracle Database [Page 87], especially Database Health Alerts [Page95]

    SAP Note 483659

    New command options and initialization profile parameters

    Command Options for BRCONNECT [Page 32]:

    -o|-output [Page 44]: new option process

    -f stats [Page 39]: new options -f nocasc and -vindex_store|cascade_store

    -f next [Page 37]: new option -f nocasc

    Initialization profile parameters:

    check_exclude [Page 55]: new values non_sap and all_part

    cleanup_check_msg [Page 56]

    next_exclude [Page 65]: new value all_part

    next_special [Page 66]: new value all_sel

    stats_dbms_stats [Page 76]

    stats_table [Page 79]: new value all_ind

    SAP Notes 419679, 424239, 445884, and 483639.

    SAPDBA support for online reorganization of single tables

    SAPDBA now supports online reorganization based on the Oracle internal PL/SQLfunctions. For more information, see Reorganizing a Single Table or Index [Ext.].

    SAPDBA support for LOB columns

  • 1 BRCONNECT

    1.1 New Features in SAP Release 6.20

    10 April 2002

    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 beforethe reorganization.

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    April 2002 11

    1.2 Database System Check withBRCONNECTUseYou can use BRCONNECT [Page 6] to check the Oracle database system. The aim is toprevent database problems that might lead to downtime for the database.

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA one, sapdba -check [Ext.]. The reason is that we willin future no longer develop the SAPDBA functions, whereas BRCONNECTfunctions will always be fully up-to-date.

    You can use BRCONNECT to check the following conditions:

    Database administration, such as configuration, space management, state of thedatabase, and so on

    Database operations, such as backup results, failed operations, and so on

    Critical database messages in the Oracle alert file, such as ORA-00600

    Incorrectly set database profile parameters in the init.ora file, such aslog_archive_start = false

    When a critical situation is discovered, BRCONNECT writes an alert message to the detaillog [Page 47] and to the results table DBMSGORA.

    IntegrationThe check conditions are specified in the control table DBCHECKORA. You can change thesewith transaction DB17. Detected alerts are also reported to the database monitor (transactionRZ20). For more information, see Monitoring the Oracle Database [Page 87].

    PrerequisitesBRCONNECT can also use internal default conditions, which mostly correspond to the initialstate of the DBCHECKORA table when we deliver it.

    For up-to-date information on the BRCONNECT default conditions, see SAPNote 435290.

    BRCONNECT Default Conditions for Database AdministrationSee BRCONNECT Default Conditions for Database Administration [Page 13].

    BRCONNECT Default Conditions for Database OperationsSee BRCONNECT Default Conditions for Database Operations [Page 18].

    BRCONNECT Default Conditions for Database MessagesYou can enter any Oracle error codes or error text as a condition name for this condition type.BRCONNECT searches the Oracle Alert log for corresponding Oracle error messages andmight generate Alert messages. The following Oracle error codes are taken into account forthe standard test conditions (-d option):

    ORA-00272 Error writing archive log

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    12 April 2002

    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 fileORA-01122 File verification check failed

    ORA-01135 Database file is offline

    ORA-01149 Cannot shutdown - 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 fordatabase messages using transaction DB17. You can also search any texts(character strings) in the Oracle Alert file by specifying the text in the PARAMfield. Since the search in the Oracle Alert file takes the upper/lower casespelling into account and the entry in the PARAM field is always converted intoupper case letters using DB17, the entry must be made using SQL withSQLPLUS, as in the following example:

    INSERT INTO DBCHECKORA (TYPE, PARAM, OBJECT, ACTIVE,SEVERITY, CHKOP, CHKVAL, UNIT, CHKREP, REPUNIT, MODFLAG,MODDATE, MODUSER, REACTION, CORRTYPE, CORRNAME, CHKDESC)VALUES ('ORA', 'Checkpoint not complete', ' ', 'Y', 'W',' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'D','Increase the size of online redo log files','Cannot switch to the next online redo log due to pendingcheckpoint');

    BRCONNECT Default Conditions for Database Profile ParametersThese test conditions check the values of Oracle parameters. The standard test conditionsfor the database profile (-d option) correspond to the current SAP recommendationsdescribed in note 124361 and 180605 (SAP BW).

    You can use transaction DB17 to easily adjust the test conditions for thedatabase profile parameters, depending on the changed recommendationsand for new Oracle releases.

    Downward compatibilityFor earlier SAP releases (up to Release 4.0B), BRCONNECT for SAP Web ApplicationServer 6.10 supports the old SAPDBA test conditions. In Releases 4.6X, however, you canreplace the old test conditions in table DBCHECKORA with the new ones. To do this, run thefollowing SQL script:

    sapserv*:/general/misc/sapdba/scripts/dbcheckora.sql

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    April 2002 13

    SQLPLUS> connect sapr3/SQLPLUS> @dbcheckora

    Then you can maintain the check conditions as of the specific service packages usingtransaction DB17 (see note 427673 for this). If required, you can also maintain the checkconditions using native SQL.

    Activities You run the checks regularly (for example, daily). We recommend you to use the

    Database Planning Calendar in the SAP System for this. For more information, seeDatabase System Check [Ext.].

    You use transaction DB16 to view alerts written by BRCONNECT to the results tableDBMSGORA. For more information, see Displaying Alert Messages from Database SystemCheck [Ext.].

    You use transaction DB17 to configure database system check. This includes activatingor deactivating check conditions and changing the threshold and severity levels (that is,error, warning, or exception). For more information, see Configuring Database SystemCheck (Oracle) [Ext.].

    You can exclude specified tables or indexes from the checks using the check_excludeparameter.

    For more information on the command line options for the database checks, see -f check[Page 34].

    1.2.1 BRCONNECT Default Conditions forDatabase AdministrationThe check conditions for database administration are specified in the control tableDBCHECKORA. For more information, see Database System Check with BRCONNECT [Page11].

    Condition Severity Level

    Description

    NOARCHIVELOG_MODE

    (formerly NOARCHIVELOG)

    Error Checks whether the database is in NOARCHIVELOGmode, which is not allowed for production databases.

    The OBJECT field is not specified for this condition.This condition does not have test operands,threshold values, or value units.

    ARCHIVER_STUCK

    (formerly ARCHIVE_STUCK)

    Warning Checks the highest fill level of the archiving directory(by default, saparch).

    The OBJECT field is not specified for this condition.

    Possible test operands, threshold values, value units:

    >, >=

    The space used is larger than (or the same as) % of the total space in the archivingdirectory.

    >, >=

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    14 April 2002

    The space used is larger than (or the same as) K|M|G bytes.

    =

    The space used is larger than (or the same as) K|M|G bytes.

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    April 2002 15

    TABLESPACE_IN_BACKUP

    (formerlyTSP_BACKUP_MODE)

    Warning This condition checks whether there are tablespacesthat have the BACKUP status although BRBACKUPis not active

    The OBJECT field is not specified for this condition.This condition does not have test operands,threshold values, or value units.

    TABLESPACE_FULL

    (formerly TSP_FULL)

    Warning This condition checks the maximum level oftablespaces on the database host. All tablespacesare checked by default against the same thresholdvalue. However, you can define different thresholdvalues for individual tablespaces by specifying thetablespace name in the OBJECT field of theDBCHECKORA table (transaction DB17).

    Possible test operands, threshold values, value units:

    >, >=

    The space used is larger than (or the same as) % of the total space in the tablespace.

    >, >=

    The space used is larger than (or the same as) K|M|G bytes.

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    16 April 2002

    threshold values, or value units.

    INVALID_FILE_TYPE

    (formerlyFILE_TYPE_UNKNOWN)

    Error This condition checks whether there are databasefiles that have an illegal operating system type, forexample, block raw files on Unix or compressed fileson Windows.

    The OBJECT field is not specified for this condition.

    This condition does not have test operands,threshold values, or value units.

    REDOLOG_FILE_MIRROR

    (formerly REDOLOG_MIRROR)

    Error This condition checks whether there are online redolog files that are not mirrored on the Oracle side.

    The OBJECT field is not specified for this condition.This condition does not have test operands,threshold values, or value units.

    CONTROL_FILE_MIRROR

    (formerly CONTROL_MIRROR)

    Error This condition checks whether there are control filesthat are not mirrored on the Oracle side.

    The OBJECT field is not specified for this condition.This condition does not have test operands,threshold values, or value units.

    FILE_OFFLINE

    (formerly DF_OFFLINE)

    Error This condition checks whether there are data files oronline redo log files that are OFFLINE.

    The OBJECT field is not specified for this condition.This condition does not have test operands,threshold values, or value units.

    CRITICAL_FILE Warning This condition examines the data files with anactivated auto extend feature. A check is made tosee whether the file system can be brought tooverflow, due to the existing parameter setting (NEXTand MAXSIZE) during the automatic filenameextension.

    The OBJECT field is not specified for this condition.This condition does not have test operands,threshold values, or value units.

    TOO_MANY_EXTENTS

    (formerly MANY_EXTENTS)

    Warning This condition checks whether there are tables orindices, for which the number of allocated extentsexceeds the specified threshold value. All tables orindices are checked by default against the samethreshold value. However, you can define differentthreshold values for individual tablespaces byspecifying the tablespace name in the OBJECT fieldof the DBCHECKORA table (transaction DB17).

    Possible test operands, threshold values, value units:

    >, >=

    More than % of the maximum number ofextents was already allocated.

    >, >=

    More than extents were already allocated

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    April 2002 17

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    18 April 2002

    The OBJECT field is not specified for this condition.This condition does not have test operands,threshold values, or value units.

    Since the check conditions for database administration are hard-coded inBRCONNECT (known as built-in check conditions), no new test conditionscan be added in the DBCHECKORA table. You can exclude individual tablesand indexes or even complete tablespaces from certain checks (which run attable or index level). To do this, specify the objects in the check_exclude[Page 55] parameter:check_exclude = [.] | [.] | | ()You can restrict the following check conditions in this way:TOO_MANY_EXTENTS, CRITICAL_SEGMENT, IN_WRONG_TABLESPACE,MISSING_INDEX, MISSING_STATISTICS, HARMFUL_STATISTICS

    1.2.2 BRCONNECT Default Conditions forDatabase OperationsThe check conditions for database operations are specified in the control table DBCHECKORA.For more information, see Database System Check with BRCONNECT [Page 11].

    Condition Severity Level

    Description

    LAST_ARCHIVE_FAILED Warning This condition checks whether the lastbackup of the offline redo log files withBRARCHIVE failed. BRCONNECT takesthe following function IDs into account:sve, cpy, ssv, svd, cpd, ssd,cps, cds

    The OBJECT field is not specified for thiscondition. This condition does not havetest operands, threshold values, or valueunits.

    LAST_BACKUP_FAILED Warning This condition checks whether the lastcomplete backup of the database withBRBACKUP failed. BRCONNECT takesthe following function IDs into account:afd, afp, afr, afs, aft, and,anp, anr, ans, ant, ffd, ffp,ffr, ffs, fft, fnd, fnp, fnr,fns, fnt

    The OBJECT field is not specified for thiscondition. This condition does not havetest operands, threshold values, or valueunits.

    LAST_STATS_FAILED Warning This condition checks whether the lastupdate of the optimizer statistics withBRCONNECT failed. BRCONNECT takes

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    April 2002 19

    the following function IDs into account:sta, aly

    These refer to the entire database.

    The OBJECT field is not specified for thiscondition. This condition does not havetest operands, threshold values, or valueunits.

    LAST_OPERATION_FAILED Warning This condition checks whether the lastDBA operation failed, which is identified bya function ID specified in the OBJECT fieldof the DBCHECKORA table.

    This condition does not have testoperands, threshold values, or value units.

    In SAP Releases 4.0 and 4.5, where theOBJECT field is not yet defined inDBCHECKORA, you can define thiscondition by specifying the function ID inthe PARAM field. You can also use thisconvention in later (including current) SAPreleases.

    ARCHIVE_TOO_OLD Warning This condition checks whether the lastsuccessful backup of the offline redo logfiles with BRARCHIVE is too old.BRCONNECT takes into account thefollowing function ids:sve, cpy, ssv, svd, cpd, ssd,cps, cds

    The OBJECT field is not specified for thiscondition. Possible test operands,threshold values, value units:>, >= D

    The last successful backup of the offlineredo log files is older than day(s).

    BACKUP_TOO_OLD Warning This condition checks whether the lastsuccessful complete backup of thedatabase with BRBACKUP is too old.BRCONNECT takes into account thefollowing function IDs:afd, afp, afr, afs, aft, and,anp, anr, ans, ant, ffd, ffp,ffr, ffs, fft, fnd, fnp, fnr,fns, fnt

    The OBJECT field is not specified for thiscondition. Possible test operands,threshold values, value units:

  • 1 BRCONNECT

    1.2 Database System Check with BRCONNECT

    20 April 2002

    >, >= D

    The last successful complete backup of thedatabase is older than day(s).

    STATS_TOO_OLD Warning This condition checks whether the lastsuccessful update of the

    Optimizer statistics with BRCONNECT istoo old. BRCONNECT takes the followingfunction ID into account:sta, aly

    The OBJECT field is not specified for thiscondition. Possible test operands,threshold values, value units:>, >= D

    The last successful update of the optimizerstatistics is older than day(s).

    OPERATION_TOO_OLD Warning This condition checks whether the lastsuccessful DBA operation, identified by afunction ID specified in the OBJECT field ofthe DBCHECKORA table, is too old.

    Possible test operands, threshold values,value units:>, >= D

    The last successful DBA operation is olderthan day(s).

    In SAP Releases 4.0 and 4.5, where theOBJECT field is not yet defined inDBCHECKORA, you can define thiscondition by specifying the function ID inthe PARAM field. You can also use thisconvention in later (including current) SAPreleases.

    Since the test conditions for database operations are programmed in aspecific way in BRCONNECT (known as built-in test conditions), no newcheck conditions can be added to the DBCHECKORA table. However, this isgenerally not necessary because operations can be monitored by theLAST_OPERATION_FAILED and OPERATION_TOO_OLD check conditions, orby specifying function Ids in the PARAM field.

  • 1 BRCONNECT

    1.3 Adapt Next Extents with BRCONNECT

    April 2002 21

    1.3 Adapt Next Extents with BRCONNECTUseYou can use BRCONNECT [Page 6] to adapt the next extents size. The aim is to avoid thestructure of tablespaces deteriorating that is, breaking up into a large number of smallextents because this reduces database performance.

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA one, sapdba -next [Ext.]. The reasonis that we will in future no longer develop the SAPDBA functions, whereasBRCONNECT functions will always be fully up-to-date.

    PrerequisitesThe database tables and indexes are assigned to one of a number of categories. Thestandard size of the next extent for each category is defined in the tables TGORA (for tables)and IGORA (for indexes).

    ActivitiesWhen a table requires adapting, the size of the next extent is determined using an algorithm.This also makes sure that the value of MAXEXTENTS for a table or index is not less than thevalue defined in the TGORA or IGORA table.

    You can exclude specified tables or indexes from this function by using the next_excludeparameter.

    You can specify individual values for NEXTEXTENTS or MAXEXTENTS using thenext_special parameter.

    For more information on the command line options for adapting the next extents, see -f next[Page 37].

    See also:Internal Rules for Determining Next Extent Size [Page 21]

    1.3.1 Internal Rules for Determining Next ExtentSizeThis algorithm is used by BRCONNECT to determine the next extent size when a table needsadapting. For more information, see Adapt Next Extents [Page 21].

    1. BRCONNECT works out the value of 10% of the space currently allocated to the table orindex.

    2. Using this value, BRCONNECT selects the next smaller category from the table TGORA(for tables) or IGORA (for indexes). The tables are shown below at the end of this section.

    3. BRCONNECT looks up the table in the DD09L table and selects the category given. TheDD09L is a data dictionary table in which most SAP tables are entered. If the table is notthere, size category 0 is assumed.

    4. BRCONNECT chooses the larger of the values from steps 2 and 3, if necessary reducingit to the value of next_max_size.

  • 1 BRCONNECT

    1.3 Adapt Next Extents with BRCONNECT

    22 April 2002

    5. If the required space is greater than the remaining free space in the tablespace and nofile in the affected tablespace permits an autoextend, BRCONNECT reduces the valuefrom step 4 to the size of the largest free space segment in the tablespace.

    6. BRCONNECT compares the value from step 5 with the current value of NEXTEXTENTand chooses the larger value.

    7. If the next_special parameter is defined for the table, BRCONNECT always uses thisinstead of the value determined so far.

    8. BRCONNECT reduces the value from step 7 to the next smaller multiple of 5 times thedatabase block size, to reduce free space wastage. The smallest possible value is 5times the database block size.

    9. BRCONNECT compares the value from step 8 with the current next extent size. If thereis a difference, it changes the NEXTEXTENT storage parameter of the table or index to thenewly determined next extent size.

    NEXT Values in TGORA/IGORA

    Sizecategory

    NEXT valuefor table (KB)

    NEXT value forindexes (KB)

    0 40 40

    1 160 80

    2 640 160

    3 2560 640

    4 10240 2560

    5 20480 5120

    6 40960 10240

    7 81920 20480

    8 163840 40960

    9 327680 81920

    10 655360 163840

    11 1310720 327680

    12 2621440 655360

    13 5242880 1310720

    14 10485760 2621440

  • 1 BRCONNECT

    1.4 Update Statistics with BRCONNECT

    April 2002 23

    1.4 Update Statistics with BRCONNECTUseYou can use this BRCONNECT [Page 6] function to update the statistics on the Oracledatabase for the cost-based optimizer.

    By running update statistics regularly, you make sure that the database statistics are up-to-date, so improving database performance. The Oracle cost-based optimizer (CBO) uses thestatistics to optimize access paths when retrieving data for queries. If the statistics are out-of-date, the CBO might generate inappropriate access paths (such as using the wrong index),resulting in poor performance.

    From Release 4.0, the CBO is a standard part of the SAP System. If statistics are availablefor a table, the database system uses the cost-based optimizer. Otherwise, it uses the rule-based optimizer.

    BRCONNECT supports update statistics for the following:

    Partitioned tables, except where partitioned tables are explicitly excluded by setting theactive flag in the DBSTATC table to I. For more information, see SAP Note 424243.

    InfoCube tables [Page 27] for the SAP Business Information Warehouse (SAP BW)

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA functionality:

    sapdba -statistics [Ext.] sapdba -analyze [Ext.] sapdba -delete [Ext.] sapdba -checkopt [Ext.]

    The reason is that we will in future no longer develop the SAPDBA functions,whereas BRCONNECT functions will always be fully up-to-date.

    IntegrationYou can update statistics using one of the following methods:

    DBA Planning Calendar in the Computing Center Management System (CCMS)

    For more information, see Update Statistics for the Cost-Based Optimizer in CCMS(Oracle) [Ext.]. The DBA Planning Calendar uses the BRCONNECT commands.

    We recommend you to use this approach because you can easily scheduleupdate statistics to run automatically at specified intervals (for example,weekly).

    BRCONNECT, as described here

    SAPDBA [Ext.] we strongly recommend you not to use this approach

    PrerequisiteTo use the CBO, make sure that the parameter OPTIMIZER_MODE in the Oracle initializationprofile init.ora [Ext.] is set to CHOOSE.

    FeaturesBRCONNECT performs update statistics using a two-step approach.

  • 1 BRCONNECT

    1.4 Update Statistics with BRCONNECT

    24 April 2002

    BRCONNECT:

    1. Checks each table to see if the statistics are out-of-date

    2. If required, updates the statistics on the table immediately after the check

    For more information about how update statistics works, see Internal Rules for UpdateStatistics [Page 26].

    ActivitiesYou can influence how update statistics works by using the -force options. For moreinformation, see -f stats [Page 39].

    Unless you have special requirements, we recommend you to perform thestandard update statistics, using one of the following tools to schedule it on aregular basis (for example, weekly):

    DBA Planning Calendar, as described above in "Integration." 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. Itruns using the OPS$ user without operator intervention.

    The following are also standard commands that you can use to update statistics:

    Update statistics only for tables and indexes with missing statisticsbrconnect -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

    ExampleFor examples of how you can override the internal rules for update statistics [Page 26], see -force with Update Statistics [Page 24].

    1.4.1 -force with Update StatisticsThis section gives examples of how you can use the -force options to override the internalrules for update statistics [Page 26]. For more information about the -force options, see -fstats [Page 39].

    Only use these options in exceptional circumstances.

    Check and update statistics for all tables in tablespace PSAPBTAD, including pool andcluster tablesbrconnect -u / -c -f stats -t psapbtabd -f allsel

    Update statistics without check for all tables relevant to the application monitorbrconnect -u / -c -f stats -t dbstatc_mon -f collect

    Update statistics for a pool table specified in the DBSTATC table, to determine spaceusage, using method "estimate 10% rows"brconnect -u / -c -f stats -t atab -m EI -s P10 -fallsel,method,sample

  • 1 BRCONNECT

    1.4 Update Statistics with BRCONNECT

    April 2002 25

    BRCONNECT stores the space usage data in tables DBSTATTORA (for tables) andDBSTATIORA (for indexes). Finally, the statistics are immediately deleted.

    If you want to keep the statistics for example, for test purposes you must include thekeep option in the command, as follows:

    brconnect -u / -c -f stats -t rfblg -m EI -s P10 -fallsel,method,sample,keep

    Check and update statistics according to the two-phase concept:

    a. First phase: Check statisticsbrconnect -u / -c -f stats -t all -f nocoll

    b. Second phase: Update statistics on tables identified in the first phasebrconnect -u / -c -f stats -t all -f nocheck

    1.4.2 Deletion of Damaging StatisticsUseThis section describes how BRCONNECT deletes damaging statistics for the cost-basedoptimizer of the Oracle database.

    Pool and cluster tables and tables that have the ACTIVE flag set to N or R in the DBSTATCcontrol table should not normally have statistics, since such statistics can negatively affectdatabase performance.

    ActivitiesIn the standard update statistics run, using brconnect -f stats -t all, BRCONNECTchecks whether such damaging statistics exist and deletes them if so.

    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), you can use the option -fallsel:

    brconnect -u / -c -f stats -t sdbah,sdbad -d -f allsel

    1.4.3 Verification of Table and Index StructureUseThis section describes how you can use BRCONNECT for the Oracle database to check theinternal structure of table and index blocks. This is an alternative to DBVERIFY. However, thescope of the checks is not the same.

    ExampleTo check the structure of all tables and their indexes in the tablespace PSAPBTABD, enterthe following command:

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

  • 1 BRCONNECT

    1.4 Update Statistics with BRCONNECT

    26 April 2002

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

    1.4.4 Internal Rules for Update StatisticsThis algorithm is used by BRCONNECT to update statistics. For more information, seeUpdate Statistics with BRCONNECT [Page 23].

    1. BRCONNECT determines the working set of tables and indexes to be checked andupdated. To do this, it uses:

    Options -t|-table and -e|-exclude, as described in -f stats [Page 39] (theseoptions take priority)

    stats_table [Page 79] and stats_exclude [Page 77] parameters

    2. If the working set contains pool, cluster or other tables that have the ACTIVE flag in theDBSTATC table set to N or R, BRCONNECT immediately deletes the statistics for thesetables, because they negatively affect database performance.

    3. BRCONNECT checks statistics for the remaining tables in the working set, includingtables 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 ofinserted, deleted, and updated rows from the DBA_TAB_MODIFICATIONS table (thisis available from Oracle 8.1 onwards).

    Otherwise, BRCONNECT uses the standard method (see table below) to updatestatistics by using the unique index.

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

    Method and sample defined for the table in the DBSTATC table (hashighest priority)

    Method and sample from the options -m|-method or -s|-sampleof -f stats -method [Page 39] (takes priority) or the stats_method[Page 77] and stats_sample_size [Page 79] parameters

    Default method and sample (has lowest priority)The following table describes the default method:

    Number of rows in table Analysismethod

    Sample size

    Rows < 10,000 C

    10,000

  • 1 BRCONNECT

    1.4 Update Statistics with BRCONNECT

    April 2002 27

    For the CI, CX, EI and EX methods, the structure of indexes is validated inaddition to collecting statistics.

    4. BRCONNECT uses the number of new rows for each table in the working set, as derivedin 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 39] or thestats_change_threshold [Page 76] 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, BRCONNECTvalidates the structure of all associated indexes and writes the results to theDBSTATIORA table and also, for tables with the DBSTATC history flag or usage type A, tothe DBSTAIHORA table.

    8. BRCONNECT immediately deletes the statistics that it created in this procedure fortables with the ACTIVE flag set to N or R in the DBSTATC table.

    1.4.5 Update Statistics for InfoCube TablesUseThe InfoCube tables used in SAP Business Information Warehouse (SAP BW) and AdvancedPlanner and Optimizer (APO) need to be processed in a special way when the statistics arebeing updated. Usually, statistics should be created using histograms, as described in SAPNote 129252.

    Statistics for the InfoCube tables can be updated, together with other tables in a run. In thiscase, the statistics for the InfoCube tables are always created with histograms. You specifywhich tables are to be handled as InfoCube tables using the init.sap parameterstats_info_cubes [Page 77].

    PrerequisitesThe control table RSNSPACE for Business Information Warehouse (BW) and AdvancedPlanner and Optimizer (APO) dynamically determines which tables are to be handled asInfoCube tables. The content of the control table might change in future.

    FeaturesTables whose names start with the following prefixes are dealt with by BRCONNECT asInfoCube tables:/BIC/F*, /BIC/A9F*,

  • 1 BRCONNECT

    1.4 Update Statistics with BRCONNECT

    28 April 2002

    /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.sap parameterstats_info_cubes, that you can use to include the following kinds of tables in the list ofInfoCube 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 firstposition, as in the following example:stats_info_cubes = (DEFAULT, XYZ*)To suppress special handling of the InfoCube tables completely, use thekeyword NULL:stats_info_cubes = NULLIf certain prefixes are omitted in the parameter definition, the correspondingtables are not to be handled as InfoCube tables. However, we do notrecommend you to do this.

    For additional, special handling of InfoCube tables, you can use the keyword INFO_CUBESfor the following:

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

    init.sap parameters:

    stats_table [Page 79]

    stats_exclude [Page 77]

    stats_dbms_stats [Page 76]

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

  • 1 BRCONNECT

    1.4 Update Statistics with BRCONNECT

    April 2002 29

    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:4brconnect -u / -c -f stats -t all

    Statistics are checked for all tables and updated, if necessary. New statistics for InfoCubetables are created with the DBMS_STATS package using row sampling and an internalparallel degree of 4.

    For more information, see stats_dbms_stats [Page 76].

    brconnect -u / -c -f all

    This is the default. Statistics are checked for all tables and updated, if necessary. IfInfoCube tables are present and selected following the update check, statistics aregenerated for them using histograms.

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

  • 1 BRCONNECT

    1.5 Clean Up Old Logs and Traces with BRCONNECT

    30 April 2002

    1.5 Clean Up Old Logs and Traces withBRCONNECTUseYou can use BRCONNECT [Page 6] to clean up old log files, disk backups, export files, tracefiles and database logs. The aim is to avoid unnecessary use of disk space by deleting filesthat are no longer required.

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA one, sapdba -cleanup [Ext.]. The reason is that wewill in future no longer develop the SAPDBA functions, whereasBRCONNECT functions will always be fully up-to-date.

    FeaturesBRCONNECT 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 SAPDBA logs in the sapreorg directory

    BRBACKUP disk backups of the database files

    BRARCHIVE disk backups of the offline redo log files

    SAPDBA 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

    ActivitiesUsing the cleanup parameters in the Initialization Profile init.sap [Page 49] you candetermine how old the objects are before they are deleted. For example, seecleanup_brarchive_log [Page 56].

    For more information on the command line options for cleaning up the log files, see -f cleanup[Page 35].

  • 1 BRCONNECT

    1.6 Additional BRCONNECT Functions

    April 2002 31

    1.6 Additional BRCONNECT FunctionsUseThese additional BRCONNECT [Page 6] functions only write messages to the standardoutput device.

    We strongly recommend you to use BRCONNECT functions rather than theequivalent SAPDBA ones [Ext.] (if one is available, this is indicated below).The reason is that we will in future no longer develop the SAPDBA functions,whereas BRCONNECT functions will always be fully up-to-date.

    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 workprocesses of the application server use this password to connect to the database.

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

    Use this function rather than sapdba -alter_user [Ext.].

    Setting Up SAP DBA Synonyms

    You can use this function to specify the SAP System for database administrationactivities in a multi-schema database. You can then start and monitor database actions inthe specified SAP System.

    For more information, see -f crsyn [Page 37].

    Starting the Database Instance

    You can start the database instance using -f dbstart. There are no function optionsfor this.

    Use this function rather than sapdba -startup(_dba) [Ext.].

    Stopping the Database Instance

    You can use this function to stop the database instance. BRCONNECT first checkswhether an SAP System is still running.

    For more information, see -f dbshut [Page 37].

    Use this function rather than sapdba -shutdown(_abort) [Ext.].

    Determine Database State

    You can use this function to determine the database state. The return codes have thefollowing 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.

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    32 April 2002

    1.7 Command Options for BRCONNECTThis section describes the command options for the BRCONNECT tool.

    If you use BRCONNECT with command options, these override the corresponding values inthe initialization profile init.sap [Page 49]. To use the options, you can specify eitherletter indicated or the complete word.

    We strongly recommend you to use BRCONNECT functions rather than theequivalent SAPDBA ones [Ext.]. The reason is that we will in future no longerdevelop the SAPDBA functions, whereas BRCONNECT functions will alwaysbe fully up-to-date.

    SyntaxThe syntax of a BRCONNECT command is:brconnect [] -f|-function []

    brconnect -output detail -function check -default

    Optionsbrconnect

    [-c|-confirm][-h|-help []|[version]][-l|-language E|D][-o|-output detail|process|summary|[,]time][-p|-profile ][-q|-query [check]][-s|-sapsid |][-u|-user [[/]]][-V|-VERSION]-f|-function []See also:-c|-confirm [Page 33]

    -h|-help [Page 43]

    -l|-language [Page 44]

    -o|-output [Page 44]

    -p|-profile [Page 44]

    -q|-query [Page 44]

    -s|-sapsid [Page 45]

    -u|-user [Page 45]

    -V|-VERSION [Page 46]

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    April 2002 33

    -f|-function [Page 33]

    1.7.1 -c|-confirmThis BRCONNECT command option activates processing in unattended mode.

    Input syntax: -c|-confirmDefault value: Confirmation required for processing to be started.

    Use this option if BRCONNECT is started by an automatic scheduler such as cron (UNIX) orat (Windows NT).

    1.7.2 -f|-functionThis BRCONNECT command option specifies the function to be performed. You must alwaysenter a function.

    We strongly recommend you to use BRCONNECT functions rather than theequivalent SAPDBA ones [Ext.] (if one is available, this is indicated at thelinks below). The reason is that we will in future no longer develop theSAPDBA functions, whereas BRCONNECT functions will always be fully up-to-date.

    Input syntax: -fchpass|crsyn|dbshut|dbstart|dbstate|check|cleanup|next|statsDefault value: None, since you must always specify a function option

    Function Options check

    Checks the database system [Page 34]

    chpass

    Changes the password of SAP database users [Page 34]

    cleanup

    Cleans up database logs [Page 35]

    crsyn

    Creates public synonyms for tables [Page 37] used by BRARCHIVE, BRBACKUP,BRCONNECT, and SAPDBA

    dbshut

    Shuts down the database [Page 37]

    dbstart

    Starts up the database (no additional options)

    dbstate

    Checks the database state (no additional options)

    next

    Adapts next extents [Page 37]

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    34 April 2002

    stats

    Updates optimizer statistics [Page 39]

    -f checkThis BRCONNECT function [Page 33] checks the database system. For more information,see Database System Check [Page 11].

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA one, sapdba -check [Ext.]. The reason is that we willin future no longer develop the SAPDBA functions, whereas BRCONNECTfunctions will always be fully up-to-date.

    Function options:

    -d|-default: Uses internal BRCONNECT default settings to check the databasesystem

    Input syntax: -d

    Default value: Uses settings from the control table DBCHECKORA .

    -e|-exclude: Defines tables and indexes to be excluded from the checkInput syntax: -e[.],[.],||non_sap|all_part|nullnon_sap means that non-SAP objects (for example, Oracle dictionary objects) areexcluded from the check.

    all_part means that SAP partitions (such as in Business Information Warehouse andAdvanced Planner and Optimizer) are excluded from the check.

    null invalidates the exclusion list defined by the check_exclude [Page 55] 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 parametersor statistics handling.

    This option overrides the check_exclude [Page 55] parameter.

    -o|-owner: Defines the database owner of tables and indexes to be checkedInput syntax: -o [,,...]

    Default value: All SAP owners in a multi-schema database or SAPR3/SAP in astandard SAP database

    This option overrides the check_owner [Page 56] parameter.

    -f chpassThis BRCONNECT function [Page 33] changes the database user password.

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA one, sapdba -alter_user [Ext.]. The reason is that we

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    April 2002 35

    will in future no longer develop the SAPDBA functions, whereasBRCONNECT functions will always be fully up-to-date.

    Function options:

    -o|-owner: Defines for which database owner (that is, user) the password is to bechanged.

    Input syntax: -o [,,...]

    Default value: SAPR3/SAP in a standard SAP database or all SAP owners in amulti-schema database

    -p|-password: Defines the password for the SAP database owner (that is, user)Input syntax: -p

    Default value: interactive entry of the password

    -f cleanupThis BRCONNECT function [Page 33] cleans up the database logs. For more information,see Clean Up Old Logs and Traces [Page 30].

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA one, sapdba -cleanup [Ext.]. The reason is that wewill in future no longer develop the SAPDBA functions, whereasBRCONNECT functions will always be fully up-to-date.

    Function options:

    -a|-archive: Defines the retention period in days for BRARCHIVE detail log filesInput syntax: -a

    Default: 30

    This option controls which BRARCHIVE log files are deleted by the BRCONNECTcleanup function. It overrides the cleanup_brarchive_log [Page 56] parameter.

    -b|backup: Defines the retention period in days for BRBACKUP detail log filesInput syntax: -b

    Default: 30

    This option controls which BRBACKUP log files are deleted by the BRCONNECTcleanup function. It overrides the cleanup_brbackup_log [Page 56] parameter.

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

    Default: 30

    This option controls which BRCONNECT log files are deleted by the BRCONNECTcleanup function. It overrides the cleanup_brconnect_log [Page 56] parameter

    -d|-dblog: Defines the retention period in days for records in the tables SDBAH andSDBAD

    Input syntax: -d

    Default: 100

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    36 April 2002

    This option controls which records in the tables SDBAH and SDBAD are deleted by theBRCONNECT cleanup function. It overrides the cleanup_db_log [Page 57] parameter.

    -e|-expdump: Defines the retention period in days for SAPDBA export dumps andscripts

    Input syntax: -e

    Default: 30

    This option controls which directories and their contents for SAPDBA export dumps andscripts are deleted by the BRCONNECT cleanup function. It overrides thecleanup_exp_dump [Page 57] parameter.

    -i|-diskarch: Defines the retention period for offline redo log files saved on disk.Input syntax: -i

    Default: 30

    This option controls which offline redo log files backed up on disk are deleted by theBRCONNECT cleanup function. It overrides the cleanup_disk_archive [Page 57]parameter.

    -k|-diskback: Defines the retention period in days for database files saved on disk.Input syntax: -k

    Default: 30

    This option controls which database files backed up on disk are deleted by theBRCONNECT cleanup function. It overrides the cleanup_disk_backup [Page 57]parameter.

    -l|-limit: Defines that only objects explicitly specified by other function options are tobe cleaned up

    Input syntax: -l

    Default: Clean up all database logs

    -m|-msg: This parameter defines the retention period in days for the alert messagesfrom the database check runs. The messages are deleted from the DBMSGORA tablewhen the retention period has expired.

    This option overrides the cleanup_check_msg [Page 56] parameter.

    -o|-owner: Defines the database owner of SDBAH, SDBA, DBMSGORA, and XDB tables tobe processed by BRCONNECT cleanup function.

    Input syntax: -o [,,...]

    Default: SAPR3/SAP in a standard SAP database or all SAP owners in a multi-schema database

    This option overrides the cleanup_owner [Page 57] parameter.

    -r|-restore: Defines the retention period in days for BRRESTORE detail log filesInput syntax: -r

    Default: 30

    This option controls which BRRESTORE log files are deleted by the BRCONNECTcleanup function. It overrides the cleanup_brrestore_log [Page 56] parameter.

    -s|-sapdba: Defines the retention period in days for SAPDBA log files

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    April 2002 37

    Input syntax: -s

    Default: 30

    This option controls which SAPDBA log files are deleted by the BRCONNECT cleanupfunction. It overrides the cleanup_sapdba_log [Page 58] parameter.

    -t|-trace: Defines the retention period in days for Oracle trace and audit filesInput syntax: -t

    Default: 30

    This option controls which Oracle trace and audit files are deleted by the BRCONNECTcleanup function. It overrides the cleanup_ora_trace [Page 57] parameter.

    -x|-xdb: Defines the retention period in days for records in the XDB tablesInput syntax: -x

    Default: 100

    This option controls which records in the XDB tables are deleted by the BRCONNECTcleanup function. It overrides the cleanup_xdb_log [Page 58] parameter.

    -f crsynThis BRCONNECT function [Page 33] creates public synonyms for the SAP tools.

    Function options:

    -o|-owner: Defines the database owner pointed to by the public synonyms used byBRARCHIVE, BRBACKUP, BRCONNECT, and SAPDBA.

    Input syntax: -o

    Default value: SAPR3/SAP

    -f dbshutThis BRCONNECT function [Page 33] shuts down the database in immediate mode.

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA one, sapdba -shutdown(_abort) [Ext.]. The reason isthat we will in future no longer develop the SAPDBA functions, whereasBRCONNECT functions will always be fully up-to-date.

    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 nextThis BRCONNECT function [Page 33] adapts the next extents of database tables. For moreinformation, see:

    Adapt Next Extents [Page 21]

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    38 April 2002

    Algorithm for Determining Next Extent Size [Page 21]

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA one, sapdba -next [Ext.]. The reasonis that we will in future no longer develop the SAPDBA functions, whereasBRCONNECT functions will always be fully up-to-date.

    Function options:

    -e|-exclude: Defines tables and indexes to be excluded from adapting next extentsInput syntax: -e[.],[.],||all_part|nullDefault: No exclusion, process all selected objects

    all_part means that SAP partitions (such as in Business Information Warehouse andAdvanced Planner and Optimizer) are excluded from the check.

    null invalidates the exclusion list defined by the next_exclude [Page 65] parameter.This means that no tables or indexes are excluded from processing.

    You can use this option to exclude from processing tables or indexes with exceptionalspace parameters. This option overrides the next_exclude [Page 65] parameter.

    -f|-force: Forces the next extent size of all selected tables and indexes to be reducedto the maximum free extent size in the tablespace or to the maximum next extent size(next_max_size parameter) if required.

    Input syntax: -f free|max|both|nocascDefault: both

    The next extent size is not normally reduced, but only rounded down to the next multipleof 5 times the database block size.

    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, you can prevent the check and, if necessary, theadjustment of NEXT extents from being implicitly performed for all indexes for theselected tables. This option is only provided for exceptional situations.

    -l|-limit: Defines the maximum number of next extents (MAXEXTENTS)Input syntax: -l

    Default: Settings from tables TGORA and IGORA

    0 means unlimited number of extents

    This option overrides the next_limit_count [Page 65] parameter.

    -m|-max: Defines the maximum size for next extents, which must not be exceededwhen a next extent is adapted

    Input syntax: -m

    Default: 2 GB - 5 *

    0 means unlimited next extent size

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    April 2002 39

    You can specify this option in KB, MB, or GB. This option overrides the next_max_size[Page 66] parameter.

    -o|-owner: Defines the database owner of tables and indexes to be processedInput syntax: -o [,,...]

    Default: SAPR3/SAP in a standard database or all SAP owners in a multi-schemadatabase.

    This option overrides the next_owner [Page 66] parameter.

    -s|-special: Defines special sizes of next extent and maximum number of nextextents for exceptional tables and indexes

    Input syntax: -s|-special[.]:[/]|[.]:[/]||all_sel:[/]|nullDefault: Derived from internal rules for determining next extent size [Page 21]

    This option overrides the next_special [Page 66] parameter.

    : size of next extent for specified table or index (NEXTEXTENT)

    : maximum number of next extents for specified table or index(MAXEXTENTS)

    all_sel: sets NEXTEXTENT and MAXEXTENTS attributes to a certain value for allthe database objects selected using the -t function option or the next_tableparameter (see below).This option is provided for exceptional situations.

    null invalidates the special list defined by the next_special [Page 66] parameter. Itmeans that no tables or indexes are to be processed in a special way.

    -t|-table: Defines the database objects (that is, tables, indexes, or tablespaces) to beprocessed

    Input syntax: -tall|special|[.]|[.]||Default: All objects of selected owners

    all: All SAP tables and indexes

    special: Only tables and indexes defined in the next_special [Page 66] parameter

    This option overrides the next_table [Page 66] parameter.

    -f statsThis BRCONNECT function [Page 33] updates optimizer statistics. For more information, seeUpdate Statistics [Page 23].

    We strongly recommend you to use this BRCONNECT function rather thanthe equivalent SAPDBA ones:

    sapdba -statistics [Ext.] sapdba -analyze [Ext.] sapdba -delete [Ext.] sapdba -checkopt [Ext.]

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    40 April 2002

    The reason is that we will in future no longer develop the SAPDBA functions,whereas BRCONNECT functions will always be fully up-to-date.

    Function options:

    -b|-bucket: Defines the number of buckets in histogramsInput syntax: -b

    Default: 75

    This option overrides the stats_bucket_count [Page 75] parameter.

    -c|change: Changes threshold for the percentage of inserted or deleted rows causingupdate statistics

    Input syntax: -c

    Default: 50

    This option overrides the stats_change_threshold [Page 76] parameter.

    -d|-delete: Deletes only damaging table and index statisticsInput syntax: -d

    Default: Collect outdated and delete damaging statistics

    You can use this option to delete statistics for pool and cluster tables, and for tablesspecified in the DBSTATC control table with the active flags set to N or R.

    -e|-exclude: Defines tables and indexes to be excluded from update statisticsInput syntax: -e[.],[.],||info_cubes|nullinfo_cubes excludes check and update statistics for InfoCube tables.

    null invalidates the exclusion list defined by the stats_exclude [Page 77] parameter.This means that no tables or indexes are excluded from processing.

    Default: no exclusions

    You can use this option to exclude tables or indexes with exceptional statistics handling.This option overrides the stats_exclude [Page 77] parameter.

    -f|-force: Forces a specific action while updating statisticsInput syntax: -f[allsel][,collect][,history][,keep][,limit][,method][,nocasc][,nocheck][,nocoll][,precision][,sample]

    Default: Internal rules [Page 26] determine the update statistics method [Page 26]

    allsel: Updates statistics for all selected objects (option -t or the stats_tableparameter), including pool and cluster tables, or deletes statistics for selectedobjects, 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 DBSTATHORAand DBSTAIHORA, 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

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    April 2002 41

    limit: Forces hard processing time limit defined in option -l or stats_limit_time[Page 77] parameter. Working threads are aborted.

    method: Uses the method defined in option -m or stats_method [Page 77]parameter, also for tables specified in DBSTATC. See stats_method [Page 77]parameter

    nocasc: Prevents update statistics from being implicitly performed for all indexes ofthe selected tables. Only use this option in exceptional situations.

    nocheck: Does not check statistics. Instead, determine which tables to updatestatistics for by using the check results from the previous BRCONNECT run with -fnocoll. This is part of the two-phase concept for update statistics.

    nocoll: Checks statistics only by analyzing the primary index. Statistics are updatedfor tables that need new statistics in the next BRCONNECT run with -f nocheck.This is part of the two-phase concept for update statistics.

    precision: Forces minimum precision (that is, sample size) defined in option -s orstats_sample_size [Page 79] parameter for all tables if statistics are collected withmethod E.

    sample: Uses sample size defined in option -s or stats_sample_size [Page 79]parameter, also for tables specified in the control table DBSTATC

    -h|-history: Stores the results of updating statistics in the history tables DBSTATHORAand DBSTAIHORA for tables not specified in DBSTATC.

    Input syntax: -h

    Default: no history records are saved

    The history data in the tables DBSTATHORA and DBSTAIHORA is used by the applicationmonitor.

    -l|-limit: Defines the processing time limit in minutes for updating statisticsInput syntax: -l

    Default: 0, no limit

    You can use this parameter to terminate long-running update statistics jobs after a certainperiod of time. The processing terminates after statistics have been collected for thecurrent table or index (this is the "soft limit"). If you set the option -f limit (see above),processing terminates immediately (this is the "hard limit").

    This option overrides the stats_limit_time [Page 77] parameter.

    -m|-method: Defines the method for updating statistics for tables that are not specifiedin the control table DBDSTATC.

    Input syntax: -m E|EH|EI|EX|C|CH|CX|E=|C=|=H|=I|=X|+H|+IDefault: Internal rules [Page 26] determine the update statistics method

    This option overrides the stats_method [Page 77] parameter.

    E: Estimates

    EH: Estimates with histograms

    EI: Estimates with index validation

    EX: Estimates with histograms and index validation

    C: Computes

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    42 April 2002

    CH: Computes with histograms

    CI: Computes with index validation

    CX: Computes with histograms and index validation

    E=: Forces estimate for all tables, including tables in DBSTATC control table. Option -fmethod must be set

    C=: Forces compute for all tables, including tables in DBSTATC control table. Option -fmethod must be set

    =H: Forces collect statistics with histograms for all tables, including tables in DBSTATCcontrol table. Option -f method must be set

    =I: Forces collect statistics with index validation for all tables, including tables inDBSTATC control table. Option -f method must be set

    =X: Forces collect statistics with histograms and index validation for all tables, includingtables in DBSTATC control table. Option -f method must be set

    +H: Forces collect statistics with histograms for all tables, including tables in DBSTATCcontrol table in addition to index validation, if specified in DBSTATC control table. Option -f method must be set.

    +I: Forces collect statistics with index validation for all tables, including tables inDBSTATC control table in addition to index validation, if specified in DBSTATC controltable. Option -f method must be set.

    -o|-owner: Defines the database owner of tables and indexes for updating statisticsInput syntax: -o [,,...]

    Default: SAPR3/SAP in a standard SAP database or all SAP owners in a multi-schema database

    This option overrides the stats_owner [Page 78] parameter.

    -p|-parallel: Defines the number of parallel threads for updating statisticsInput syntax: -p

    Default: 1

    For example, you can set this parameter to the number of CPUs to speed up updatestatistics.

    This option overrides the stats_parallel_degree [Page 78] parameter.

    -r|-retain: Skips check and update of statistics of tables for which statistics werechecked or updated in the specified time period

    Input syntax: -r |lastDefault: last

    : Skips tables and indexes for which statistics were checked or updated inthe last days

    last: Skips tables and indexes for which statistics were checked or updated in thelast BRCONNECT run. You can use this option to restart an aborted BRCONNECTrun of update statistics.

    -s|-sample: Defines the sample size in percentage or thousands of rows for updatingstatistics with method E for tables that are not specified in the DBSTATC control table.

  • 1 BRCONNECT

    1.7 Command Options for BRCONNECT

    April 2002 43

    Input syntax: -s P|RDefault: Internal rules [Page 26] determine the update statistics method

    This option overrides the stats_sample_size [Page 79] parameter.

    P: Percentage of rows

    R: Number of thousand rows

    -t|-table: Defines the objects to be processed by update statistics.Input syntax: -tall|all_ind|missing|dbstatc_tab|dbstatc_mon|dbstatc_mona|[.]|[.]|||info_cubes

    This option overrides the stats_table [Page 79] parameter.

    all: All SAP tables and indexes

    all_ind: Processes all indexes only. For example, you can use this to create thespace statistics for all indexes.

    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 relevantfor the application monitor

    dbstatc_mona: Only application tables specified in the DBSTATC control table thatare relevant for the application monitor

    info_cubes checks statistics only for InfoCube tables and updates them ifnecessary.

    -v|-validate: Validates a table or index structure, but no update statistics is performedInput syntax: -v table|index|cascade|index_store|cascade_storeDefault: cascade

    table: Validate internal structure of table blocks

    index: Validate internal structure of index blocks

    cascade: Validate internal structure of table and index blocks, including relationbetween index and da