# Environment

### ![](https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-78b905a35aa89c1cdc562ae76bb3bdae3c4cf12f%2FIcon_ENV.png?alt=media)

### Abstract

Overview in grid format of all source connection details like login credentials of databases, paths of flat files and reusable variable strings in an asccending Id order.

Aliases are key elements, starting always with an "@", and are used to select the data source within a data query.

Nested variables are allowed and are extracted during run time execution.

The connection string is extracted during run time execution from the matching [data adapter](https://dbi-services.gitbook.io/omrun-help/configuration/data-adaptor).

<figure><img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-3ce18561521cfe27ed8e6a9f1d38046b40c91c38%2FOMrunHelp_Environment1.png?alt=media" alt="OMrun environment screen" width="80%"><figcaption><p>OMrun environment screen</p></figcaption></figure>

***

### Environment Characteristics

Existing environments are shown on the top of the [Navigation Tree](https://dbi-services.gitbook.io/omrun-help/element-details/navigation-tree).\
At least one environment is always selected, also visible in the bread crumb (in green).

<figure><img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-9959f25151ab71f63b32f9709866883cb13704b9%2FOMrunHelp_Environment2.png?alt=media&#x26;token=4af5d551-5123-4344-88d9-1fcddad34b2e" alt="OMrun environment position" width="50%"><figcaption><p>OMrun environment position</p></figcaption></figure>

There are two environment sections defined:

* **Local environment settings**\
  which are set specific for each environment.
* **Global environment settings**\
  which are usable throughout all environments of this business system specified.

For an alias definition with the same name on both sections, the global alias is overwritten by the local alias. Define as much as possible within the global definition section and add specific definitions in the local section only.

<figure><img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-c192987d432b1661667b3f7f335c3e1fe27e638b%2FOMrunHelp_Environment3.png?alt=media&#x26;token=835032d4-50d2-419a-9183-966448f0678f" alt="OMrun environment screen details" width="80%"><figcaption><p>OMrun environment screen details</p></figcaption></figure>

***

### New

Right click on navigation tree at parent level `Environments` (in green) and select <img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-78b905a35aa89c1cdc562ae76bb3bdae3c4cf12f%2FIcon_ENV.png?alt=media" alt="OMrun Environment Icon" data-size="line"> `New` from dropdown menue.

<figure><img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-c54fd575eb17a658ba53032d11d63fcaeb8a88d0%2FOMrunHelp_Environment4.png?alt=media&#x26;token=e0344bfc-24cd-4b8e-8dcf-0baa71cb2c07" alt="OMrun environment tree dropdown - function new" width="50%"><figcaption><p>OMrun environment tree dropdown - function new</p></figcaption></figure>

***

### Copy, Rename, Delete

Right click on navigation tree at child level of your environment name (in this example: `PROD`) and select <img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-78b905a35aa89c1cdc562ae76bb3bdae3c4cf12f%2FIcon_ENV.png?alt=media" alt="OMrun Environment Icon" data-size="line"> `Copy`, <img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-78b905a35aa89c1cdc562ae76bb3bdae3c4cf12f%2FIcon_ENV.png?alt=media" alt="OMrun Environment Icon" data-size="line"> `Rename` or <img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-78b905a35aa89c1cdc562ae76bb3bdae3c4cf12f%2FIcon_ENV.png?alt=media" alt="OMrun Environment Icon" data-size="line"> `Delete` from dropdown menue.

<figure><img src="https://1143774439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1ooXfQ2qWGFRh6lihybt%2Fuploads%2Fgit-blob-720214047cf82354837d00db98aa2f8dab372f62%2FOMrunHelp_Environment5.png?alt=media&#x26;token=b209b0a8-0b18-44c3-855d-0b798e9fec93" alt="OMrun environment tree dropdown - function copy, rename, delete" width="50%"><figcaption><p>OMrun environment tree dropdown - function copy, rename, delete</p></figcaption></figure>

***

### Field Description

| Column       | Description                                                                                                                                                                                                                                                                                                                    |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Id           | Id generated when adding a new environment row. Defines the sort order of the environment entries. It is allowed to manually change the number.                                                                                                                                                                                |
| Alias        | Enter the Data Source Alias (Variable). Use always @ to begin with.                                                                                                                                                                                                                                                            |
| Db Type      | Select Data Type from drop down list. Data Types are defined in the configuration.                                                                                                                                                                                                                                             |
| Server       | Enter server name or file destination.                                                                                                                                                                                                                                                                                         |
| Db           | Enter database name, schema name, file name or any string content of an OMIS Variable.                                                                                                                                                                                                                                         |
| User Name    | Enter User Name used to login to the data source.                                                                                                                                                                                                                                                                              |
| Password     | Enter password used to login to the data source. The password is not visible in plain text. It is hidden behind 6 asterisks \[\*\*\*\*\*\*] independent of the real length of the password. It is saved encrypted on any environment file \[\*.env] or log file \[\*.log.txt]. Passwords up to 40 characters long are allowed. |
| Trusted User | Select trusted for login to the data source with credentials of the current windows user.                                                                                                                                                                                                                                      |

### Environment examples for different Adapter Types

| Alias             | Db Type                       | Server                               | Db               | Trusted User        | Example Query                                                                                                                                             |
| ----------------- | ----------------------------- | ------------------------------------ | ---------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| @Access           | **Access (OLEDB)**            | D:\Excel\Migration                   | Access\_2003.mdb | Checked             | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM VehicleA WHERE Color = '@param1'             |
| @Amazon Aurora    | **Amazon Aurora (MySQL)**     | Server name:Port                     | Schema name      | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
| @Azure Database   | **Azure Database (MySQL)**    | Server name:Port                     | Schema name      | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
| @Btrieve          | **Btrieve/Pervasive (MySQL)** | Server name:Port                     | Schema name      | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
| @DB2              | **IBM DB2 (IBM)**             | Server name                          | Database name    | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
| @Excel            | **Excel (OLEDB) + HDR**       | D:\Excel\Migration                   | Vehicle.xlsx     | Checked             | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM \[VehicleA$] WHERE Color = '@param1'         |
| @Flatfile         | **FlatFile (OLEDB) – HDR**    | D:\Excel\Migration                   | n/a              | Checked             | SELECT L1 AS VehicleId, L2 AS Mark, L3 AS Model, L4 AS Color, L5 AS EmptyWeight FROM Vehicle\_semi.txt WHERE L4 = '@param1'                               |
| @Google Cloud SQL | **Google Cloud SQL (MySQL)**  | Server name:Port                     | Schema name      | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
| @iSeries          | **IBM AS/400 (IBM)**          | Server name                          | n/a              | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM VehicleA WHERE Color = '@param1'             |
| @iSeries          | **IBM AS/400 (OLEDB)**        | Server name                          | n/a              | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM VehicleA WHERE Color = '@param1'             |
| @MariaDB          | **MariaDB (MySQL)**           | Server name:Port                     | Schema name      | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
| @MySQL            | **MySQL**                     | Server name:Port                     | Schema name      | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
| @ODBC             | **ODBC**                      | General usage: several databases     | n/a              | Checked             | SELECT L1 AS VehicleId, L2 AS Mark, L3 AS Model, L4 AS Color, L5 AS EmptyWeight FROM Vehicle\_semi.txt WHERE L4 = '@param1'                               |
| @OLDB             | **OLDB**                      | General usage: several databases     | n/a              | Checked             | SELECT L1 AS VehicleId, L2 AS Mark, L3 AS Model, L4 AS Color, L5 AS EmptyWeight FROM Vehicle\_semi.txt WHERE L4 = '@param1'                               |
| @Oracle           | **Oracle**                    | Server name:Port                     | Database name    | Unchecked           | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
| @Path\_Excel      | **OMIS Variable (OM)**        | D:\Excel\Migration                   | n/a              | Checked             | n/a                                                                                                                                                       |
| @SQLServer        | **SQLServer**                 | Server name\SQL Server instance name | Database name    | Unchecked / Checked | SELECT VehicleId AS VehicleId, Mark AS Mark, Model AS Model, Color AS Color, EmptyWeight AS EmptyWeight FROM @DB\_Schema.VehicleA WHERE Color = '@param1' |
