Show TOC

Creating a Database ConnectionLocate this document in the navigation structure

Context

Connection information that depends on the database platform

The Change Description of Database Connection View: Detail screen appears.

Procedure

  1. Select the database management system (DBMS) that you want to use to manage the database. This entry sets the database platform for the connection.
  2. Under User Name, specify the database user under whose name you want the connection to be opened.
  3. When establishing the connection, enter the user DB Password twice for authentication by the database. This password is saved encrypted.
  4. Under Connection Info, specify the technical information required to open the database connection. This information required when you establish a connection using NATIVE SQL depends on the database platform. Generally this will be the database names and the database host that the database runs on. The string informs the client library of the database that you want to establish the connection to.

    Connection information that depends on the database platform

    Supported Database

    CON_ENV Connection Information

    SAP DB (ada) or MaxDB (dbs)

    <server_name>-<db_name>

    Microsoft SQL Server (mss)

    MSSQL_SERVER=<server_name> MSSQL_DBNAME=<db_name>

    Example

    MSSQL_SERVER=10.17.34.80 MSSQL_DBNAME=Northwind

    (see SAP Note 178949 - MSSQL: Database Multiconnect with EXEC SQL)

    Oracle (ora)

    TNS Alias

    (See SAP Note 339092 - DB-Multiconnect with Oracle as a secondary database)

    DB2/390 (db2)

    Example

    PORT=4730;SAPSYSTEMNAME=D6B;SSID=D6B0;SAPSYSTEM=71;SAPDBHOST=ihsapfc; ICLILIBRARY=/usr/sap/D6D/SYS/exe/run/ibmiclic.o

    The parameters describe the target system for the connection (see installation handbook DB2/390).

    The individual parameters (PORT=... SAPSYSTEMNAME=... .....) must be separated with &apos; &apos; , &apos;,&apos; or &apos;;&apos;.

    (see SAP Note 160484 - DB2/390: Database Multiconnect with EXEC SQL)

    DB2/400 (db4)

    <parameter_1>=<value_1>;...;<parameter_n>=<value_n>;

    You can specify the following parameters:

    • AS4_HOST: Host name for the Remote DB Server. You have to enter the host name in the same format as is used under TCP/IP or OptiConnect, according to the connection type you are using.

      You have to specify parameter AS4_HOST.

    • AS4_DB_LIBRARY: Library that the DB server job needs to use as the current library on the remote DB server.

      You have to enter parameter AS4_DB_LIBRARY.

    • AS4_CON_TYPE: Connection type; permitted values are OPTICONNECT and SOCKETS. SOCKETS means that a connection is used using TCP/IP sockets.

      Parameter AS4_CON_TYPE is optional. If you do not enter a value for this parameter, the system uses connection type SOCKETS.

      Example

      For a connection to the remote DB server as0001 on the RMTLIB library using TCP/IP sockets, you have to enter:

      AS4_HOST=as0001;AS4_DB_LIBRARY=RMTLIB;AS4_CON_TYPE=SOCKETS;

      The syntax must be exactly as described above. You cannot have any additional blank spaces between the entries and each entry has to end with a semicolon. Only the optional parameter AS4_CON_TYPE=SOCKETS can be omitted.

      (see SAP Note 146624 - AS/400: Database Multiconnect with EXEC SQL)

      (For DB Multiconnect from Windows AS to iSeries, see Note 445872)

    DB2 UDB (db6)

    DB6_DB_NAME=<db_name>
, where <db_name> is the name of the DB2 UDB database on which you want to run Connect.

    Example

    You want to establish a connection to database &apos;mydb&apos;. Enter DB6_DB_NAME=mydb as the connection information.

    (see SAP Note 200164 - DB6: Database Multiconnect with EXEC SQL)

    SAP HANA Database (hdb)

    <Hostname>:<SQL Port>

    (see SAP Note 1597627 - HANA Connection)

  5. Specify whether your database connection needs to be permanent or not.

    If you set this flag, losing an open database connection (for example due to a breakdown in the database itself or in the database connection [network]) has a negative impact. Regardless of whether this flag is set, the SAP work process tries to reinstate the lost connection. If this fails, the system responds as follows:

    1. The database connection is not permanent, meaning that the flag is not set:
      The system ignores the connection failure and starts the requested transaction. If this transaction accesses the connection that is no longer available however, the transaction terminates.
    2. The database connection is permanent, meaning that the flag is set:
      After the connection terminates for the first time, each transaction is checked to see if the connection can be reinstated. If this is not possible, the transaction is not started – regardless of whether the current transaction would access this special connection or not. The SAP system can only be used again once all the permanent DB connections have been reestablished.
    Tip We recommend setting the flag if an open DB connection is essential, or if it is accessed often.
  6. Save your entries and go back.
    The Change Description of Database Connections View: Overview screen appears. The system displays the entry for your database connection in the table here.
  7. Go back.