Search This Blog

Showing posts with label BRtools. Show all posts
Showing posts with label BRtools. Show all posts

Friday, February 10, 2012

Owners and authorizations for BR*Tools

The following setup is essentail to call the BR*Tools with out any error, especially while using transaction DB13 or DBACOCKPIT:

(1) ora and adm groups on DB server have a search path on /sapmnt//exe.

(All br* are contained in this directory.)

ora belongs to the dba group,

adm belongs to the sapsys group,


(2) adm group on the DB server has the rhosts entry: "+ adm".


(3) The ops$adm Oracle user has to be created within the DB and should have the sapdba role (not DBA!) (refer SNote 134592 for more information about the role).


(4) brarchive, brbackup, and brconnect belongs to ora and should have authorization 4775:

-rwsrwxr-x ora sapsys ...


Reason:

Both the operating system (OS) user ora and the OS user adm (for example, from SAP R/3, transactions DB13 or DBACOCKPIT) must be able to call these tools. These tools require access authorization to the database directories and files also on the log directories (saparch,

sapbackup, sapcheck, and sapreorg) of the BR*Tools. To ensure that they will be executed by both ora and by adm, they need to belong to the user ora, and therefore the s-bit must be set.

(5) brrestore, brrecover, brspace, and brtools belongs to adm and should have authorization 755:

-rwxr-xr-x adm sapsys ...

Reason:

These tools could also be used only by OS user ora, but not by adm. This ensures that the user adm doesn't have write authorization for the log directories and thus cannot create any logs. For this, no s-bit is about , and it's not necessary to define an owner aside from the standard owner adm.

If the tools were started using adm, they might terminate immediately after the beginning thanks to the missing log authorization. However, the user ora can start the programs despite this and also has the specified authorization for the log directories.

Wednesday, August 3, 2011

Reorganizing Tables with BR*Tools

Use

BR*Tools can be used to reorganize tables online for Oracle database in SAP system.

Note

This article gives an overview on the procedure to reorganize a table with BR*Tools.

For more information on the approach to table reorganization, see:

· Reorganization

· Reorganization Case Study

You can perform the following types of reorganization:

· Reorganize tables online

· Check tables for reorganization

· Clean up tables after aborted reorganization

· Conversion of LONG and LONG RAW fields to CLOB or BLOB online in Oracle 10g or higher

· Stop reorganization (command-line mode only)

· Suspend reorganization (command-line mode only)

· Resume reorganization (command-line mode only)

For more information, see -f tbreorg.

Prerequisites

You cannot perform online reorganization for tables with LONG or LONG RAW fields but you'll convert them to CLOB or BLOB online. After this conversion, you'll reorganize all tables online. For more information, see SAP Note 646681.

Procedure

1. From the command line, start the procedure using BRGUI or BRTOOLS, or :

 BRGUI or BRTOOLS:

i. Choose Segment Management ® Reorganize tables.

BRGUI or BRTOOLS displays the menu BRSPACE options for reorganization of tables, where you specify the choices with which you call BRSPACE.

ii. Set the required options:

Note

If required, in Table names you'll enter the names of multiple tables. You can use wildcards. For more information, look in to “Selecting Objects“ in Segment Management with BR*Tools. You can also specify a list of tables to be processed with reorg_table in the initialization profile init.sap.

In Tablespace names and Table owner, you'll specify multiple objects but you can't use wildcards. BRSPACE processes all the tables within the specified tablespace name(s) or all tables belonging to the required table owner(s). But these entries and reorganization action entry are not mandatory.

iii. Choose Continue.

BRGUI or BRTOOLS prompts you to start BRSPACE.

iv. Choose Continue to start BRSPACE.

¡ Command line:

Enter at least the following command:

brspace –f tbreorg

You can go with additional parameters, including the table names, if required. we can see BRSPACE -f tbreorg for more information.

Note

Whichever way you begin the procedure – with BRGUI or BRTOOLS, or from the instruction – you'll use quick mode if you recognize the ultimate object names, in this case the table names. For more information, see How to Use BR*Tools.

BRSPACE starts and you see a message that has Start of BRSPACE processing. From now on, BRSPACE writes a detail log.

2. If you've got already entered the table names, continue with step 5 (quick mode).

Note

If you've got entered multiple tables, BRSPACE displays as confirmation an inventory of tables for reorganization. If you've got not already made a final selection, you'll make a variety from this list.

Continue with step 5 (quick mode).

BRSPACE displays the Table reorganization main menu.

3. Choose Reorganize tables.

BRSPACE displays the table list:

4. Select a table or multiple tables.

Example

These examples only apply for character mode inputs..

To choose the first three tables within the list, enter 1-3.

To choose the first and third tables, enter 1,3.

To choose the first three tables and therefore the fifth, enter 1-3,5.

To choose all tables, enter 0.

BRSPACE will show the  Options for reorganization of tables.

5. Set the required options:

Note

There is no SQL instruction here because the reorganization is performed in several steps by an Oracle package, which contains multiple procedures.

6. to start out processing with the chosen options, choose Continue.
Results

Check the results in the BRSPACE logs.

· The summary log space.logdisplays the return code.

· The detail log s.tbr displays the details.

For more information on the way to view the logs with BR*Tools, see Showing Logs and Profiles with BR*Tools.

The file ddl.sql is created in the subdirectory of the directory $SAPDATA_HOME/sapreorg if the option –d|-ddl is set to a value other than no. The file contains the Data Definition Language (DDL) statements used for the creation of interim tables during the reorganization. For more information, see Reorganization. If the –d|-ddl option is about to only, then only DDL statements are created and therefore the actual reorganization isn't performed