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 Smiley Sad
Thanks
9 REPLIES
One Star

Re: Using TNS for Oracle connection

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

Re: Using TNS for Oracle connection

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
Employee

Re: Using TNS for Oracle connection

According to DBD:Smiley Surprisedracle 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)

Re: Using TNS for Oracle connection

I think it may be a great enhancement for Talend.
But unfortunately for us, we are using Java as target language...
Six Stars

Re: Using TNS for Oracle connection

Try editing the JDBC connection string and use the address_list option.
eg.
jdbcSmiley Surprisedracle: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)))
One Star

Re: Using TNS for Oracle connection

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?
One Star

Re: Using TNS for Oracle connection

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

Re: Using TNS for Oracle connection

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.
One Star

Re: Using TNS for Oracle connection

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