Page 1 of 1

HowTo connect to DB2 using DB2_UDB_Enterprice?

Posted: Tue Dec 05, 2006 1:06 am
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.

Posted: Tue Dec 05, 2006 1:08 am
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.

Posted: Tue Dec 05, 2006 1:44 am
by KadetG
Yes. I type password in parameter. And I sure that password is correct.

Sorry... haw I can hardcore the values?

Posted: Tue Dec 05, 2006 5:46 am
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.

Posted: Wed Dec 06, 2006 11:45 am
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'.

Posted: Wed Dec 06, 2006 7:54 pm
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.

Posted: Wed Dec 06, 2006 7:57 pm
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.

Posted: Thu Dec 07, 2006 1:57 am
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).