Weird Bulk Insert error

Weird Bulk Insert error

Post by Michael J. Austi » Sat, 04 Nov 2000 10:02:16



All:

The following statement:

BULK INSERT GateTime.dbo.SecurityEvent
FROM 'J:\Share\CORBY\GateTime\EVENTS.TXT'
WITH (
-- ROWS_PER_BATCH = 2000,
-- FORMATFILE = 'J:\SHARE\CORBY\EVENTS.FMT'
-- DATAFILETYPE = 'char',
-- CODEPAGE = 'ACP',
 FIELDTERMINATOR = '^',
 ROWTERMINATOR = '\n'
 )

generates the following error:

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.
The statement has been terminated.

The source file has 26,000+ rows. Immediately preceding this statement is
another Bulk Insert statement that works on a similarly-formatted text file
containing 828 rows that works without errors.

I have tried moving the source file to a different location, renaming it,
etc.

Any help appreciated.

TIA,

Mike

 
 
 

Weird Bulk Insert error

Post by Andrew J. Kell » Sat, 04 Nov 2000 22:21:39


More than likely you have a row(s) that are not properly formatted. Maybe
missing a row terminator etc. Try chopping the file into smaller pieces to
find where the problem row is.

--
Andrew J. Kelly
Targitmail.com



Quote:> All:

> The following statement:

> BULK INSERT GateTime.dbo.SecurityEvent
> FROM 'J:\Share\CORBY\GateTime\EVENTS.TXT'
> WITH (
> -- ROWS_PER_BATCH = 2000,
> -- FORMATFILE = 'J:\SHARE\CORBY\EVENTS.FMT'
> -- DATAFILETYPE = 'char',
> -- CODEPAGE = 'ACP',
>  FIELDTERMINATOR = '^',
>  ROWTERMINATOR = '\n'
>  )

> generates the following error:

> 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.
> The statement has been terminated.

> The source file has 26,000+ rows. Immediately preceding this statement is
> another Bulk Insert statement that works on a similarly-formatted text
file
> containing 828 rows that works without errors.

> I have tried moving the source file to a different location, renaming it,
> etc.

> Any help appreciated.

> TIA,

> Mike


 
 
 

1. Error when bulk insert follows another large bulk insert

I am running a job out of MS SQL Enterprise Manager where the first step
turns off transaction logging, the 2nd step is a large bulk insert step,
and the 3rd step is another large bulk insert step.  I receive the
following error when executing the 3rd step.  Is this error occurring
because the database is still comitting data from the previous large bulk
insert at the same time as it is performing the next bulk insert?  If so,
is there a workaround?  Thank you for any help you can provide.

Error message from Step 3 (2nd bulk insert):
Backup, CHECKALLOC, bulk copy, SELECT INTO, and file manipulation
(such as CREATE FILE) operations on a database must be serialized.
Reissue the statement after the current backup, CHECKALLOC, or
file manipulation operation is completed. [SQLSTATE 42000] (Error 3023)  
The statement has been terminated. [SQLSTATE 01000] (Error 3621).  
The step failed.

--
Posted via CNET Help.com
http://www.help.com/

2. TNS Listener question...

3. Bulk Insert / Bulk copy

4. IngresII/Oracle running on same system

5. BULK INSERT or BULK COPY

6. Oracle e-Bussiness-Suite 11i, OFA and Discoverer community

7. Bulk Delete (as opposed to Bulk Insert)

8. pgsql/src/backend postmaster/postmaster.c tcop ...

9. BULK INSERT under bulk copy?

10. DTS Error (BULK INSERT)

11. Bulk Insert Error with SQL 2000

12. Bulk Insert Error

13. Bulk inserts failing with errors 4866, and 7399 - Using format files