Bulk Insert Error

Bulk Insert Error

Post by Glenn Flexma » Sat, 25 Sep 1999 04:00:00



Has anyone come across this in their travels down the lonely DTS path?

We're importing data using BulkInsert via text datafiles and keep getting
the following errors:

If we use a UNC path i.e \\MACHINE-SQLD\share\UKDATA.dat it fails with this
error:
Could not bulk insert because file '\\MACHINE-SQLD\share\UKDATA.dat' could
not be opened. Operating system error code 5(error not found).

If we use this path:    d:\share\ukdata.dat  it fails with this error:
-2147217900 - The statement has been terminated.
Found this explanation in OLEDB Header file:  -2147217900  The command
contained one or more errors

Very informative that.

Any ideas,

...Glenn Flexman

 
 
 

Bulk Insert Error

Post by Glenn Flexma » Sat, 25 Sep 1999 04:00:00


Found out a bit more. Seems it is the UNC path that DTS doesn't like.

Has anyone successfully used a UNC path to point to a Source file for
BulkInsrt?


Quote:> Has anyone come across this in their travels down the lonely DTS path?

> We're importing data using BulkInsert via text datafiles and keep getting
> the following errors:

> If we use a UNC path i.e \\MACHINE-SQLD\share\UKDATA.dat it fails with
this
> error:
> Could not bulk insert because file '\\MACHINE-SQLD\share\UKDATA.dat' could
> not be opened. Operating system error code 5(error not found).

> If we use this path:    d:\share\ukdata.dat  it fails with this error:
> -2147217900 - The statement has been terminated.
> Found this explanation in OLEDB Header file:  -2147217900  The command
> contained one or more errors

> Very informative that.

> Any ideas,

> ...Glenn Flexman


 
 
 

Bulk Insert Error

Post by Bill » Tue, 28 Sep 1999 04:00:00


You can debug DTS's use of Bulk Insert by capturing the bulk insert
statement it creates in profiler and playing it back in Query Analyzer.

The most likely reason for the first error is that the server account
doesn't have permission to access that drive. In the second error, is the
drive a mapped drive? If so, it may not exist as a mapped drive for the SQL
Server account.


Quote:> Has anyone come across this in their travels down the lonely DTS path?

> We're importing data using BulkInsert via text datafiles and keep getting
> the following errors:

> If we use a UNC path i.e \\MACHINE-SQLD\share\UKDATA.dat it fails with
this
> error:
> Could not bulk insert because file '\\MACHINE-SQLD\share\UKDATA.dat' could
> not be opened. Operating system error code 5(error not found).

> If we use this path:    d:\share\ukdata.dat  it fails with this error:
> -2147217900 - The statement has been terminated.
> Found this explanation in OLEDB Header file:  -2147217900  The command
> contained one or more errors

> Very informative that.

> Any ideas,

> ...Glenn Flexman

 
 
 

1. Bulk insert Error code 5(Access denied)

Hi all,

Get the following error on bulk insert?

Could not bulk insert because file 'C:\temp\tmpfile.txt' could not be
opened. Operating system error code 5(Access is denied.).

This is what i try to run:
**********************************************
exec bulkinsert 'MyDatabase','MyTable','C:\temp\tmpfile.txt','|'

This is Stored Procedure:
***********************************************
CREATE Procedure BulkInsert




           AS




            WITH
         (
              ROWTERMINATOR = !\n! ,

              FIRSTROW = 2
           )'






GO

Thanks for any help
Gerry

2. MouseDown hassles in VFP5

3. BULK INSERT ERROR

4. Save option in parameter in Validate event always True

5. SQLXMLBulkLoad Bulk Insert Error

6. How to "Copy" a TQuery

7. Bulk Insert error

8. How can i import a file XLS in MDB via ADO?

9. BULK INSERT error lastrow less than firstrow

10. Bulk Insert Error

11. How to catch Bulk insert error

12. Intercepting Bulk Insert errors

13. Weird Bulk Insert error