Error while INSERT in ODBC stage

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
arul
Participant
Posts: 18
Joined: Wed May 04, 2005 9:56 pm

Error while INSERT in ODBC stage

Post by arul »

Hi,

I am getting the following error in datastage while trying to insert to a table using ODBC connector.

[IIS-CONN-ODBC-000004] ODBC function "SQLExecute" reported: 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

Has anyone come across this in DS and can you pls help. Thanks.
Arul
tayebir
Participant
Posts: 7
Joined: Wed Jul 11, 2007 2:53 pm

Re: Error while INSERT in ODBC stage

Post by tayebir »

Are you using ODBC Enterprise stage or ODBC Connector stage, Connector stage does not Open command option.


arul wrote:Hi,

I am getting the following error in datastage while trying to insert to a table using ODBC connector.

[IIS-CONN-ODBC-000004] ODBC function "SQLExecute" reported: 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

Has anyone come across this in DS and can you pls help. Thanks.
arul
Participant
Posts: 18
Joined: Wed May 04, 2005 9:56 pm

Re: Error while INSERT in ODBC stage

Post by arul »

We are using ODBC Connector stage.

The command is a INSERT command (generated by the ODBC connector stage based on the columns)


tayebir wrote:Are you using ODBC Enterprise stage or ODBC Connector stage, Connector stage does not Open command option.


arul wrote:Hi,

I am getting the following error in datastage while trying to insert to a table using ODBC connector.

[IIS-CONN-ODBC-000004] ODBC function "SQLExecute" reported: 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

Has anyone come across this in DS and can you pls help. Thanks.
Arul
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Did you try searching for error code "SQL0302N" in google. Try that. It seems like the input value is too large for a given column that you are trying to insert.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
arul
Participant
Posts: 18
Joined: Wed May 04, 2005 9:56 pm

Post by arul »

Yes DSGUru. We tried that. also, when we tried dividing the data into different ranges, it is working, but if we pass all the data, it is not working.
DSguru2B wrote:Did you try searching for error code "SQL0302N" in google. Try that. It seems like the input value is too large for a given column that you are trying to insert.
Arul
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What do you mean by different ranges? Do you mean half the rows in the first run and the rest in the second run? What happens if you use DB2 enterprise stage, do you still have the same error?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
arul
Participant
Posts: 18
Joined: Wed May 04, 2005 9:56 pm

Post by arul »

Yes, I mean running half the rows in one run and another in the second run.

We tried using ODBC EE stage, but it gives the same error... I will try with DB2 EE.
DSguru2B wrote:What do you mean by different ranges? Do you mean half the rows in the first run and the rest in the second run? What happens if you use DB2 enterprise stage, do you still have the same error?
Arul
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Thats strange, if it works in two runs it should work in a single run, provided you are not missing any rows in your split range run. Try the DB2 EE stage and keep us updated.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply