Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Can't Generate Error file usign BCP

Author  Topic 

chintanpshah
Starting Member

5 Posts

Posted - 2010-03-20 : 03:04:28
I am using bcp utility to export VIEW data to text file. I am using -e err_file option to generate error file. Error file is generated but errors are not logged in to the file.

MSDN says:

-e err_file
Specifies the full path of an error file used to store any rows that the bcp utility cannot transfer from the file to the database. Error messages from the bcp command go to the workstation of the user. If this option is not used, an error file is not created.

Does this mean that error file will be generated while importing data from file to database. Not for exporting?

waiting for reply...

Chintan Shah
Software Engineer

Kristen
Test

22859 Posts

Posted - 2010-03-20 : 06:53:18
We use -e on our exports, 99.999% of the time we get a 0K (empty) file.

I'm not sure what errors would be trapped into that file, but at the very least IME you should be getting an empty file created.

(I have a faint recollection that the file must NOT pre-exist - so try pre-deleting it and see if that helps, but this may be a red herring)
Go to Top of Page

chintanpshah
Starting Member

5 Posts

Posted - 2010-03-22 : 00:25:53
I am getting overflow error which is not logged into error file. Error is shown on command prompt where I run BCP command. Any thoughts?

Chintan Shah
Software Engineer
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-03-22 : 04:03:18
Some errors are regarded as "critical" and are not recorded, but displayed to Console (and presumably abort execution?)
Go to Top of Page
   

- Advertisement -