This is default featured slide 1 title

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. blogger theme by BTemplates4u.com.

This is default featured slide 2 title

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. blogger theme by BTemplates4u.com.

This is default featured slide 3 title

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. blogger theme by BTemplates4u.com.

This is default featured slide 4 title

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. blogger theme by BTemplates4u.com.

This is default featured slide 5 title

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. blogger theme by BTemplates4u.com.

  

Tuesday, October 9, 2012

Users & Roles SAP: Oracle

Operating System Users

In the SAP system the roles of the users ora<dbsid> and <sapsid>adm on UNIX, or <sapsid>adm and SAPSERVICE<SID> on Windows, used to be separate. Due to the requirements for RMAN backup, this is no longer true. Both users now belong to the operating system groups dba and oper, as shown in the tables below.

Database Roles

·        SYSDBA
All authorizations
·        SYSOPER
Operator activities, but no read or write authorizations.
·        SAPDBA
Read and write authorizations to work with BR*Tools command options, and therefore the DBA functions in the Computer Center Management System (CCMS).
To be able to use the CCMS DBA functions or BR*Tools command options without restrictions, the OPS$ user must have both the SYSOPER role and the SAPDBA role.

Operating System Users and Groups, Database Users and Roles

UNIX
Operating System
Users
Operating System Group
Database Role
Database Users
ora<dbsid>
dba
oper
SYSDBA
SYSOPER
OPS$ORA<DBSID>
<sapsid>adm
dba
oper
SYSDBA
SYSOPER
OPS$<SAPSID>ADM

Windows
Operating System
Users
Operating System Group
Database Role
Database Users
<sapsid>adm
ORA_<SID>_DBA
ORA_<SID>_OPER
SYSDBA
SYSOPER
(SYS)
OPS$<DOMAIN>\<SAPSID>ADM
SAPSERVICE<SID>
ORA_<SID>_DBA
ORA_<SID>_OPER
SYSDBA
SYSOPER
OPS$<DOMAIN>\SAPSERVICE<SID>
Note
The OS group on Windows can also be specified globally (without instance name) (ORA_DBA, ORA_OPER).

OPS$ Database User

The Oracle OPS$ mechanism moves the entire DB security mechanism to the operating system level.
The prerequisite is that a DB user OPS$<OS_user> corresponding to the OS user is defined on the database, and identified as externally.
Once you have logged on successfully with the OS user, you can connect to the database with:
 SQLPLUS>connect /
This means you do not have to enter another password. You are then working as OPS$<OS_user>. In the same way you can start the program BRBACKUP with:
OS> brbackup –u /
This OPS$ mechanism is always used if you call BR*Tools from the CCMS transaction DB13 in the SAP System.
The OPS$ Mechanism (UNIX)
This graphic is explained in the accompanying text

BR*Tools Database User

The standard DB user is always SYSTEM. SYSTEM connects with the Oracle option AS SYSOPER or AS SYSDBA for actions such as startup, shutdown, recover and so on, as well as selecting from V$ tables when the database is not open.

Environment Variables (Windows) - Oracle and BR tools

Environment variables define parameter values used by the Oracle database and BR*Tools. 


The following variables are required:
·        ORACLE_SID
System ID of the database instance
Example: C11
SAPSID or sapsid refers to the SAP System ID.
DBSID or dbsid refers to the name of the database instance (database instance system ID).
When a single instance is installed, SAPSID and DBSID are the same.
·        ORACLE_HOME
Home directory of the Oracle software. This variable no longer needs to be set. If not set, the SAP tools determine its value from the registry.
Standard: <drive>:\orant
Example: D:\orant
This variable is optional with Oracle version 8.1 and later.
·        SAPDATA_HOME
Directory of the database files.
Standard: <drive>:\oracle\<DBSID>
Example: E:\oracle\C11


The variables ORACLE_SID and SAPDATA_HOME must always be set. There is no default.
The following environment variables must only be set if the corresponding paths deviate from the defaults specified here:
·        SAPARCH
Directory for the BRARCHIVE logs.
Default value: %SAPDATA_HOME%\saparch
·        SAPBACKUP
Directory for the BRBACKUP logs.
Default value: %SAPDATA_HOME%\sapbackup
·        SAPCHECK
Directory for the BRCONNECT logs.
Default value: %SAPDATA_HOME%\sapcheck
·        SAPTRACE
Directory for Oracle trace files and the alert file.
Default value: %SAPDATA_HOME%\saptrace
·        SAPDATA1
Directory of the database data files.
Default value: %SAPDATA_HOME%\sapdata1
(The same for SAPDATA<n>, n=1,...99).


