DB2 Connector error:EXECUTE or OPEN stat is large

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
informdaya@gmail.com
Participant
Posts: 37
Joined: Tue Nov 30, 2010 10:51 am

DB2 Connector error:EXECUTE or OPEN stat is large

Post by informdaya@gmail.com »

Hi All,
I facing a strange issue in DataStage.
My job fails due to following error

[IIS-CONN-DB2-000004] DB2 function SQLExecute failed: SQLSTATE = 22001: Native Error Code = -302: Msg = [IBM][CLI Driver][DB2/LINUXX8664] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001

This is happen during when i ran my job in main sequence[4 other jobs rans in parallel].

When i ran only the particular sequence for this job,it works fine. I talked sysdba about this thing, they said there is nothing wrong at that time.

Do you have any clue,how i can resolve this issue?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Do you have a BEFORE or AFTER SQL in that stage?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or EXECUTE or OPEN? :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Lol, been living in the SQL-Server world too long.
informdaya@gmail.com
Participant
Posts: 37
Joined: Tue Nov 30, 2010 10:51 am

Post by informdaya@gmail.com »

Dear All,
there is no after or before statement and there is no exceute statement also. Its an insert statement on a truncated table. Please note if i ran it manually only this subsequence and its work fine
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Are you performing the truncate in your stage?
informdaya@gmail.com
Participant
Posts: 37
Joined: Tue Nov 30, 2010 10:51 am

Post by informdaya@gmail.com »

Hi ArndW,

Yes . It is a staging table. I am using before job sub routine and calling a unix script to truncate table . After running the job i am facing this issue. I am following same rule other 30 tables and it is working fine. Same unix script is used for all other jobs. If i run it manully it is working fine but if i schedule it iam getting this error DB2 function SQLExecute failed: SQLSTATE = 22001: Native Error Code = -302: Msg = [IBM][CLI Driver][DB2/LINUXX8664] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001.. Please help.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you turn on OSH_ECHO, OSH_EXPLAIN and OSH_DUMP, I believe that one of them will echo the actual SQL command sent to the connector and looking at that might shed more light on the issue.
informdaya@gmail.com
Participant
Posts: 37
Joined: Tue Nov 30, 2010 10:51 am

Post by informdaya@gmail.com »

The surprising fact of that particular subsequencer is if you run it manually,it works fine,
but you schedule it only that sub sequencer it fails also.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It you haven't done so already, you really should involve your official support provider.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chandra.shekhar@tcs.com
Premium Member
Premium Member
Posts: 353
Joined: Mon Jan 17, 2011 5:03 am
Location: Mumbai, India

Post by chandra.shekhar@tcs.com »

This error normally occurs when you try to store a value in a column whose datatype is lesser than the original value.
Also whenever your data contains junk value and if its length is greater than the column datatype, you will get the above said error.
The only solution for this sort of error is to increase the column datatype size.
This type of error normally occurs is String fields, specifically in columns with descriptive value like NAME, ADDRESS, LOCATION, DESCRIPT etc.

You might have a column where you store descriptive data.
First you have to identify the column then ask your DBA to increase the datatype length, then modify the job accordingly and rerun.

Kindly check the below link
http://pic.dhe.ibm.com/infocenter/dzich ... 2Fn302.htm
Thanx and Regards,
ETL User
informdaya@gmail.com
Participant
Posts: 37
Joined: Tue Nov 30, 2010 10:51 am

Post by informdaya@gmail.com »

Hi Chandra,
I also thinked that way only.
Now the only question remaining if i run this jon manually,it works fine.
If i scheduled it,then only it fails. I tried with different DB2 stages,but no improvement.
Post Reply