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.
- Open database Metadata
- Create a new "Connection Initialization SQL" node on root server node
- Define a semi-colon separated list of SQL Queries
- 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
Definition of SQL Queries
Miscellaneous
You can define multiple "Connection Initialization SQL" nodes, which will be executed in the order defined in Metadata.