HowTo connect to DB2 using DB2_UDB_Enterprice?

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
KadetG
Participant
Posts: 30
Joined: Mon Nov 06, 2006 12:43 pm

HowTo connect to DB2 using DB2_UDB_Enterprice?

Post by KadetG »

Hi All

I try to use DB2_UDB_Enterprice. And can`t connect to my database. I give client instancw name, database name, user name, password and receive error:##E TNDB 000000 13:54:10(000) <DB2_UDB_Enterprise_1,0> Error Idx = 1;
>DB2 Driver Embedded SQL message: SQL30082N Attempt to establish connection failed with security reason "3"
>("PASSWORD MISSING"). SQLSTATE=08001
sqlcode = -30082;
>sqlstate = 08001
>##E TNDB 000000 14:15:28(001) <DB2_UDB_Enterprise_1,0> Failed to connect to the database
>##E TNDB 000000 14:15:28(002) <DB2_UDB_Enterprise_1,0> Error Idx = 5;
>DB2 Driver Embedded SQL message: SQL1024N A database connection does not exist. SQLSTATE=08003
>sqlcode = -1024;
>sqlstate = 08003
I use datastage 7.5.1A and db2 8.2

I try to use DB2API stage with same username and password and it work. And I can retrive table defination from server.

What I must do to resolve my problem?

Thanx.
Alex
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Are you trying to pass the password as parameter, if so check if that been passed correctly. Try to hardcode the values and check.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
KadetG
Participant
Posts: 30
Joined: Mon Nov 06, 2006 12:43 pm

Post by KadetG »

Yes. I type password in parameter. And I sure that password is correct.

Sorry... haw I can hardcore the values?
Alex
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Post by Nageshsunkoji »

KadetG wrote:Yes. I type password in parameter. And I sure that password is correct.

Sorry... haw I can hardcore the values?
Try to Hardcore the value means, instead of paasing the value as parameter inside the DB2 EE stage, use the Hardocre value.

For Ex : If you are passing password as '#DB2_PASSWORD#' in place of password inside the DB2EE stage, just replace that parameter with like words 'Password'(Whatever may be your password) and try out for result as kumar suggested.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
hboekel
Premium Member
Premium Member
Posts: 13
Joined: Fri Aug 08, 2003 12:13 am
Location: Netherlands
Contact:

Post by hboekel »

Hi,

This is the error that shows in the job log:

DB2_UDB_Enterprise_0,0: Error Idx = 1;
DB2 Driver Embedded SQL message: SQL30082N Attempt to establish connection failed with security reason "3"
("PASSWORD MISSING"). SQLSTATE=08001
;
sqlcode = -30082;
sqlstate = 08001
Failed to connect to the database
Error Idx = 5;
DB2 Driver Embedded SQL message: SQL1024N A database connection does not exist. SQLSTATE=08003
;
sqlcode = -1024;
sqlstate = 08003
Prepare failed


I hardcoded all the connection parameters, including the password. So it is rather strange the message says the 'PASSWORD MISSING'.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is the DB2 instance on a mainframe or AS/400 machine? If so, you will need to use the DB2/UDB API stage. There is a glitch in the Enterprise stage that prevents connectivity to other platforms.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I've been on a DataStage DB2 project and if I had a dollar for every time I saw that error I would have been working at contract rates rather than a full time salary.

Get the guide book! IBM has a DB2 Enterprise Guide for DB2 PDF that you can ask for from the sales or support teams. It is important to have this if you are going to try and use the DB2 enterprise stage.

When I first get a DB2 connection working within a job I use hard coded values in all the options fields and use View Data until I can get it to connect, otherwise you can get server/instance/client/database name parameters mixed up quite easily. Once I have it working I switch the hard coded values back to job parameters.
KadetG
Participant
Posts: 30
Joined: Mon Nov 06, 2006 12:43 pm

Post by KadetG »

Hi All

I found solution :roll:

I dont set any environment variables. In this case We need define next parameters to connect:
1. Use Defualt Database = False
1.2. Database = <Your database>
2. Use default server = False
2.1. Server = <DB2 instance name for the table, overriding the setting of the DB2INSTANCE environment variable.>
3. Client Instance name = <DB2 client instance name required for remote connection.>
3.1. User = <User name>
3.2. Password = <Password>

Setting Server parameter helped for me. And user who runing datastage job should be have grand permishion to exec or select (I don`t know exactly).
Alex
Post Reply