Entering content frame

Syntax documentation Environment Variables for Setting Up the Database Connection Locate the document in its SAP Library structure

Each SAP System in the transport environment needs environment variables that enable tp to log on to the databases belonging to the SAP Systems. These environment variables depend on the particular database system and must therefore be defined specifically for each SAP System.

The following applies for all databases:

dbms_type

The database interface recognizes the type of the database system by the environment variable dbms_type.
Possible values: ora, inf, db2, db4, db6, ada, mss

DIR_LIBRARY

This environment variable determines the directory in which the shared library for setting up the database connection is searched for.

UNIX

Default: /usr/sap/$(system)/SYS/exe/run/

Possible values: Paths

This environment variable tells tp the directory in which the dynamic SAP database interface is located. In the standard system, these files are always in the executable directory of the application server. This means that you do not have to change the default value. tp derives the value of the environment variables DIR_LIBRARY from the value of this environment variable.

Microsoft Windows

Windows does not evaluate the environment variable DIR_LIBRARY.

The search for the dynamic SAP database interface is made in the following sequence:

                                                  i.       in the directory in which the started executable tp.exe is located

                                                ii.       in the work directory from which the program tp was called

                                               iii.       in the Windows directory

                                               iv.       in the path

DB2 UDB for OS/390

For information on the environment variables needed by DB2 UDB for OS/390, see SAP Database Administration Guide: DB2 UDB for OS/390 and z/OS in the appendix Environment Variables.

DB2 Universal Database for Unix and Windows

You must install the DB2 Universal Database client software on the host where the transport control program tp runs. The SAP database must be cataloged and accessible.

The following environment variables are also required:

·        DB2DBDFT

Default value: <SAPSID>

Possible values: Text

Here, you can enter the name of the SAP database.

·        DB2INSTANCE

Default value: db2<sapsid>

Possible values: Text

Here, you can enter the name of the DB2 database instance where the SAP database is cataloged.

·        DB2DB6EKEY

Possible values: Text

This variable is used to decode the passwords of the database users. You have to set the same value for this variable as for the central instance.

·        DB2DB6_PASSWD_FILE

Default value: /usr/sap/<SAPSID>/SYS/global/dscdb6.conf

Possible values: Text

Here, you can specify the directory where the password file that contains the passwords of the database users is stored.

If you do not set the variable, the default value is used.

·        dbs_db6_schema

Default value: sapr3 or sap<sapsid>

Possible values: Text

This variable describes the name of the database connect user.

DB2 Universal Database for iSeries

DB2 UDB for iSeries requires only SAPDBHOST:

Possible values: Text

This environment variable specifies the system name of the host where the database runs.

If you use TCP/IP instead of opticonnect, you must also specify the following:

dbs/dbh/ opticonnect = 0

INFORMIX

INFORMIX databases with a standard installation require the two environment variables INFORMIXSERVER and INFORMIX_DBID:

·        INFORMIXSERVER

Possible values: Text

This environment variable specifies the name of the host where the database runs.

·        INFORMIX_DBID

Possible values: Text

This environment variable specifies the name of the database instance. The name is case-sensitive.

·        INFORMIXDIR

Default: /informix/<sapsid>.

Possible values: Text

This environment variable specifies the name of the directory where the database software is located.

·        INFORMIXSQLHOST

Default (UNIX): $(informixdir)/etc/sqlhosts[.tli|.soc]

Possible values: Text

This environment variable specifies the name of the SQL hosts file with a complete path.

Microsoft SQL Server

SQL Server databases require the two environment variables MSSQL_SERVER and MSSQL_DBNAME.

·        MSSQL_SERVER

Possible values: Text

This parameter specifies the TCP/IP name of the host where the database runs.

·        MSSQL_DBNAME

Possible values: Text

This environment variable specifies the name of the database instance.

Microsoft SQL Server has two ways of connecting to the database:

1.       SQL Server authentication

SQL Server user and password are defined (sapr3, sap)

2.       Windows authentication (integrated security)

No user or password is necessary. The Windows security descriptor is used and the Windows user connects itself.

As of Release 4.5A, Windows authentication is used by default. For <SID>adm and SapService<SID>, the corresponding logins are created during the upgrade and the installation (see SAP Note 116735)., the corresponding logins are created during the upgrade and the installation (see SAP Note 116735). The environment variables MSSQL_USER and MSSQL_PASSWD are no longer evaluated in normal circumstances.

However, by setting the environment variable MSSQL_USEINTEGRATEDSECURITY to zero, you can force the process to use SQL Server authentication to log on. If a tp user is running under a non-<SID>adm, the user can work with a SQL Server database by setting MSSQL_USEINTEGRATEDSECURITY=0 via a user name and password. You can also define a Windows login for this user with the SQL Server Enterprise Manager. We recommend using this option.

·        MSSQL_USER

Possible values: Text

This environment variable specifies the connection to the database for a specific user.

·        MSSQL_PASSWD

Possible values: Text

The MSSQL_USERenvironment variable specifies the password for a specific user.

·        MCOD systems also require the environment variable MSSQL_SCHEMA to be set.

This environment variable specifies the name of the database instance (in lowercase letters <sid>).

Oracle

The environment variables TNS_ADMIN and dbs_ora_tnsnam are relevant for configuring the database connections for Oracle databases. Due to the Oracle software used, ORACLE-NET-V2 is used to connect to the database.

       2.      The NLS (National Language Support) and TNS (Transparent Network Substrat) files are installed in the directory ORACLE_HOME. Oracle only supports the installation with this configuration. (Oracle uses TNS to implement the SQL*NET V2 database connection.)

SAP’s own database interface is in a dynamic library that is not linked to the user until runtime.

·        dbs_ora_tnsname

Possible values: Text

This environment variable specifies the logical name given to the instance in the Oracle network during configuration.

·        TNS_ADMIN

Possible values: Text

Possible values: Paths

You can use this environment variable to inform tp where the configuration files for ORACLE SQL*NET V2 are located.

Note

Windows does not evaluate this environment variable.

·        NLS_LANG

Default: AMERICAN.AMERICA.WE8DEC

Possible values: Text

This environment variable specifies the code page of the database instance.

The Oracle databases are installed with the code page we8dec. In this case, you must enter the value american_america.we8dec in the transport profile.

·        ORACLE_HOME

Possible values: Text

Possible values: Paths

This environment variable informs the transport control program of the value of the directory in which the Oracle client software is installed.

Note

Windows does not evaluate this environment variable.

MaxDB

MaxDB databases with a standard installation require the environment variable dbname.

·        dbname

Possible values: Text

This environment variable specifies the name of the database instance.

The database connection is read from the xuser file after the DEFAULT userkey entry. The xuser file format is stored in file $HOME/.XUSER62 for UNIX and in the registry for Windows.

 

 

Leaving content frame