This guide covers creating and configuring a staging or target environment in DCT using dct-toolkit. Estimated time: 15 minutes.

Prerequisites

  • dct-toolkit installed and configured (create_config completed)

  • DCT permissions to create environments

  • Access credentials for the target host (Unix/Linux or Windows)

  • Database software already installed on the target host

About environments

In DCT, an environment represents a physical or virtual host where database software is installed, VDBs can be provisioned, and dSources can be staged. Each environment has three key components:

  • Host — The physical or virtual machine.

  • Environment users — OS-level accounts that DCT uses to perform operations.

  • Repositories — Installed database software, such as an Oracle Home or SQL Server instance.

View existing environments

# List all environments
				dct-toolkit get_environments

				# Filter to specific columns
				dct-toolkit search_environments --columns=id,name,os_type,description,enabled

				# View full details for a specific environment (JSON)
				dct-toolkit get_environment_by_id environment_id=<ENVIRONMENT_NAME_OR_ID> -js

				# Extract a specific value
			dct-toolkit get_environment_by_id environment_id=<ENVIRONMENT_NAME_OR_ID> --jsonpath=enabled

Create an environment

Unix/Linux

dct-toolkit create_environment \
				hostname="<TARGET_HOST_IP_OR_FQDN>" \
				os_type="UNIX" \
				engine_id="<ENGINE_ID>" \
				name="<ENVIRONMENT_NAME>" \
				username="<OS_USERNAME>" \
			password="<OS_PASSWORD>"

Windows

dct-toolkit create_environment \
				hostname="<TARGET_HOST_IP_OR_FQDN>" \
				os_type="WINDOWS" \
				engine_id="<ENGINE_ID>" \
				name="<ENVIRONMENT_NAME>" \
				username="<DOMAIN\\USERNAME>" \
			password="<OS_PASSWORD>"

After creation, DCT connects to the host, validates credentials, discovers installed database software, and creates the environment object. Initial discovery may take 2–5 minutes. Verify with:

dct-toolkit get_environment_by_id environment_id="<ENVIRONMENT_NAME>" --columns=name,enabled,status

Manage environment users

Environment users are OS-level accounts that DCT uses for database operations. The user provided at creation becomes the primary user.

# List current users
				dct-toolkit list_environment_users environment_id="<ENVIRONMENT_NAME_OR_ID>"

				# Add a user
				dct-toolkit create_environment_user \
				environment_id="<ENVIRONMENT_NAME_OR_ID>" \
				username="<OS_USERNAME>" \
				password="<OS_PASSWORD>"

				# Set a different primary user
				dct-toolkit primary_environment_user \
				environment_id="<ENVIRONMENT_NAME_OR_ID>" \
				user_ref="<USER_ID>"

				# Update a user's password
				dct-toolkit update_environment_user \
				environment_id="<ENVIRONMENT_NAME_OR_ID>" \
				user_ref="<USER_ID>" \
			password="<NEW_PASSWORD>"

Using a password vault

HashiCorp, CyberArk, and Azure Key Vault are supported as credential sources. Replace the username and password arguments in create_environment_user with the vault-specific arguments below.

Vault Argument Description
All vaults vault Name or reference of the vault.
All vaults vault_username Delphix display name for the vault user.
Azure Key Vault azure_vault_name Azure key vault name.
Azure Key Vault azure_vault_username_key Key for the username in the key-value store.
Azure Key Vault azure_vault_secret_key Key for the password in the key-value store.
CyberArk cyberark_vault_query_string Query to find a credential in CyberArk.
HashiCorp hashicorp_vault_engine Vault engine name where the credential is stored.
HashiCorp hashicorp_vault_secret_path Path in the vault engine where the credential is stored.
HashiCorp hashicorp_vault_username_key Key for the username in the key-value store.
HashiCorp hashicorp_vault_secret_key Key for the password in the key-value store.

Manage repositories

