Can anyone please help where the datastage picks the tnsname

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hellboy
Participant
Posts: 34
Joined: Tue Sep 01, 2009 12:22 am
Location: kolkata

Can anyone please help where the datastage picks the tnsname

Post by hellboy »

Can anyone please help where the datastage picks the tnsnames.ora or is there any other config regarding the tns entries from Data stage side???
ragavendradineshdsx
Participant
Posts: 15
Joined: Sat Nov 14, 2009 3:38 am

Post by ragavendradineshdsx »

As far as i know, Datastage always refer to .odbc.ini in your engine installation folder. Inside this file, you would have given the ORACLE_SID, username/password & port number and based on this, Datastage will connect to the oracle using the oracle client installed on the same server.
Thanks & Regards,
Ragavendra Dinesh C
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Actually, the path to the tnsnames.ora file is retrieved from the environment variables settings, the ORACLE_HOME points to the oracle directory, which in turn redirects to the system file location (/home/oracle/net/admin on AIX).
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, it's got nothing to do with ODBC and for Windows it uses the environment variables - ORACLE_HOME or TNS_ADMIN if set to override the default location of $ORACLE_HOME/network/admin.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

While Windows does not have an .odbc.ini file nor the ODBCINI environment variable, it does have a Registry entry called ODBC.INI (a hangover from Windows 3.1 and earlier when there wasn't a registry).

This contains ODBC data source names and definitions. Within any DSN for an Oracle connection explicit reference to the TNS name is made. Oracle stage types do not use ODBC at all, so the above discussion becomes moot. In Oracle stage types, direct reference is made to the TNS name.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, direct reference is made to the TNS name, a.k.a. the appropriate entry in the tnsnames.ora file... or possibly out on a names server. The question was how does DataStage (technically any app leveraging the client) know where to find the tnsnames.ora file.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Right, technically then, DataStage doesn't "pick" it at all. DataStage (merely another client application as far as Oracle is concerned) supplies the name and the Oracle client software "picks" the name and corresponding definition out of the tnsnames.ora file, whose location is specified as noted in earlier posts in this thread, most usually via the setting of the ORACLE_HOME environment variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly, as already explained. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply