Dynamic password in odbc.ini

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
bruneo
Premium Member
Premium Member
Posts: 5
Joined: Fri Feb 23, 2007 9:40 am

Dynamic password in odbc.ini

Post by bruneo »

How can the user id and password in odbc.ini be assigned dynamically at run-time?
bruneo
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Leave them blank there, no need to expose them. Create job parameters (or a parameter set) for the required information - database, user, password (etc) - and then leverage those parameters in your database stages, ODBC or otherwise.
-craig

"You can never have too many knives" -- Logan Nine Fingers
bruneo
Premium Member
Premium Member
Posts: 5
Joined: Fri Feb 23, 2007 9:40 am

Post by bruneo »

Thanks for the reply. This is actually the approach I currently use. I was just wondering if I could code variables in these entries in odbc.ini that could be resolved at run-time, eliminating the need to pass them as parms.
bruneo
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't believe so, have never heard of such capability... but then I've never done a crap-ton of ODBC. Anyone?
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Try environment variables, the system environment and not datastage. Then you can set them using $ENV.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
HariK
Participant
Posts: 68
Joined: Thu May 17, 2007 1:50 am

Post by HariK »

Not sure if UNIX environment variables can be encoded. That might be a concern
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

We use the project-based environment variables, and they can be encrypted. They work just fine with the ODBC stages (at least at 8.)
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The question is, what if anything works in the odbc.ini file in some kind of dynamic fashion? Can you leverage a $Something there? I don't believe so but have never tried.
-craig

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