An environment variable is a variable whose value is set outside the program, typically through functionality built into the operating system or microservice. An environment variable is made up of a name/value pair, and any number may be created and available for reference at a point in time.

The environment variable helps in pointing out location of software and binaries.
When you execute any command, the user’s current environment is checked where to look for that command

Below are environment variable that’s need to configure related to SAP and Oracle database.

Environment Variables (Windows)

Environment variables define parameter values used by the Oracle database and BR*Tools. This section describes the variables used when the operating system is Windows.

The database uses the parameter values for many different purposes. BR*Tools also uses the parameter values.
Structure
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.
Standard: <drive>:\oracle\<DBSID>\<database version>
Example: D:\oracle\C11\112

SAPDATA_HOME
Directory of the database files.
Standard: <drive>:\oracle\<DBSID>
Example: E:\oracle\C11
Note
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 logs from BRBACKUP, BRRESTORE, and BRRECOVER.
Default value: %SAPDATA_HOME%\sapbackup

SAPCHECK
Directory for the BRCONNECT logs.
Default value: %SAPDATA_HOME%\sapcheck

SAPREORG
Directory for the BRSPACE logs. It is also the standard directory for export dump files, if the parameter exp_dump_dir in the profile init<DBSID>.sap is not set.
Default value: %SAPDATA_HOME%\sapreorg

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).
Note
You can distribute the SAPDATA directories across several different drives, without defining the environment variables SAPDATA<n>. The environment variables only have to be defined individually if directory names 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: greater than or equal to 20 lines.
For more information, see Configuring the Scroll Line Count for BR*Tools.

BR_LANG
Definition of the message language:
o E: English
o D: German

BR_TRACE
Setting the trace function for error analysis. For more information, see SAP Note 29321.

Environment Variables (UNIX)

Environment variables define values used by the Oracle database and BR*Tools. This section describes the variables used when the operating system is UNIX.

The database uses the environment values for many different purposes. BR*Tools also use the values.
Structure
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.
Standard: /oracle/<DBSID>/<database version>

SAPDATA_HOME
Directory of the database files.
Standard: /oracle/<DBSID>
Note
The variables ORACLE_SID, ORACLE_HOME 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, BRRESTORE, and BRRECOVER logs.
Default value: $SAPDATA_HOME/sapbackup

SAPCHECK
Directory for the BRCONNECT logs.
Default value: $SAPDATA_HOME/sapcheck

SAPREORG
Directory for the BRSPACE logs. It is also the standard directory for export dump files, if the parameter exp_dump_dir in the profile init<DBSID>.sap is not set.
Default value: $SAPDATA_HOME/sapreorg

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).
The environment variables SAPDATA<n> must only be defined if directories are used that differ from the default.

TWO_TASK
Identification of a remote database system.
This environment variable must be left unset.
Other environment variables that you can set for BR*Tools:

• BR_LINES
Definition of the number of lines in list menus.
Recommended height: greater than or equal to 20 lines 20 lines.
For more information, see Configuring the Scroll Line Count for BR*Tools.

• BR_LANG
Definition of the message language:
o E: English
o D: German

• BR_TRACE
Setting the trace function for error analysis. For more information, see SAP Note 29321.

Leave a Reply

Your email address will not be published. Required fields are marked *