Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create context group for DB connections

Hi,

I need to create separate context groups for each of the environments - DEV, SIT, UAT, PROD so that each context group has its own database connection details. I should be able to switch across the environments easily without having to change the DB connection details again & again. Can somebody plz help out here

Labels (1)
5 Replies
TRF
Champion II
Champion II

Hi,
In the repository, add a context folder nammed "DB" for example, then create the desired variables such as "username", " password", "server" and so on. Add as many group context as needed (DEV, UAT, PROD) and set the value for each variable in each context.
After saving, open the jobs and drag and drop the new context group into the job context.
This is the basic approach. You can also defined values using an external source based on a file or a database table.
Anonymous
Not applicable
Author

Thanks for the solution.  In the tOracleConnection component what should be selected as the 'Property Type' for using the context variables.  Should it be 'Repository' or 'Built-In'?

TRF
Champion II
Champion II

Let "Property Type" to Built-in as soon as you want to use context variables.

Anonymous
Not applicable
Author

I tried using the "Property Type" to 'Built-in' in tOracleConnection. However there is no way for me to select the corresponding variables from the Context Group for the DB details like - HostName, Port, Schema, etc. Plz help
TRF
Champion II
Champion II

Are the variables created in the context group?

Then, when you want to use them, you just have to enter their name in the corresponding field like "context.serverName" for example.

If you still have the problem, share a capture of the context group variables + a capture of the tOracleConnection component.