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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jftdarr
Contributor II
Contributor II

Iterate multiple database connections

I have a need to check consistency of data across five database environments.  I have a framework for how to do the comparison and output the results but what I would like to know is if there is a way to create a list of MSSQL database connections, and iterate through them so that I can build the comparison once and then the iteration does the following:

 

Compare system A against system B

Compare system A against system C

Compare system A against system D 

.... 

 

(System A is considered the source so we can compare all other systems against it).  I'm only jjust starting to use iteration connectors and things like tForEach so any ideas would be greatly appreciated. 

 

It should be worth noting that the schemas are identical across systems. 

Labels (4)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

You should have source db name, source db host, user name, password, schema, same for target do as well.

View solution in original post

5 Replies
manodwhb
Champion II
Champion II

@jftdarr , you need to maintain a table for the connection and iterate it .

jftdarr
Contributor II
Contributor II
Author

Awesome thank you.  Forgive the stupid follow up but is there a particular schema that i should follow for that table/how would I leverage that table?  

manodwhb
Champion II
Champion II

The table schema should be as how you will store and iterate them.
jftdarr
Contributor II
Contributor II
Author

Thanks - I wasn't clear on my questions.  You say I need to maintain a table of database connections to iterate through.  I'm trying to understand what structure that table should be in... db_type, db_name, host, login, password.. or should it be a connection string? how do I then pass those values to a tDBConnection file?

manodwhb
Champion II
Champion II

You should have source db name, source db host, user name, password, schema, same for target do as well.