Environment Variables versus Hard Coded values
Moderators: chulett, rschirm, roy
Environment Variables versus Hard Coded values
Any suggestions would be appreciated. Have a simple server job that does a sql select statement to view rows in a table. If I run the job with the Server Name, User ID and password hardcoded, it works fine. However the minute I put the environment variables in and update the job parameters the job fails. I have checked the job parameters and made sure that the environment variables are correct and have the same values. I can also see in the failed log that the values pulled from the environment variables are the same as the hardcoded job log. I really stumped. Thanks
With which error message does the job fail?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 232
- Joined: Fri Aug 04, 2006 1:20 am
- Location: Bangalore
I am using the following variables:
#$HRDMPassword#
#$HRDMUser#
#$HRDMPROD#
The error message i am getting is:
testedwdev..DB2_UDB_API_0: [IBM][CLI Driver] SQL30082N Attempt to establish connection failed with security reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
Unable to connect to DB2 server 'edwdev'.
The pulled variables from the environemnt:
HRDMPROD=edwdev
HRDMPassword=HD:D1:V1M9C?07FIM;JL@K1EBEMM5@Q4A
HRDMUser=hritmvr
Note: the hashed password is the exact hashed password that I get from the hardcoded run of this job. So I know that the password is the same for both the env and the hardcode.
#$HRDMPassword#
#$HRDMUser#
#$HRDMPROD#
The error message i am getting is:
testedwdev..DB2_UDB_API_0: [IBM][CLI Driver] SQL30082N Attempt to establish connection failed with security reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
Unable to connect to DB2 server 'edwdev'.
The pulled variables from the environemnt:
HRDMPROD=edwdev
HRDMPassword=HD:D1:V1M9C?07FIM;JL@K1EBEMM5@Q4A
HRDMUser=hritmvr
Note: the hashed password is the exact hashed password that I get from the hardcoded run of this job. So I know that the password is the same for both the env and the hardcode.
try a test with the password being a string and not an encrypted parameter, does the error go away or stay?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
I've had the same issue using 7.5.2. I could get the jobs to run in development, but had a lot of problems when they were promoted to QA or Production. The workaround was to use job parameters in the jobs and not environment variables. The sequences then contained the environment variables and passed them to the jobs to replace the job parameters.
Hope this helps.
John
Hope this helps.
John
wellison - I didn't ask that the job gets changed permanently, just make a copy and change the datatype to see if this is the root cause of your problems.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 457
- Joined: Tue Sep 25, 2007 4:05 pm
Since you define environment variables on a project level, use #$PROJDEF#. We are using that in our shop for a lot of projects and it works like a charm!wellison wrote:I am using the following variables:
#$HRDMPassword#
#$HRDMUser#
#$HRDMPROD#
The error message i am getting is:
testedwdev..DB2_UDB_API_0: [IBM][CLI Driver] SQL30082N Attempt to establish connection failed with security reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
Unable to connect to DB2 server 'edwdev'.
The pulled variables from the environemnt:
HRDMPROD=edwdev
HRDMPassword=HD:D1:V1M9C?07FIM;JL@K1EBEMM5@Q4A
HRDMUser=hritmvr
Note: the hashed password is the exact hashed password that I get from the hardcoded run of this job. So I know that the password is the same for both the env and the hardcode.
Vivek Gadwal
Experience is what you get when you didn't get what you wanted
Experience is what you get when you didn't get what you wanted
-
- Premium Member
- Posts: 28
- Joined: Tue Jul 01, 2008 9:23 am
Work around.
Use flat file to store this information ( User name , password) and write a simple job to read the flat file and populate the variables .
Thess variables can be used in entire session. So we can execute the primary job thru sequencer .
Rgds,
Chakra
Thess variables can be used in entire session. So we can execute the primary job thru sequencer .
Rgds,
Chakra