TNS changes in oracle connection

Highlighted
Four Stars

TNS changes in oracle connection

Hi all - I have been working on a job that using a TNSNAMES file to define a connection to an Oracle service name. However, it seems to pull in the data but does not reflect the change that has been made to the tns file on the server with the same path (it imports them when I select it but if we are changing a listener, for example, it is not pulled in until I reload the info in the talend IDE.

 

Any ideas on what I am doing wrong or if there is a workaround to pull in TNS info dynamically if this is indeed working as designed?

 

Thanks!

Caleb


Accepted Solutions
Four Stars

Re: TNS changes in oracle connection

Yes, I did try checking that - however, it only pulls in the info in a TNS file it does not reference that info going forward (if you change the TNS file it does not automatically update the job). However, after a couple of hours of tinkering, I was able to make things behave how I wanted - see below.

 

 

Added a tJava as the first item of my prejob with the following line in it:

System.setProperty("oracle.net.tns_admin", "DIRECTORYOFTHETNSFILE");

 

In my oracle connections I specified Oracle Custom as the type and used this as the URL:

jdbcSmiley Surprisedracle:thin:@NAMEINTNSFILE

 

 

This allows for talend to reference the tns file each time a job has been run and load the current information contained in the TNS file to specifiy the connection.

 

 

 


All Replies
Moderator

Re: TNS changes in oracle connection

Hello,

Can you please clarify in which Talend version/edition you are? Did you select "Use tns file" checkbox in tOracleConnection component to use the metadata of a context included in a tns file?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: TNS changes in oracle connection

Yes, I did try checking that - however, it only pulls in the info in a TNS file it does not reference that info going forward (if you change the TNS file it does not automatically update the job). However, after a couple of hours of tinkering, I was able to make things behave how I wanted - see below.

 

 

Added a tJava as the first item of my prejob with the following line in it:

System.setProperty("oracle.net.tns_admin", "DIRECTORYOFTHETNSFILE");

 

In my oracle connections I specified Oracle Custom as the type and used this as the URL:

jdbcSmiley Surprisedracle:thin:@NAMEINTNSFILE

 

 

This allows for talend to reference the tns file each time a job has been run and load the current information contained in the TNS file to specifiy the connection.

 

 

 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now