Hook operations enable the execution of custom scripts at specific points in the lifecycle of dSources and VDBs on CD engines connected to DCT. Hooks are useful for tasks such as quiescing data before a snapshot, running post-refresh data transformations, or stopping and restarting application processes around VDB operations.
Where hooks execute
Where a hook script runs depends on the object type and the ingestion model:
-
VDB hooks execute on the target host where the VDB is provisioned.
-
dSource hooks execute on either the production host or the staging host, depending on the connector and ingestion model:
-
Direct ingestion (e.g., Oracle with Delphix-initiated backups): hooks run on the production host.
-
Staging push or staging pull (e.g., SQL Server, SAP ASE validated sync): hooks run on the staging host.
-
Refer to the connector's Ecosystem documentation to understand which ingestion model applies and where hooks will execute.
-
Hook script types
When creating a hook, you specify the script type. The available types are:
-
Bash: Bash shell script (Linux/UNIX environments).
-
Shell: System shell command (Linux/UNIX environments).
-
Expect: Expect script for interactive command automation.
-
PowerShell (ps): PowerShell script (Windows environments).
-
PowerShell Delegated (psd) — Delegated PowerShell script (Windows environments).
Hook templates
Each dSource and VDB on a connected CD engine has its own set of hooks. For efficient management across multiple datasets, you can create reusable Hook Templates in DCT under Data > Data Management > Hook Templates. Templates can be created directly in DCT or imported automatically from connected engines. They can then be applied to hook points during provisioning or on existing datasets.
Enabling and disabling hooks
For dSource hooks that run on production hosts, dSource hook execution is controlled separately and is disabled by default for new installations. For scope and default behavior details, see Enable and disable dSource hooks.
Hooks can be disabled and enabled from the CLI using the following commands:
-
Disable hooks:
system>disableDSourceHooks>commit -
Enable hooks:
system>enableDSourceHooks>commit
Available hook operations
For a complete list of dSource and VDB hook operations, their descriptions, and execution order, see the Hook operations list.
Enable and disable dSource hooks