SQL Server Bulk Load Error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
johndeere
Participant
Posts: 5
Joined: Fri Oct 29, 2004 7:35 pm

SQL Server Bulk Load Error

Post by johndeere »

I am getting an un specified error when I use the bulk load soure. How can I determine what the actual error is.
shawn_ramsey
Participant
Posts: 145
Joined: Fri May 02, 2003 9:59 am
Location: Seattle, Washington. USA

Re: SQL Server Bulk Load Error

Post by shawn_ramsey »

johndeere wrote:I am getting an un specified error when I use the bulk load soure. How can I determine what the actual error is.
The best way to track it down is to run the Microsoft SQL Profiler and filter it to trap the actual error. I have put a ticket into Ascential on this and the OLEDB stage not returning the actual error message a while ago but there still has not been a fix. I was told at one time the Microsoft API did not return the actual error message.
Shawn Ramsey

"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

Have a 'Reject' Sequential File stage out of the transformer stage directly before the SQL Server Bulk Loader stage. In your transformer contraints make sure 'Reject Row' is ticked for the 'Rejects' link. Define 5 columns in the rejects file and capture the Link Variables (Output) DBMSCODE, LASTERR, REJECTED, REJECTEDCODE and SQLSTATE. Ie. Derivation for the columns as follows:

Code: Select all

[RejectLinkName].DBMSCODE
View the file for the bulk load error.
Cheers,
Dave Nemirovsky
johndeere
Participant
Posts: 5
Joined: Fri Oct 29, 2004 7:35 pm

Re: SQL Server Bulk Load Error

Post by johndeere »

Thanks for the tip but the values returned do not seem to be of much help.

LASTERR = 2004-12-18 00:07:40\CILAN|LANCEH\2\AptifyPerson_Seq_file_BulkLoad..Transformer_47: At row 10, link "LinkBulkLoadPerson"?Failed to insert the row.
REJECTED = 0
REJECTEDCODE = -100
DBMSCODE blank
SQLSTATE blank

I was not able to see any activity in profiler. What events should I watch.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Well you've got a bit more. Row 10 is the culprit. Take a look at the data in row 10 of the load file, and see whether you can figure out why it can not be inserted. Perhaps a duplicate key value? Perhaps an invalidly formed date?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply