Pages

Saturday, 27 July 2013

BRSPACE

BRSPACE??

* Instance management
------------------------------
- Start up database
- Shut down database
- Alter database instance
- Alter database parameters
- Show instance status
- Show database parameters

* Space management
----------- ----------------
- Extend tablespace
- Create tablespace
- Drop tablespace
- Alter tablespace
- Alter data file
- Move data file
- Show tablespaces
- Show data files
- Show redolog files
- Show control files
- Show diska volumes

* Segment management
------------------------------
- Reorganize tables (online)
- Rebuild indexes (online)
- Export tables- Import tables- Alter tables- Alter indexes
- Show tables
- Show indexes
- Show table partitions
- Show index partitions
- Show segments
- Show segment extents
- Show free extents

Checking BR*Tools Release Information

pat2036:oras94 4> brtools –V | brspace -V
BR0651I BRTOOLS 6.40 (40)
Patch Date Info

36 2006-01-11 Small functional enhancements in BR*Tools (note 914174)
38 2006-03-29 BR*Tools support for MDM databases (note 936665)
40 2006-08-30 Wrong message numbers in BR*Tools 6.40 (note 976755)

release note 680046
kernel release 640
patch date 2006-08-30
patch level 40
make platform rs6000_64
make mode OCI_920
make date Sep 5 2006
Summary of the BR Tools

What is BRBACKUP - Backs up data files, conrol files, and online redo log files of the database.
What is BRARCHIVE - Backs up offline redo log files
What is BRRESTORE - Restores data files, control files, and redo log files
What is BRRECOVER - Recovers database files and restores profiles and log files
What is BRSPACE - Manages the database instance, space, and segments (that is, tables and indexes)
What is BRCONNECT - Performs database administration tasks such as statistics update, check database system, adapt next extents, clean up logs and DBA tables. Functions as a help tool to monitor the database during a backup
What is BRTOOLS - Displays the menus from which the other BR programs are called. Functions as an internal help tool started by BRBACKUP, BRARCHIVE, and BRRESTORE.
What is BRGUI - Functions as a Java-based GUI, working as the front-end display program for BR*Tools
Initialization Profile BR* Tools uses the initialization profile init<SID>.sap as a input file.The following are the important parameters in the init<SID>.sap file Ø

exp_dump_dir
exp_table
Imp_table
rebuild_index
reorg_table
show_period
space_copy_dir

exp_dump_dir

This parameter specifies the directory of the export dump file

Syntax : exp_dump_dir = < directory name >
Default : $SAPDATA_HOME/sapreorg

exp_tableThis parameter specifies the table for an export
Syntax: exp_table = [<owner>.]<table> | (<table_list>)
Default : None
Eg:
exp_table= (SDBAH, SAPR3.SDBAH)

imp_tableThis parameter specifies the table for an import
Syntax: imp_table = [<owner>.]<table> | (<table_list>)
Default : None
Eg:
imp_table= (SDBAH, SAPR3.SDBAH)

rebuild_indexThis parameter specifies the database indexes for an index rebuild
Syntax: rebuild_index = [<owner>.]<index> | (<index_list>)
Default : None
Eg:
rebuild_index= (SDBAH`0, SAPR3.SDBAH`0)

reorg_tableThis parameter specifies the table for reorganization
Syntax: reorg_table = [<owner>.]<table> | (<table_list>)
Default : None
Eg:
reorg_table= (SDBAH, SAPR3.SDBAH)

show_TableThis parameter specifies the time period for which BRTOOLS display log files
Syntax : show_period = <days>
Default : 30
Possible values :
0 – Show all available log files
1 – Show logs created today
>1 – Show logs files created in the previous specified number of days

space_copy_dirThis parameter specifies the directory for file copies during space management.
Syntax : space_copy_dir = <directory name>
Default : $SAPDATA_HOME/sapreorg

Logs for BR*Tools

Logs are created for BRBACKUP, BRARCHIVE, BRRESTORE, BRRECOVER, BRCONNECT, and BRSPACE. These supply information about database operations and are useful for problem analysis.

The following types of logs are written: Ø
File System Logs
Database Logs in tables SDBAH and SDBAD


File System Logs

For more information, see:
· BRBACKUP Logs• Detail log - b<encoded timestamp>.<ext> ( eg: bdvecswx.anf ) • Summary log - back<DBSID>.log (eg: backS94.log )
Directory : /oracle/<SID>/sapbackup