You can distribute the SAPDATAdirectories across several different drives, without defining the environment variables SAPDATA<n>. The environment variables only have to be defined individually if directories are used that deviate from the default.
For example: SAPDATA1= F:\data\prod\sapdata1.
Other environment variables that you can set for BR*Tools:
·        BR_LINES
Definition of the number of lines in list menus.
Recommended height: ³ 20 lines.
·        BR_LANG
Definition of the message language:
¡        E: English
¡        D: German
·        BR_TRACE
Setting the trace function for error analysis.

See also:

Setting Up Archiving - SAP : Oracle

Use

This procedure tells you how to check the archiving parameters and ARCHIVELOG mode for your Oracle database and, if necessary, how to change these.

It is very important that:
·         The database runs in ARCHIVELOG mode
·         Automatic archiving is enabled
After correct installation of an SAP system, the Oracle database meets both these criteria. In this case, the online redo log files are automatically archived when full (that is, following a redo log switch). This is important because it allows the online redo log files to be reused for fresh archive data, so that archiving of the log files can continue at all times.

Prerequisites

The following parameters in the init.ora file control the archiving process for the Oracle database:
Parameter
Note
log_archive_start = true
Preset by SAP
log_archive_dest = <directory>/<file prefix>
Part of the file name
log_archive_format = <Oracle default>
Use the Oracle default
log_archive_start = true causes the background archive process ARCH to be started automatically when the database is started. This means that automatic archiving is enabled.
log_archive_dest defines the archive directory of the online redo log files for archiving. It is delivered with the specification of the following SAP standard path (this example is for a single instance installation on UNIX):
OS> <SAPDATA_HOME>/saparch/<ORACLE_SID>arch
See SAP Note 316642 for information on how to avoid an "archiver stuck" error by changing the archive directory.
The Oracle database names the offline redo log files using the string <ORACLE_SID>arch followed by the log sequence number.
You can back up the offline redo log files with BR*Tools. The offline redo log files are the copies of the online redo log files saved in the archive directory.

Procedure

...
       1.      Make sure that:
¡        The archive directory (under UNIX: oraarch) exists.
¡        The directory is not write-protected.
¡        The directory has enough free space. Otherwise, the archiving process cannot archive any log files and no further actions are possible on the database (this is known as “Archiver Stuck”).
 
For more information on the BR*Tools commands mentioned below, see Altering the Database Instance with BR*Tools and -f dbalter.

       2.      Check the archiving status of the database by choosing Instance Management ® Show instance status in BR*Tools.
The system displays database instance details. 

       3.      Check that:
¡        Archivelog mode is set to ARCHIVELOG
¡        Archiver status is set to STARTED

       4.      If you need to reset ARCHIVELOG mode, do this in one of the following ways:

                            a.      Do one of the following:
§         Choose Instance Management ® Alter database instance in BRGUI or BRTOOLS and choose the action Set archivelog mode.
§         Enter the command brspace –f dbalter –a archlog from the command line.
§         Enter the following commands in the Oracle tool SQLPLUS:
SQLPLUS> connect / as sysdba
SQLPLUS> startup mount
SQLPLUS> alter database archivelog;
SQLPLUS> alter database open;
SQLPLUS> archive log list
BRSPACE or SQLPLUS reconfigures the database to set ARCHIVELOG mode on.

                            b.      Repeat steps 2 and 3 to check that ARCHIVELOG has been set correctly.

       5.      If you need to enable automatic archiving (that is, to start the ARCH process), do the following:
                            a.      Enter the following commands in the Oracle tool SQLPLUS:
SQLPLUS> connect / as sysdba
SQLPLUS> alter system archive log start;
SQLPLUS> archive log list
                            b.      Repeat steps 2 and 3 to check that ARCHIVELOG has been set correctly.

 Source: http://help.sap.com/saphelp_nw04/helpdata/en/e3/92fdd1fada9e4d87be08c217639c1f/content.htm