> For the complete documentation index, see [llms.txt](https://dbi-services.gitbook.io/omrun-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dbi-services.gitbook.io/omrun-help/configuration/using-variables/environment-variables.md).

# Environment Variables

Environment variables are used to pass parameters in to a query used by [Design Test Object](https://gitlab.com/dbiservices/omrun/help/-/blob/v5.x/element-overview/test-data-object/README.md).\
This allows to easily switch from one environment to another and pass parameterized data (e.g. Server Name, Data Source Name, Data Base Schema) to the Test Object.

***

### Declare variable @DB\_Schema in Environment

In this example the value 'dev' will be passed in to the variable @DB\_Schema.

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

***

### Usage of variable @DB\_Schema in Test Object

At runtime the variable @DB\_Schema will be replaced by the value 'dev'. This mechanism enables to read data from environment specific database schemas.\
You can also use an OMrun variable into a parameter field (@param1 - @param4) and into a remark field.

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

***

### Windows environment variables

You can also use Windows system-/user variables. → (%VariableName%)

**Important**: please **restart OMrun** to get the value of the new variable loaded and accessible.
