Page 1 of 1

Unable to connect to DB2 on unix

Posted: Tue Sep 21, 2010 7:23 am
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.

Re: Unable to connect to DB2 on unix

Posted: Tue Sep 21, 2010 8:09 am
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?

Posted: Wed Sep 22, 2010 10:46 pm
by srinivasayedla
i updated to teh details of my database in dsenv file..but iam getting the same error.

Iam using API

Posted: Thu Sep 23, 2010 11:04 am
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.

Posted: Thu Sep 23, 2010 11:27 am
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.