Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using TNS for Oracle connection

Hi,
is it possible to use TNS entries defined in the tnsname file to connect to an Oracle database ?
We have a failover clause specified and we can't use it in Talend.
I made a search in the forum and in the documentation but wasn't able to find anything 0683p000009MPcz.png
Thanks
Labels (3)
9 Replies
Anonymous
Not applicable
Author

I think that is not possible to use directly your tnsname. You should copy the tnsname value to the different fields of your oracle connection
Anonymous
Not applicable
Author

Is there a way to use the failover clause of the tnsname ?
i.e. a way to implement the automatic use of a failover server in case the first one is off ?
db=
(description=
(load_balance=on)
(failover=on)
(address=(protocol=tcp)(host=host1)(port=1521))
(address=(protocol=tcp)(host=host2)(port=1521))
(connect_data=
(service_name=db)))

Moreover, the use of tns facilitate the configuration management.
The server we use for Talend has the oracle client and the dba push a new tnsnames.ora to the server.
If we use a configuration file or a table to store those data, we have to change it too.
Thanks
Anonymous
Not applicable
Author

According to DBD:0683p000009MA5A.pngracle documentation on CPAN it is perfectly possible to use the tnsnames.ora definition with a Perl job (and I have already done it with an earlier version of TOS, but it's not possible with TOS 2.4.x, unless we make some slight changes)
Anonymous
Not applicable
Author

I think it may be a great enhancement for Talend.
But unfortunately for us, we are using Java as target language...
Anonymous
Not applicable
Author

Try editing the JDBC connection string and use the address_list option.
eg.
jdbc 0683p000009MA5A.pngracle:thin:@(description=(address_list=(address=(host=myhost1.domain.com)(protocol=tcp)(port=1521))(address=(host=myhost2.domain.com)(protocol=tcp)(port=1521)))(connect_data=(service_name=myservicename)))
_AnonymousUser
Specialist III
Specialist III

Hi jholman,
I' ve tried to use your suggestion editing the parameter 'String of Connection' in Metadata --> Db Connection --> Create Connection. The connection is checked successfully, but Talend don't save the text of parameter.
Do you know this behavior? Can I use a work-around?
_AnonymousUser
Specialist III
Specialist III

is it possible to use TNS entries defined in the tnsname file to connect to an Oracle database ?
We have a failover clause specified and we can't use it in Talend.
Do we have a solution to the above mentioned project. I am using java as a language in talend
Anonymous
Not applicable
Author

This is a very old thread. The newer versions of Talend (4.0+) include an option to "use TNS file" in the advanced settings sub-tab of the Oracle components.
_AnonymousUser
Specialist III
Specialist III

Thanks for the reply.
Will it work for failover databases also, with 2 host entries.