SAP Note 1598594 BRTools With Oracle User
SAP Note 1598594 BRTools With Oracle User
Symptom
Preliminary remark
The BR*Tools configuration described in this SAP Note became the standard
configuration for all installations (not only for ASM and RAC) as of Oracle 12c.
This means that the configuration and authorization concepts described here are
generally valid for Oracle 12c.
Request reason
The following Oracle 11g white papers:
"Configuration of SAP NetWeaver for Oracle Grid Infrastructure 11.2 with Oracle Real Application
Clusters 11g Release 2 - A Best Practices Guide" [http://www.sdn.sap.com/irj/sdn/ora -> Oracle Real
Application Clusters (RAC)]
"Using SAP NetWeaver with the Oracle Exadata Database Machine - A Best Practices Guide"
[http://www.sdn.sap.com/irj/sdn/ora -> Oracle Exadata]
recommend that you install Oracle 11g software for RAC (Real Application
Cluster) and/or ASM (Automatic Storage Management) on UNIX systems; to do this,
use the OS user "oracle" and the OS group "oinstall".
This change affects the configuration of BR*Tools on the database server. You
can no longer use BR*Tools in the standard configuration (for example, BRBACKUP-
Owner ora<dbname> + S-Bit) For example, backup actions fail with authorization
problems.
Important: With regard to the OS-specific information, this SAP Note only applies
to UNIX installations. With regard to ASM-specific information, this SAP Note
applies to both UNIX and Windows installations. Exceptions: Recommendations
relating to the "sapprof" directory and SAPSWITCH environment variable affect
all platforms.
Other Terms
Installation information
For BR*Tools or RAC subjects that are not dealt with explicitly in this note,
you must continue to refer to the following notes:
131610, 905359, and 1033126.
Solution
I. Common prerequisites and configuration of BR*Tools for Oracle installations using the UNIX user
"oracle" for non-ASM and ASM
Only BR*Tools 7.20 patch level 14 or higher can be used in this environment
without ASM. BR*Tools 7.20 patch level 18 includes full support for Oracle ASM
(see Note 1627541).
Comment:
In many of the examples listed below, PRD was set for <SAPSID>.
You can use the "root" user to set these authorizations as follows; for example:
> su - root
> cd /usr/sap/PRD/SYS/exe/run
> chown oracle:oinstall brarchive brbackup brconnect brrecover brrestore brspace
> chmod 6774 brarchive brbackup brconnect brrecover brrestore brspace
You can achieve the same by calling the script "oraroot.sh" with the user "root"
as follows:
> su - root
> cd /usr/sap/PRD/SYS/exe/run
> oraroot.sh PRD oracle
Caution 1:
For installations on IBM AIX 6.1 or higher, you must make the following settings
for all BR executables for AIX RBAC (Role Based Access Control); to do this, use
the "root" user:
where:
<path> - "sap-exe" directory (for example, /usr/sap/PRD/SYS/exe/run)
<brtool> - brarchive, brbackup, brconnect, brrecover, brrestore, brspace
You must then execute the following OS command under "root":
setkst
If you did not do this, the following error occurs in BR*Tools on AIX:
BR0251E Function setreuid() failed at location BrEnvProcess-111
BR0253E errno 1: Not owner
Caution 2:
Make sure that the file system that contains BR executables supports the s-bit.
You are not allowed to use the "nosuid" option for mounting. In particular, this
affects Linux systems.
The Sapdata home directory (default: /oracle/<DBNAME>) contains the Oracle home
directory and the BR*Tools log directories (note the permissions) among other
things.
Important: See point II.2 for permissions for sapdataX directories for the non-ASM
scenario.
5. "sapprof" directory
(This also applies to Windows platforms - the "dbs" directory name is replaced
by "database" there.)
The new "sapprof" directory in Sapdata home contains the BR*Tools profile and a
"transparent" copy of the Oracle profile (on UNIX, please note the permissions):
Copy these files from the $ORACLE_HOME/dbs directory to the "sapprof" directory.
The init<DBSID>.ora is replaced in the $ORACLE_HOME/dbs directory with a profile
that contains only the "spfile" parameter. The init<DBSID>.sap is deleted there.
For non-ASM installations, the Spfile remains in the directory $ORACLE_HOME/dbs
by default; in ASM installations, it is located on an ASM disk.
All BR*Tools programs can be used with the OS user <sapsid>adm and the OS user
ora<dbsid>. By default, they are started with the user <sapsid>adm. For both OS
users, the DB instance is uniquely defined via the environment variables
ORACLE_SID and ORACLE_HOME (plus ORACLE_BASE if appropriate).
The BR*Tools programs should not be used with the OS user "oracle". However, to
start the BR*Tools programs with the user "oracle" in exceptional circumstances,
you must set the corresponding Oracle environment variables (ORACLE_SID,
ORACLE_HOME) and the BR*Tools-specific environment variables (such as
SAPDATA_HOME, SAPEXE) beforehand. For more information, see SAP Note 1554661.
Important: In the ASM/RAC environment, you must use the OS user <sapsid>adm to
start BR*Tools if several RAC database instances are located on one node and if
BRBACKUP or BRARCHIVE are to be started without a password (see Note 914174,
page 4.). In this configuration, BR*Tools execute internal actions on the remote
nodes. These actions would then fail under the "oracle" user due to an incorrect
environment.
If the user OPS$ORACLE does not exist, create it in the database as follows:
SQL> connect / as sysdba
SQL> create user ops$oracle identified externally;
SQL> grant sapdba to ops$oracle;
II. Additional prerequisites and configuration of BR*Tools for Oracle installations using the UNIX user
"oracle" for non-ASM
III. Additional prerequisites and configuration of BR*Tools for Oracle installations using the UNIX
user "oracle" for ASM
For ASM/RAC installations, asm_ora_sid and asm_ora_home can be defined for each
instance:
For example:
+DATA/PRD/DATAFILE/system.334.761302249
+DATA/PRD/DATAFILE/sysaux.296.761302097
+DATA/PRD/TEMPFILE/psaptemp.344.761302309
+OLOG/PRD/ONLINELOG/group_1.329.761302067
+DATA/PRT/DATAFILE/psapstabd.289.761302205
+DATA/PRT/DATAFILE/psapstabi.307.761302239
+DATA/PRT/DATAFILE/psapbtabd.305.761302169
+DATA/PRT/DATAFILE/psapbtabi.303.761302181
ASM aliases are obligatory for Spfile and control files and they have the
following default names:
<asm_disk_group>/<db_name>/spfile<db_name>.ora
<asm_disk_group>/<db_name>/cntrl<db_name>.dbf
For example:
+DATA/PRD/spfilePRD.ora
+DATA/PRD/cntrlPRD.dbf
+ARCH/PRD/cntrlPRD.dbf
+RECO/PRD/cntrlPRD.dbf
Other database files (data files, redo log files) are created as Oracle-managed
files (OMF) by default and therefore do not have alias names.
However, the use of alias names is allowed.
Important:
BR*Tools provide only limited support for ASM alias in the case of data files
and redo log files. This means that not all BR*Tools functions or actions are
available for ASM alias or that they are not completely available.
1550133 Using Oracle Automatic Storage Management (ASM) with SAP NetWeaver based Products
131610 Database logon using standby/backup host or with Real Application Cluster (RAC)
SAP
Title
Note/KBA
1550133 Using Oracle Automatic Storage Management (ASM) with SAP NetWeaver based Products
131610 Database logon using standby/backup host or with Real Application Cluster (RAC)