From: Muhammad Bilal on 1 May 2010 18:01 Hi. I am using the BCP utility to import more than 10,000 files using the following command for %%f in (D:\Ixport\*) do bcp db.dbo.tbl_file in "%%f" -c -T -t\t -r\n Is there any method to log the text file name or row which have errors while importing. Regards, Muhammad Bilal
From: John Bell on 2 May 2010 06:33 On Sat, 1 May 2010 15:01:01 -0700, Muhammad Bilal <MuhammadBilal(a)discussions.microsoft.com> wrote: >bl_file in "%%f" -c -T -t\t -r\n Hi -e will log the failed rows, you could use something like: for %%f in (D:\Ixport\*) do bcp db.dbo.tbl_file in "%%f" -c -T -t\t -r\n -e%%~nf.err to separate them. John
From: DBAdan on 12 May 2010 13:51 have you tried the -e errfile option and send each to its own error file? When I try to track down errors when loading, I set max errors to 1 so that it stops on the error. I also set batch size to 1. This what in your output file you get 1 entry for each successfull bcp batch and it stops at the failure. Open the output file and count the rows of successes. in your original file the error should be at that row number after the last success. "Muhammad Bilal" wrote: > Hi. > > I am using the BCP utility to import more than 10,000 files using the > following command > > for %%f in (D:\Ixport\*) do bcp db.dbo.tbl_file in "%%f" -c -T -t\t -r\n > > Is there any method to log the text file name or row which have errors while > importing. > > Regards, > Muhammad Bilal
|
Pages: 1 Prev: Get all FKs with their table names, PK/FK fields Next: Statistics on SQL 2005 |