Page 1 of 1

DB2 EE Stage ERROR While Deleting Data

Posted: Fri Sep 16, 2005 2:13 am
by daniel0623
Hello guys,
While Deleting Data by DB2 EE Stage,Error as follows:
DB2_UDB_Enterprise_1: Unable to convert the adapter spec ostrstream object with a value of `' to ustring.
DB2 is remote DB.It's normal while insert,update,select.If any one ever resovled similar problem, please help me.

Thanks

Posted: Fri Sep 16, 2005 2:33 am
by ArndW
Daniel,

I recall having had a similar problem sometime in the past; it had to do with the way that the custom SQL was interpreted - so my question would be whether or not you are using your own SQL in the stage or using generated code? If it is custom, could you perhaps post it?

Posted: Fri Sep 16, 2005 2:54 am
by daniel0623
Hello ArndW,
User-defined SQL as follows, it is very easy:
DELETE FROM testtb WHERE (Col1='aaaaaaaaaa')

Re: DB2 EE Stage ERROR While Deleting Data

Posted: Tue Feb 28, 2006 11:30 am
by RobinM
daniel0623 wrote:Hello guys,
While Deleting Data by DB2 EE Stage,Error as follows:
DB2_UDB_Enterprise_1: Unable to convert the adapter spec ostrstream object with a value of `' to ustring.
DB2 is remote DB.It's normal while insert,update,select.If any one ever resovled similar problem, please help me.

Thanks
I realise this was posted a while back but maybe this will help people in the future:

I was getting this same error, when I had a DB2 EE stage delete step, with a Row Generator feeding into it. The RG was generating a column called DUMMY.

The problem was that I was not using the column in my DELETE sql (user-defined).

When I changed the DELETE SQL to include
WHERE ORCHESTRATE.DUMMY = 'DUMMY'
it worked fine (obviously setting the rg to generate the column with the value of 'DUMMY')

[edit]I'm not certain that this works - the error has now gone, but the DELETE doesn't seem to be happening! I'll update this as and when I find out what's going on.[/edit]

Re: DB2 EE Stage ERROR While Deleting Data

Posted: Wed Mar 01, 2006 11:19 am
by RobinM
RobinM wrote:[edit]I'm not certain that this works - the error has now gone, but the DELETE doesn't seem to be happening! I'll update this as and when I find out what's going on.[/edit]
I've got to the bottom of this, kind of. My delete wasn't working because sometimes the Delete stage would reject the dummy input record, and so I'm guessing ORCHESTRA.DUMMY would be null (?) but certainly not 'DUMMY' which was the predicate necessary.

I've changed the job to instead have a DB2 EE stage -> peek, doing a dummy query in the SQL and the delete statement in the open command - and this works.

Posted: Thu Mar 02, 2006 7:45 pm
by daniel0623
HI RobinM,
Thanks for your suggestion.It seems that DB2 EE stage can only delete rows which are same as input data.

Posted: Mon Jun 12, 2006 1:06 pm
by kris007
I am able to resolve the problem :D .

Code: Select all

UPDATE CDW_STG.EMPLOYEE_DIM SET CDW_STG.EMPLOYEE_DIM.INSERT_UPDATE_CODE=ORCHESTRATE.INSERT_UPDATE_CODE 
WHERE CDW_STG.EMPLOYEE_DIM.INSERT_UPDATE_CODE IS NOT NULL
Since I am mapping a dummy row from a transformer I have to use it in my sql. I set the corrsponding mapping for the column INSERT_UPDATE_CODE in transformer as SetNull().
And it works fine.

Posted: Tue Jun 13, 2006 3:15 am
by RobinM
RobinM wrote:I've got cases open for both of these so I'll see what they say.
For info, this has been acknowledged as a bug and an eCase (90539) has been raised.