Page 1 of 1

Dynamic password in odbc.ini

Posted: Thu Oct 21, 2010 7:49 am
by bruneo
How can the user id and password in odbc.ini be assigned dynamically at run-time?

Posted: Thu Oct 21, 2010 8:03 am
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.

Posted: Thu Oct 21, 2010 8:37 am
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.

Posted: Thu Oct 21, 2010 10:08 am
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?

Posted: Thu Oct 21, 2010 10:19 am
by DSguru2B
Try environment variables, the system environment and not datastage. Then you can set them using $ENV.

Posted: Fri Oct 22, 2010 3:44 am
by HariK
Not sure if UNIX environment variables can be encoded. That might be a concern

Posted: Fri Oct 22, 2010 7:41 am
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.)

Posted: Fri Oct 22, 2010 10:31 am
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.