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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

TIS Use tnsnames definition in runtime

Hello
I'm creating a talend job for my company. This job will execute oracle sql scripts and generate custom outputs.
It will be called from command line, the name of the database will be an arguement in this command line.
There's a big number of databases in my company and this number and db definitions can change...
The solution that we considered is that the name of the database will be the same of tnsnames.ora file..
The problem is that I cannot find a way to connect to database in talend using tnsnames in runtime.. I can do it in design time (use TNS file...).
Could you please tell me if there's a workaround or a custom component that will do it?
Thanks
Labels (2)
5 Replies
NSG
Contributor
Contributor

Hello
I'm creating a talend job for my company. This job will execute oracle sql scripts and generate custom outputs.
It will be called from command line, the name of the database will be an arguement in this command line.
There's a big number of databases in my company and this number and db definitions can change...
The solution that we considered is that the name of the database will be the same of tnsnames.ora file..
The problem is that I cannot find a way to connect to database in talend using tnsnames in runtime.. I can do it in design time (use TNS file...).
Could you please tell me if there's a workaround or a custom component that will do it?
Thanks
Anonymous
Not applicable

Hi,
any update to this? I would also like to use tnsnames at runtime, just to specify path to my tnsnames.ora file, SID, username and password. All of these as context parameters. Is that possible?
Thanks,
Tomas
willm1
Creator
Creator

You may have already thought about this - but what if you designed the job to use the database name (which is same as the tnsnames.ora) to read the file, parse it for the elements and load them into context variables?
Anonymous
Not applicable

Thanks willm for your answer.
Yes, I know I could read the file and parse it for the details, I was just hoping there is some easier solution to this. tOracleConnection component obviously can parse tns files (at design time), so I thought it would be somehow possible to use it for parsing tns files at runtime. Probably not. I will end up with parsing it by my own.
Anonymous
Not applicable

Thanks willm for your answer.
Yes, I know I could read the file and parse it for the details, I was just hoping there is some easier solution to this. tOracleConnection component obviously can parse tns files (at design time), so I thought it would be somehow possible to use it for parsing tns files at runtime. Probably not. I will end up with parsing it by my own.

Hi
It don't parse automatically the details from the tns file at runtime, because the tns file may contain multiple services. At design time, it requires user to click the 'Select a DB conenction in TNS File' button and select the service.
Shong