Bulk Insert Error

Bulk Insert Error

Post by cogg.. » Fri, 01 Dec 2000 04:00:00

We have a stored procedure that repeatedly calls (26 times) Bulk Insert
to load a datamart each day. Bulk Insert is passed a parameter for each
file that needs to be loaded. It's worked fine until recently.
It now fails at different times and not always with the same input
file, giving this message:

native [SQLSTATE 01000] (Message 0)  bulk insert stage_inssche
from '\\box3\eip\inputfiles\inssche.txt'    with (    datafiletype
= 'native',    rowterminator = '\n') [SQLSTATE 01000] (Message 0)  Bulk
insert data conversion error (truncation) for row 15883, column 28
(unique_sequence). [SQLSTATE 42000] (Error 4863)  OLE DB
provider 'STREAM' reported an error. The provider did not give any
information about the error. [SQLSTATE 42000] (Error 7399)  The
statement has been terminated. [SQLSTATE 01000] (Error 3621).  The step

There is nothing changed with the file formats that would correspond to
when the job started to fail. We're running SQL Server 7.0.

Any help gratefully received!


Sent via Deja.com http://www.deja.com/
Before you buy.


1. Bulk Insert error checking

I am trying to import perflog output files into a database and then later
analyze it.  I am using bulk insert for the import. At the 12th file I got
this error:

Importing file server_20030924.tsv
Server: Msg 4832, Level 16, State 1, Line 1
Bulk Insert: Unexpected end-of-file (EOF) encountered in data file.
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'STREAM' reported an error. The provider did not give any
information about the error.
OLE DB error trace [OLE/DB Provider 'STREAM' IRowset::GetNextRows returned
0x80004005:  The provider did not give any information about the error.].
The statement has been terminated.

Here is the the code that does the import:

''' WITH ( ' +
'   CODEPAGE = ''OEM'', ' +
'   firstrow = 1, ' +
'   DATAFILETYPE = ''char'', ' +
'   FIELDTERMINATOR = '' '', ' +
'   ROWTERMINATOR = ''\n'' , ' +
') '

This is definitely not the right error checking! How to check for successful
execution of the call?? I want to skip the file and continue with the
execution of my stored proc. Now, it breaks out.
I know there are lots of SQL monitoring tools that would do this for me, but
... no money...so I better do it myself.

Any help appreciated!

kob uki

2. Database gateway to DB2 and IDMS

3. Bulk Insert Error

4. question: MoveToRecord() use with table type ?

5. Bulk insert Error code 5(Access denied)

6. ADO

7. Weird Bulk Insert error

8. sysprocesses

9. Bulk Insert Error Trapping?

10. SQLXMLBulkLoad Bulk Insert Error

11. Unknown version of format file: BULK INSERT ERROR

12. bulk insert error...

13. Intercepting Bulk Insert errors