dbTalk Databases Forums  

urgetn help please: auto shrink blocking bcp in process

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss urgetn help please: auto shrink blocking bcp in process in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JJ Wang
 
Posts: n/a

Default urgetn help please: auto shrink blocking bcp in process - 11-14-2003 , 01:36 AM






Hi,

I bcp in a table over 300 million rows, it's almost done,
but the auto-shrink process kicked off by the system and
my bcp in process halted for 2 hours by now.

I don't want to lose the 4 hours of bcpin process, how can
I kill the auto-shrink process?

my database is set to auto shrink with simple mode.

many thanks.

JJ

Reply With Quote
  #2  
Old   
Ryan Waight
 
Posts: n/a

Default Re: urgetn help please: auto shrink blocking bcp in process - 11-14-2003 , 10:09 AM






Is the BCP processed blocked ..? sp_who2 active should show you.

When you did the BCP did you specify the optional -b parameter to commit
rows in batches.

If not it could appear to have stopped as it's now commiting all 300 million
rows in one go.

--
HTH
Ryan Waight, MCDBA, MCSE

"JJ Wang" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I bcp in a table over 300 million rows, it's almost done,
but the auto-shrink process kicked off by the system and
my bcp in process halted for 2 hours by now.

I don't want to lose the 4 hours of bcpin process, how can
I kill the auto-shrink process?

my database is set to auto shrink with simple mode.

many thanks.

JJ



Reply With Quote
  #3  
Old   
Alan
 
Posts: n/a

Default urgetn help please: auto shrink blocking bcp in process - 11-14-2003 , 10:52 AM



Not exactly the answer, but a tip that may help:

The Bulk Insert command from within SQL server is WAY
faster than BCP from the command line....




Reply With Quote
  #4  
Old   
Ryan Waight
 
Posts: n/a

Default Re: urgetn help please: auto shrink blocking bcp in process - 11-17-2003 , 03:28 AM



And here's the reason why, taken from Microsoft's Rosetta White Paper.

The choice to use Transact-SQL BULK INSERT over bcp.exe or DTS was made for
performance reasons. Transact-SQL BULK INSERT executes in process with
sqlservr.exe, sharing the same memory space. Because the data files are
opened by sqlservr.exe, cross-process data copying is avoided. BCP and DTS
executables are both run out of process from sqlservr.exe and require
interprocess data marshaling in order to move data across process memory
spaces. Interprocess data marshaling is the process of converting parameters
of a method call into a stream of bytes and can add significantly to CPU
utilization. Use of BULK INSERT also saves processing time over BCP and DTS
through a more direct communication path to SQL Server. The BCP interface
(used by BCP and DTS) must convert the flat file data to ODBC, then to TDS,
and finally to OLE-DB; bulk insert can go straight to OLE-DB.


--
HTH
Ryan Waight, MCDBA, MCSE

"Alan" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Not exactly the answer, but a tip that may help:

The Bulk Insert command from within SQL server is WAY
faster than BCP from the command line....






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.