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.
Author |
Topic |
erncelen
Starting Member
15 Posts |
Posted - 2005-07-18 : 16:30:41
|
I'm building a stored procs which export a series of tables in file *.dat using bcp and import the same with bulk insert. my question is: If the DB from which the tables are copied is a run-time DB, I mean that tables are continuolsly update,deleted and inserted, can happen that during copy a record is not copied entirely? or any other error can occur during the copy process ?There is a block table during bcp copy?Thank in advance |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-19 : 01:20:02
|
You need to specify TabLock when bulk insertFrom BOLquote: TABLOCKSpecifies that a table-level lock is acquired for the duration of the bulk copy operation. A table can be loaded concurrently by multiple clients if the table has no indexes and TABLOCK is specified. By default, locking behavior is determined by the table option table lock on bulk load. Holding a lock only for the duration of the bulk copy operation reduces lock contention on the table, significantly improving performance.
MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|