Unable to connect to DB2 on unix

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
srinivasayedla
Participant
Posts: 10
Joined: Thu Jan 28, 2010 1:03 am
Location: hyderabad

Unable to connect to DB2 on unix

Post by srinivasayedla »

Hi.
I am working on Datastage 7.5 and Db2.As our Server is shifted to a DR location i have installed DS client in a local machine.
While iam trying to import the metadata from db2 database into a job, iam getting an error as "unable to connect to DB2" even though the User has enough privileges to connect to database.

Please provide me a solution for this.

Thanks In advance.
sri
apierro1
Participant
Posts: 12
Joined: Thu Nov 13, 2008 8:50 am

Re: Unable to connect to DB2 on unix

Post by apierro1 »

You most likely need to update your dsenv file to point to the database.

Check out this link:

http://www.ibm.com/developerworks/data/ ... #dseestep1

Is this an API stage or EE?
Thanks,

Anthony
srinivasayedla
Participant
Posts: 10
Joined: Thu Jan 28, 2010 1:03 am
Location: hyderabad

Post by srinivasayedla »

i updated to teh details of my database in dsenv file..but iam getting the same error.

Iam using API
sri
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Make sure you have the appropriate environment variables required by DB2 inserted into the job. Also - I recommend putting an execution of your db2profile into the dsenv script (via full pathname reference) to insure that all libraries are in place.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
apierro1
Participant
Posts: 12
Joined: Thu Nov 13, 2008 8:50 am

Post by apierro1 »

DB2DIR, DB2INSTANCE and INSTHOME should be set in your dsenv

also, are you able to successfully issue a DB2 command from the user on AIX and get a db2 prompt? ex. db2 =>

Also, don't forget to stop and start the engine whenever editing the dsenv.
Thanks,

Anthony
Post Reply