ENV

Core command ENVT CONNECT ENVIRONMENT

ENV <environment> resolves the Environment in the current connection's Database Group and connects to the physical Connection mapped to it, exactly as CONNECT <connection> would (same checks, prompt and login script). It never searches other Database Groups: without a current Database Group it fails. CONNECT <name> always means a physical Connection, so a Connection and an Environment with the same name never conflict. Aliases: ENVT, CONNECT ENVIRONMENT.

Arguments

<environment> (mandatory) an Environment of the current Database Group, e.g. QA

Examples

ENV QA
Switches to the QA Connection of the current Database Group
CONNECT ENVIRONMENT PROD

Notes

Switches to another Environment of the current Database Group: ENV <environment>. Aliases: ENVT, CONNECT ENVIRONMENT.

The Environment is looked up in the Database Group of the current connection only. The connection mapped to it in that group is then opened exactly as CONNECT <connection> would open it: same checks, login script and prompt. After ENV QA, the session is the one CONNECT of the QA connection would have produced, and the prompt shows that connection.

CONNECT <name> always means a connection and ENV <name> always means an Environment, so a connection and an Environment with the same name never conflict. Other Database Groups are never searched: from a connection without a Database Group, ENV fails. It also fails, leaving the current connection open, when the Environment does not exist, has no connection in the group, is mapped to an inactive connection, or when that connection cannot be opened.

Last modified in release 5.3.1.