· BRARCHIVE Logs• Detail log - a<encoded timestamp>.<ext> (eg: aduryokf.svd ) • Summary log - arch<DBSID>.log (eg: archS94.log )
Directory : /oracle/<SID>/saparch
· BRRESTORE Logs• Detail log - r<encoded timestamp>.<ext> (eg: rdvecswx.rsb ) • Summary log - rest<DBSID>.log ( eg: restS94.log )
Directory : /oracle/<SID>/sapbackup

BRRECOVER Logs• Detail log - v<encoded timestamp>.<ext>
• Summary log - recov<DBSID>.log ( eg: recovS94.log )
Directory : /oracle/<SID>/saparch
· BRSPACE Logs• Detail log - s<encoded timestamp>.<ext> ( eg: sduvytan.tse )
• Summary log - space<DBSID>.log (eg: spaceS94.log )Directory : /oracle/<SID>/sapreorg
· BRCONNECT Logs• Detail log - c<encoded timestamp>.<ext> (eg: cduxtdrn.chk)
• Summary log - conn<DBSID>.log ( eg: connS94.log )
Directory : /oracle/<SID>/sapcheck
Database Logs
The database logs of BRBACKUP, BRARCHIVE, and BRCONNECT are stored in tables SDBAH and SDBAD

SDBAH

This table contains information that refers to the backup as a whole:


Starting time of the backup or BRCONNECT processing
End time of the backup or BRCONNECT processing
BRBACKUP/BRARCHIVE/BRCONNECT return code
BRBACKUP/BRARCHIVE/BRCONNECT action ID (encoded timestamp of the file system log names)
BRBACKUP/BRARCHIVE/BRCONNECT function ID (extension of the file system log names)

SDBAD

This table contains information that refers to the backup of one file:

File name
· Oracle file ID or log group number
· End time of the backup of the file
· Name of the volume where the file was saved
· Position of the file on the volume
· Backup ID of the external backup program
· Compression rate of the software compression

In addition, table SDBAD contains internal BRBACKUP information about compression rates and backup durations for the individual database files. For BRCONNECT, SDBAD tables contain information on the total number of objects processed by BRCONNECT.

BRTOOLS for SAP



BR*Tools provides you with menus to perform a wide range of database administration functions for your database BRTools (and BRSpace) is the successor of SAPDBA. SAPDBA is no longer delivered with WAS 6.40 (NetWeaver 04). You can continue to use SAPDBA 6.20 for Oracle 9.2 on SAP systems that are based on Web AS 6.40. However, SAP recommends that you only use the BR*Tools there. You can of course also use the SQLPLUS command tool.


BR *Tools is the program package containing BRBACKUP, BRARCHIVE, BRRESTORE, BRRECOVER, BRSPACE, BRCONNECT, and BRTOOLS.
BRTOOLS is the program that displays the menus from which the other BR programs are called.
Not all functionality of SAPDBA is included in the new BR*Tools. P.e. the “Alter table or index parameters” and “Reorganize tablespace and data files” are missing.

Overview of the tools



BR*Tools User InterfaceThe user interface to BR*Tools provides you with menus to perform a wide range of database administration functions for your Oracle database. The menus are controlled by BRTOOLS, which in turn calls one of the functional BR programs.
You can use BR*Tools with a:

Character-based interface
GUICharacter-based interface, as in the following example, which shows the main menu:

BR0280I Time stamp 2003-03-06 11.30.57BR0656I

Choice menu
1 - please make a selection------------------------------ Character-based interface
BR*Tools main menu
1 = Instance management
2 - Space management
3 - Segment management
4 - Backup and database copy
5 - Restore and recovery
6 - Check and verification
7 - Database statistics
8 - Additional functions
9 - Exit program

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

----------------------------------------------------------------BR0662I

Enter your choice:

What is BRBACKUP??

This SAP tool for the Oracle database enables you to back up database files.
The smallest unit that can be saved with BRBACKUP is a file. You can use BRBACKUP for backing up both files in the database and non-database files and directories.

Use the backup_mode from the Initialization Profile init<DBSID>.sap or the command option brbackup -m|-mode for this purpose

backup_mode = all/full/incr

This parameter is used by BRBACKUP to determine the scope of the backup activity.
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

What is BRARCHIVE??

This SAP tool for the Oracle database enables you to archive offline redo log files.

You can also start BRARCHIVE when the database is shut down.
You should archive the offline redo log files on tape using BRARCHIVE.
In contrast to BRBACKUP, BRARCHIVE does not have its own management of tape continuation. When a tape is full, you must restart BRARCHIVE to write to the next volume.Logging for BRARCHIVE

