HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

BCP stops after the last "1000 rows sent to SQL Server. Total sent: ..."

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
afterrowslastthetotalsqlsentbcpstops1000

Problem

I ran SQL Server 2005's bulk copy program BCP like this:

bcp mydb.dbo.mytbl in myfile.blk -c -S mysvr -U mylogin -P mypass


And it ran and produced output like so:

Starting copy...
1000 rows sent to SQL Server. Total sent: 1000
...
1000 rows sent to SQL Server. Total sent: 55000


But then it stopped. The cursor did not return to prompt, I haven't received the "... rows copied." message.

I tried querying the target table and I can already see the rows that I wanted to import.

Shall I terminate the console? Will it rollback?

Solution

After 3 hours, I finally got my prompt back:

55837 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total     : 10582641 Average : (5.28 rows per sec.)


Although I still don't know why it didn't return immediately since the rows were already inserted. My best guess was it did index rebuilding.

I will try terminating the console the next time it hangs up like that.

Code Snippets

55837 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total     : 10582641 Average : (5.28 rows per sec.)

Context

StackExchange Database Administrators Q#31431, answer score: 2

Revisions (0)

No revisions yet.