DB2 Hooks and Environment Variables

  • 0
  • 1
  • Question
  • Updated 2 days ago
When you run Hooks with DB2 are the Environment Variables set?

I can find documentation for this for Oracle and a blog post about SQL Server, but nothing about DB2.

Thanks
Jim
Photo of Jim Larsen

Jim Larsen

  • 624 Points 500 badge 2x thumb

Posted 2 weeks ago

  • 0
  • 1
Photo of Paul Vero

Paul Vero

  • 92 Points 75 badge 2x thumb
Hi Jim,

It looks like there is a limitation.  In our docs, about DB2 Hook notes:

https://docs.delphix.com/docs/delphix-administration/db2-environments-and-data-sources/customizing-db2-management-with-hook-operations/db2-hook-operation-notes

--------------------------------------

DB2 Environment Variables

Operations that run user-provided scripts have access to environment variables. For operations associated with specific dSources or virtual databases (VDBs), the Delphix Engine will always set environment variables so that the user-provided operations can use them to access the dSource or VDB.

dSource Environment VariablesEnvironment VariableDescription

DLPX_DATA_DIRECTORY

Path where staging database is mounted

VDB Environment VariablesEnvironment VariableDescription

DLPX_DATA_DIRECTORY

Path where virtual database is mounted
-----------------------------------------------

I am going to check with our DB2 team to make sure this is true and post the reply back to you.

Cheers,
-Paul

Photo of Jim Larsen

Jim Larsen

  • 624 Points 500 badge 2x thumb
When I run "env" as a hook I don't see either of that variable set, it would be helpful to be able to have things like VDB name, instance, etc. available in those hooks.
Photo of MichaelT

MichaelT, Official Rep

  • 2,124 Points 2k badge 2x thumb