BRARCHIVE writes the following file system logs:

·<SAPDATA_HOME>/saparch/a<encoded timestamp>.<ext>
Every detail log contains information about the actions performed during an archiving run.
·<SAPDATA_HOME>/saparch/arch<DBSID>.log
This summary log contains a brief entry for every archiving operation that was performed.

BRARCHIVE also records its actions in the database tables SDBAH and SDBAD
BRRESTOREThis SAP tool enables you to restore an entire database backup or parts of it, when the backup was performed with BRBACKUP. Any non-database files and directories you saved can also be restored. In the process, the subdirectories in sapdata<n>directories are automatically created, when necessary.
You can also restore the offline redo log files that were backed up with BRARCHIVE. This operation can be performed at the same time as the restore of the corresponding backup.

Ø·BRRESTORE can run unattended when option -c force is set. The option -c only suppresses the first confirmation prompts for mounting a volume.ØØ·BRRESTORE uses the BRBACKUP logs and the summary log from BRARCHIVE to decide where to restore the requested file. You can manually specify a different directory as well.

·One or more incomplete BRRESTORE runs can be completed with the option -f. BRRESTORE automatically determines the files to be restored.

What is BRRECOVER??

The SAP tool BRRECOVER for Oracle databases is used as a database administration tool to help you recover your database. You can use BRRECOVER to perform the following:

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 offline redo log files
Disaster recovery
What is BRCONNECT ??The 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 calls in the background

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

Uses
Database System Check with BRCONNECT
Adapt Next Extents with BRCONNECT
Update Statistics with BRCONNECT
Changing Database User Passwords with BRCONNECT
Clean Up Old Logs and Trace Files with BRCONNECT 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 BRRESTOE 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 XDBtables
Database check results in DBMSGORAtable

Adding SAP Datafile using BRTools

Hi All,
In this blog I will tell you how to add a new SAP datafile using BRTools:
In Windows login as SIDADM.

              Start --> run --> cmd --> brtools
For Linux and Solaris login as root, then follow these commands:

> su - oraSID > sqlplus /nolog > conn sys as sysdba
Enter password: (Press enter)
Connected.
sql>brtools
---------------------------------------------------
Steps are common once brtools starts:
Step1:
------------------------------------------------------------------------------
BR*Tools main menu

1 = Instance management
2 - Space management
3 - Segment management
4 - Backup and database copy
5 - Restore and recovery
6 - Check and verification
7 - Database statistics
8 - Additional functions
9 - Exit program

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
2 ----------------> Enter 2

-------------------------------------------------------------------------------
Database space management

1 = Extend tablespace
2 - Create tablespace
3 - Drop tablespace
4 - Alter tablespace
5 - Alter data file
6 - Move data file
7 - Additional space functions
8 - Reset program status

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
1 -------------> Enter 1

And then enter c two times.

Step2:
-------------------------------------------------------------------------------
Tablespace extension main menu

1 = Extend tablespace
2 - Show tablespaces
3 - Show data files
4 - Show disk volumes
5 * Exit program
6 - Reset program status

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
1 ---------------> Select
After this all the table space will be displayed
Select the tablespace for which you want to add a new datafile.

For example we are trying to add datafile to tablespace "PSAPSR3".

As an example we have selected
-------------------------------------------------------------------------------
Options for extension of tablespace PSAPSR3 (1. file)

1 * Last added file name (lastfile) ....... [[Drive]:\ORACLE\SID\SAPDATA2\SR3_4\SR3.D
ATA4]
2 * Last added file size in MB (lastsize) . [2000]
3 - New file to be added (file) ........... [[Drive]:\oracle\SID\sapdata2\sr3_5\sr3.d
ata5]
4 # Raw disk / link target (rawlink) ...... []
5 - Size of the new file in MB (size) ..... [2000]
6 - File autoextend mode (autoextend) ..... [yes]
7 - Maximum file size in MB (maxsize) ..... [10000]
8 - File increment size in MB (incrsize) .. [20]
9 - SQL command (command) ................. [alter tablespace PSAPSR3 add dataf
ile 'D:\oracle\SID\sapdata2\sr3_5\sr3.data5' size 2000M autoextend on next 20M m
axsize 10000M]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:c ---------------> Enter c to continue and create datafiles.
----After that enter n --------------------
BR0675I Do you want to perform this action?
BR0676I Enter 'y[es]' to perform the action, 'n[o]/c[ont]' to skip it, 's[top]'
to abort:
n --------------> Enter n to stop creating another datafile.
Y ------------> It will add a new datafile to it.