DB2 UDB Loading Error

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

suneelchallagali
Participant
Posts: 251
Joined: Tue Dec 02, 2008 3:09 pm

Post by suneelchallagali »

Using ODBC stage i am able to insert the data into DB2 remote database but not able to insert with db2 udb stage. do i need to set any additional environment variables
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you try removing and re-adding the stage? Impossible to tell from what you're posting. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
suneelchallagali
Participant
Posts: 251
Joined: Tue Dec 02, 2008 3:09 pm

Post by suneelchallagali »

Hey chulett i have replace the db2 udb stage with new one and run the job but i am getting same error

APT_CombinedOperatorController,0: Fatal Error: Fatal: This SQL statement did not contain the same number of parameters as columns on this link. This usually happens with user-defined SQL
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The only solution is GET IT RIGHT.

The SQL must refer to precisely the correct number of columns with correct (compatible) data types as are specified in the stage's metadata.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suneelchallagali
Participant
Posts: 251
Joined: Tue Dec 02, 2008 3:09 pm

Post by suneelchallagali »

Thank you very much for your help ray and chulett

actually when i try to run the job with auto generated sql records are loading into db2 database but when i am trying to create user define sql it is not loading. Atleast i am able to load the data. Still i am little bit confused why it is not working properly i have checked datatypes and length of the datatype for target database they all are same.

any how atleast i can load the data i am marking this issue as resolve

hopefully by soometime i will resolve the issue with user define sql
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Only you can resolve the "issue". You have created user-defined SQL that does not use the same number of columns as in your metadata.

In particular, if your SQL generates the key value (for example using a database sequence), then the key column should not appear in the metadata. The metadata (column definitions) define the number of values that will be delivered to supply values to parameter markers in the SQL.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

suneelchallagali wrote:ok chulett i wont use user define sql
suneelchallagali wrote:Hey chulett i have replace the db2 udb stage with new one and run the job but i am getting same error

APT_CombinedOperatorController,0: Fatal Error: Fatal: This SQL statement did not contain the same number of parameters as columns on this link. This usually happens with user-defined SQL
So... when this happened you were NOT using auto-generated sql as was discussed? This was from yet another user-defined attempt? :roll:
-craig

"You can never have too many knives" -- Logan Nine Fingers
suneelchallagali
Participant
Posts: 251
Joined: Tue Dec 02, 2008 3:09 pm

Post by suneelchallagali »

actually i tried with both of them user define and as well as auto generated sql but i am getting the same error as you mention then i have restart the system and created the new job and selected auto generated job. then it is working fine, after that then i check with user define sql it is not working. But for now auto generated sql is working fine.
Post Reply