Skip to main content
Skip table of contents

Customizing Oracle VDB environment variables

Overview

This topic describes how to customize the set of environment variables sourced prior to administering an Oracle virtual database (VDB). Certain Oracle database parameters are sensitive to the environment variables present when you start or administer the database. For this reason, the Delphix Engine allows you to dictate custom environment variables that will be set prior to any administrative action, such as provision, start, stop, rollback, or refresh.

You can specify environment variables by two different means:

  • Name-value pair – A literal variable name and value to be set

  • Environment file – An environment file to be sourced

Environment variables for Oracle RAC databases might vary in value between cluster nodes. Therefore, environment variable specifications for an Oracle RAC database must specify the cluster node to which they apply.

Setting custom environment variables

Prerequisites

If you are adding any environment variables that are environment files, these files must be accessible on the target environment.

Procedure

  1. You can configure custom environment variables in the Provision Wizard.

    1. On the Target Environment tab, click Advanced. or

    2. You can also configure these variables on the Configuration tab when the VDB is disabled.

  2. Click the Plus icon to add an environment variable.

  3. Choose a format for the environment variable.

    1. Name-Value Pair

      1. Enter a Name to identify the variable.

      2. Enter the variable's Value.

      3. For Oracle RAC databases, you must also specify the cluster node to which this environment variable applies.

    2. Environment File

      1. Enter an absolute path to an environment file on the target environment. This path can be followed by parameters. Paths and parameters are separated by spaces.

        Escaping Spaces

        To specify literal spaces, escape them with a backslash ("hello\ world" -> "hello world"). To specify literal backslashes, escape them with a backslash ("foo\" -> "foo"). Any other character preceded by a backslash will retain both the backslash and the original character ("\b" -> "\b"). Escaping is done in order from left to right ("part1\ part2" -> "part1" "part2" will be two parameters).

      2. For Oracle RAC databases, you must also specify the cluster node to which this environment variable applies.

  4. Save the custom environment variables by completing provisioning, or clicking the Confirm. These environment variables will take effect when you start the Oracle VDB.

Environment variable denylist

The Delphix Engine denylists the following environment variables; they cannot be set by the user.

  • ORACLE_SID

  • ORACLE_BASE

  • ORACLE_HOME

  • CRS_HOME

  • ORACLE_UNQNAME

  • ORAENV_ASK

  • LOGON_STR

  • DLPX_SHELL

  • SQLPLUS_PLSQL_MODIFIERS

  • SQLPLUS_DML_MODIFIERS

  • SQLPLUS_DDL_MODIFIERS

If a Name-Value pair has any one of these prohibited environment variables as the name, an error will be raised.

If an environment file sets one of these variables, the Delphix Engine will override this value when the Oracle VDB is started.

The following environment variables will be set before invoking the user-specified script, and thus can be accessed within the script.

  • ORACLE_SID

  • ORACLE_BASE

  • ORACLE_HOME

  • CRS_HOME

  • ORACLE_UNQNAME

User-Input sanitation for environment variables

For security purposes, user-input provided through the custom environment variables feature retains its literal value when interpreted, including ', ", and undefinedORACLE_HOME

  • undefinedORACLE_SID

  • undefinedORACLE_UNQNAME

  • undefinedPATH

Caveats

  • Environment variables are sourced on provision, start, stop, rollback, and refresh. Custom environment variables are not applicable to V2P.

  • Custom environment variables do not propagate to child VDBs and must be set again on provision.

  • Custom environment variables do not persist after migration. On migration of a VDB with custom environment variables, an alert will be raised that the custom environment variables have been removed from the VDB. In order to view the alert, go to System > Event Viewer.

  • Custom environment variables are not available within scripts executed by VDB Hook Operations.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.