You are on page 1of 6

OraBRCopy Java Tool

Users’ Guide

The new Java tool replaces the former UNIX R3COPY shell script. It works on UNIX
and Windows as well. The tool generates a control file into the current working directory.
The OraBRCopy tool was released with NW 04 SR1, but can also be used for previous
releases.

1. Prerequisites

• JRE version 1.4.1 or higher


• JAVA_HOME environment variable must point to the JRE directory.
• Tool must be started as an OS user with Oracle DBA privileges
(ora<dbsid> user on UNIX or <sapsid>adm user on Windows).
• classes12.jar file must exist in the <ORACLE_HOME>/jdbc/lib directory
(installed using a standard Oracle installation).
• Oracle database and listener must be running.

2. Tool
The tool is located in the ORABRCOPY.SAR SAPCAR archive.

Content of the archive file:


• orabrcopy.jar
• ora_br_copy.sh
• ora_br_copy.bat
• OraBRCopy.pdf

1
3. Configuration

Help
The tool will display the available parameters, if you call it with one of the following
command line options:
• -help
• -?

Version
The tool will display the version information (release branch and build date), if you call it
with the following command line option:
• -version

2
Application Options
Option Description Comments
oracleHome Oracle home Determined automatically in
directory script/batch files from the
ORACLE_HOME environment variable.
sourceSid Source database SID Determined automatically in
script/batch files from the
ORACLE_SID environment variable
targetSid Target database SID
listenerPort Listener port number Mutually exclusive with tnsAlias.
Can be found in the listener.ora
file of the source database.
tnsAlias Oracle TNS alias Mutually exclusive with
listenerPort.
Can be found in the tnsnames.ora
file of the source database.
password Password of SYSTEM
database user
generateFiles Generates control/trace and
init<TARGET_DBSID>.ora files.
forceLogSwitches Forces log switches.
If this option is specified then Oracle
database will be stopped during the
tool execution.

3
Additional Options
Name Description Comments
bg Enables background Take effect only as command line
mode option.
If the tool is running in the
background mode, the UNIX shell
window or Windows command
prompt can be closed after startup.
secure Enables secure mode Take effect only as command line
option.
If the tool is running in the secure
mode, command line parameters (ex.
passwords) will be hidden for java
process. The secure mode implicitly
enables background mode.
trace Trace level Possible values:
all, off,
1 (error), 2 (warning), 3 (info),
4 (config, default), 5, 6, 7 (trace)

Mandatory Options
Generate files mode: generateFiles,
targetSid,
password,
listenerPort or tnsAlias
Force log switches mode: forceLogSwitches,
password,
listenerPort or tnsAlias

4
4. Starting the OraBRCopy Java Tool
The tool can be started using one of the following:
• UNIX shell script ora_br_copy.sh
• Windows batch file ora_br_copy.bat

To specify an option in the command line, enter ‘-optionName optionValue’.

Example of a command line for a UNIX terminal:


./ora_br_copy.sh –generateFiles
–targetSid <TARGET_DBSID>
-listenerPort 1527 -password <SYSTEM user’s password>

Example of a command line for Windows cmd.exe:


ora_br_copy.bat -forceLogSwitches
-listenerPort 1527 -password <SYSTEM user’s password>

After starting the tool, verify the ora_br_copy.log file in the current working
directory.

5. Output Files
• CONTROL.SQL
• CONTROL.TRC
• init<TARGET_DBSID>.ora
• ora_br_copy.log
• OraBRCopy.console.log

5
6. Integration into the SAPinst Oracle Backup/Restore
Procedure

Source System
1. Create an installation directory (use 777 permissions in UNIX systems).
2. Start the OraBRCopy tool as an OS user with Oracle DBA privileges
(ora<dbsid> user in UNIX systems or <sapsid>adm user on Windows).
3. Generate CONTROL.SQL, CONTROL.TRC and init<TARGET_DBSID>.ora files.
4. Force log switches.
5. Verify the CONTROL.SQL control file using the CONTROL.TRC trace file.

Note
UNIX systems: no manual adaption of the generated files necessary.
Windows: if the target system uses other logical drives for Oracle database
then the manual adaption of drive letters is needed in CONTROL.SQL and
init<TARGET_DBSID>.ora files.

Target System
1. Start the installation as described in the Installation Guide.
2. Start the Database Instance installation and choose the Oracle Backup/Restore
method.
3. Continue with the SAPinst installation until the popup window is displayed and
ask you to copy the data files.
4. Copy all required data files from the source system.
5. Copy the CONTROL.SQL file to the installation directory.
6. Copy the init<TARGET_DBSID>.ora file to the corresponding Oracle
directory.
7. Finish the installation with SAPinst (choose OK in the popup window)

7. Release Notes

New Features in NW2004s SR1


• Background and secure execution via –bg and –secure command line options.

You might also like