# Adding a Stand Alone Database

| This section describes the configuration of stand-alone Databases. Do not define Database instances of an SAP System this way. See Assigning Database instances to SAP Systems in this case! There is one exception: if you want to monitor the System DB of an SAP S/4HANA, you have to define it as a stand-alone Database. Please note that an SAP S/4HANA System DB does not require a license.

Usually, the Database is monitored by the Avantra Agent installed on Physical Server hosting the Database, either directly or via a Virtual Cluster Server. In some cases, it may be necessary to monitor a Database remotely, i.e. from an Avantra Agent running on a Server not hosting the database.

In order to define a Database perform the following steps:

1. Select Systems Databases from the menu and push the New Database button.

2. Select the Database Type, Customer, System Role, and Monitoring Server.

3. Fill in a Database Unified Name. This has to be an Avantra-wide unique identifier for the Database. Push the New button.

4. Select a value for Customer and System Role, and optionally define a Description.

5. Select a value for Monitoring Server. If the monitoring server is of a different customer than the database, flag Show Servers of all Customers.

6. For Database type

   IBM DB2 (DB2)

     Perform the following steps:

     1. Define the Hostname the Database is running on. `localhost` is used in case no Hostname is defined.

        In case you monitor the database on a Virtual Cluster Server the virtual server may not be able to resolve `localhost`. In this case, use the Virtual Cluster Server name in here.

     2. If your database is not listening on the default port (`1527`) you can fill in the proper value in Port…​. Define the Database, and a Username and a Password of a Database User to connect with.

     3. Push the Apply button.

   Microsoft SQL Server (MSSQL)

     Perform the following steps:

     1. Define the Hostname the Database is running on.

        In case the managed database is within a named instance you may use this syntax: `[hostname]\[instance]`.

     2. Define the Port and the Database.

     3. To encrypt the connection to a remote SQL server, activate the Use Protocol Encryption checkbox.

     4. For the Database User, you have to choose between SQL Server authentication and Windows authentication and fill in Username and a Password to connect with. In case you choose Windows authentication you may use this syntax in order to define a domain user: `[domain]\[username]`.

     5. Push the Apply button.

   MySQL (or MariaDB)

     Perform the following steps:

     1. Define the Hostname the Database is running on.

     2. Define the SQL port your database is listening on (by default `3306`).

     3. Define the Database, as well as the Username and Password of a Database User to connect with.

     4. Push the Apply button.

   Oracle

     Perform the following steps:

     1. Select either Direct Connection or TNS Lookup.

        - In case you choose Direct Connection fill in the Hostname, the Port, and the Database.

        - In case you choose TNS Lookup define either a TNS name key or a TNS entry in field TNS name key or entry. Select a Driver as well. If you choose the recommended Thin Driver make sure you have defined the TNS Admin directory as well.

          | If you choose TNS Lookup but do not use the Thin Driver, make sure the `ORACLE_HOME` environment variable is properly set in the environment of the user running the Avantra Agent, otherwise, the Oracle database driver will not be able to access TNS information and TNS Lookup will fail.

     2. Define the Username and a Password of the Database User to connect with.

     3. Push the Apply button.

   PostgreSQL

     Perform the following steps:

     1. Define the Hostname the Database is running on.

     2. Define the SQL port your database is listening on (by default `5432`).

     3. Define the Database, as well as the Username and Password of a Database User to connect with.

     4. Push the Apply button.

   SAP MaxDB (SAP DB)

     Perform the following steps:

     1. Define the Hostname the Database is running on. `localhost` is used in case no Hostname is defined.

        In case you monitor the database on a Virtual Cluster Server the virtual server may not be able to resolve `localhost`. In this case, use the Virtual Cluster Server name in here.

     2. If your database is not listening on the default port (`7210`) you can fill in the proper value in Port.

     3. Define the Database, a Username, and a Password of a Database User to connect with. You need to fill in an SQL Database User!

     4. Define a DBM Operator (e.g. the `CONTROL` user) and a DBM Operator Password.

     5. Push the Apply button.

   SAP HANA

     Perform the following steps:

     1. Define the Hostname the Database is running on. For Scale Out environments, you can enter several host names separated by semicolons.

     2. Define the SQL port your indexserver is listening on (by default: `3<xx>15`).

     3. Define the Username and Password of a Database User to connect with.

     4. Define the System DB managing this HANA database. The System DB must be created as a separated stand-alone database.

     5. Push the Apply button.

   SAP IQ

     Perform the following steps:

     1. Define the Hostname the Database is running on.

     2. Define the SQL port your database is listening on (by default `2638`).

     3. Define the Database, as well as the Username and Password of a Database User to connect with.

     4. Push the Apply button.

   SAP SQL Anywhere

     Perform the following steps:

     1. Define the Hostname the Database is running on.

     2. Define the SQL port your database is listening on (by default `2638`).

     3. Define the Database, Server name as well as the Username and Password of a Database User to connect with.

     4. Push the Apply button.

   SAP ASE (SAP Sybase ASE)

     Perform the following steps:

     1. Define the Hostname the Database is running on.

     2. Define the SQL port your database is listening on (by default `5000`).

     3. Define the Database, as well as the Username and Password of a Database User to connect with.

     4. Push the Apply button.

   SAP HANA System DB

     Perform the following steps:

     1. Define the Hostname the HANA System DB Database is running on.

     2. Define the SQL port your nameserver is listening on (by default: `3<xx>13`).

     3. Define the Username and Password of a Database User to connect with. The user in the HANA System Database must have the Service Admin role.

     4. Optional: define the SAP Control User and a Password of an OS user used to execute SAP Control commands (start/stop).

     5. Push the Apply button.

        Once you created your SAP HANA System DB you have to manually assign this System DB to your SAP HANA database or to your SAP System.

You can also set the Server not operational by defining Operational Since and/or Operational Until.

If you want to assign certain users being responsible for this database, you may select the corresponding values for the Administrator and Administrator’s Deputy fields in the Responsibilities block.

In case you made any modifications, hit the Apply button.

| In order to open an existing Database, choose Systems Databases from the menu, select the desired entry from the list and push the Open button (or double-click the selection).