This article demonstrates how to define SQL Queries which will be executed when initializing a connection.

Those user defined queries can be useful when you need to execute automatically the same list of queries each time a connection is initialized, such as defining options, changing current working databases, ...

Prerequisites:

  • Stambia DI Designer S19.0.18 or higher
  • Stambia DI Runtime S17.6.6 or higher


Metadata Configuration

Defining SQL Queries which should be executed at connection initialization is performed directly in corresponding Metadata.

  1. Open database Metadata
  2. Create a new "Connection Initialization SQL" node on root server node
  3. Define a semi-colon separated list of SQL Queries
  4. Optionally repeat from step 2 to add additional nodes and queries if you want, for instance, to separate them in multiple nodes

 

Creation of "Connection Initialization SQL" node

create node

 

Definition of SQL Queries

defining queries

 

Miscellaneous

You can define multiple "Connection Initialization SQL" nodes, which will be executed in the order defined in Metadata.

multi init node