# Environment Variables

Environment variables are used to pass parameters in to a query used by [Design Test Object](https://dbi-services.gitbook.io/omrun-help/version-4.x/element-overview/test-data-object).\
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 is Environment

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

<figure><img src="https://2873353689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfK1YJaTCqOiS0L22wVKG%2Fuploads%2Fgit-blob-4402b85ea6a6d8455d055a09b7042395cfdb0359%2FOMrunHelp_EnvVar1.gif?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 Omis variable into a parameter (@param1 - @param4) and into remark.

<figure><img src="https://2873353689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfK1YJaTCqOiS0L22wVKG%2Fuploads%2Fgit-blob-2b3e60f5e01067eff72bfe30e4ae59826ab88f50%2FOMrunHelp_EnvVar2.gif?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.