Repositories represent installed database software. DCT discovers them automatically during environment creation, or when refresh_environment is run.

# List repositories in an environment
				dct-toolkit get_environment_by_id environment_id="<ENVIRONMENT_NAME_OR_ID>" -js --jsonpath=repositories

				# Refresh discovery if repositories are missing
				dct-toolkit refresh_environment environment_id="<ENVIRONMENT_NAME_OR_ID>"

				# Update a repository
				dct-toolkit update_repository \
				repository_id="<REPOSITORY_ID>" \
				--body='{"install_path": "/u01/app/oracle/product/19.3.0/dbhome_1"}'

				# Manually create a repository (if auto-discovery missed it)
				dct-toolkit create_repository \
				environment_id="<ENVIRONMENT_NAME_OR_ID>" \
			--body='{"install_path": "<PATH_TO_DB_SOFTWARE>"}'

Add an Oracle listener

dct-toolkit create_oracle_listener \
				environment_id="<ENVIRONMENT_NAME_OR_ID>" \
				listener_name="LISTENER" \
			port="1521"

Verify environment readiness

# Check status
				dct-toolkit get_environment_by_id environment_id="<ENVIRONMENT_NAME_OR_ID>" --columns=id,name,enabled,status

				# Confirm repositories are compatible with an existing dSource
				dct-toolkit compatible_repositories_by_snapshot source_data_id="<DSOURCE_NAME_OR_ID>"

				# Test connectivity
				dct-toolkit connectivity_check environment_id="<ENVIRONMENT_NAME_OR_ID>"

				# Enable or disable
				dct-toolkit enable_environment environment_id="<ENVIRONMENT_NAME_OR_ID>"
			dct-toolkit disable_environment environment_id="<ENVIRONMENT_NAME_OR_ID>"

End-to-end example: Oracle staging environment

# 1. Create the environment
				dct-toolkit create_environment \
				hostname="10.160.1.150" \
				os_type="unix" \
				engine_id="1" \
				name="oracle-target-01" \
				username="delphix" \
				password="SecurePass123"

				# 2. Check status after discovery
				dct-toolkit get_environment_by_id environment_id="oracle-target-01" --columns=name,enabled,status

				# 3. Add the oracle OS user
				dct-toolkit create_environment_user \
				environment_id="oracle-target-01" \
				username="oracle" \
				password="OraclePass123"

				# 4. List users to get the oracle user ID
				dct-toolkit list_environment_users environment_id="oracle-target-01"

				# 5. Set oracle as the primary user
				dct-toolkit primary_environment_user \
				environment_id="oracle-target-01" \
				environment_user_id="<ORACLE_USER_ID_FROM_STEP_4>"

				# 6. Verify repositories were discovered
				dct-toolkit get_environment_by_id environment_id="oracle-target-01" -js

				# 7. Add Oracle listener
				dct-toolkit create_oracle_listener \
				environment_id="oracle-target-01" \
				listener_name="LISTENER" \
				port="1521"

				# 8. Confirm environment appears in compatible repositories
				dct-toolkit compatible_repositories_by_snapshot source_data_id="<YOUR_ORACLE_DSOURCE>"

				# 9. Add tags for access control
			dct-toolkit create_environment_tags environment_id="oracle-target-01" tags='Env=Staging' 'Team=DevOps'

Troubleshooting

Issue Resolution
Environment not discovered (enabled: false, no repositories) Verify SSH or WinRM connectivity to the host, confirm the OS user has appropriate permissions, then run dct-toolkit refresh_environment environment_id="<ID>".
Repository not found after discovery Verify the installation path is standard. Confirm the primary user has read access to the installation directory. Manually create the repository with the correct path if needed.
Authentication failures Verify credentials are correct. For Windows, confirm the domain is specified (DOMAIN\username). Update the password with update_environment_user.
VDB operations failing due to permission issues List environment users, identify the correct user ID, and set it as primary with primary_environment_user.
Last updated
Oct 8, 2026