Re:locking a table for updates but not for selects
Thanks for reply,
I'm building replication from SQL Server to Sybase. For that need to
transfer all the data from SQL Server to Sybase and then mark the tables on
MS SQL side for replication. However, when I do bcp out and before I mark
the tables for replication, I'd like to temporarily block all inserts
and updates to the table. I tried to do
BEGIN TRAN
SELECT count(*) FROM TableName WITH (TABLOCK)
Run BCP OUT
Run BCP IN
COMMIT
But that lock did not work and data was still update while the bcp was
running.
"Oliver Townshend" <oliveratzipdotcomdotau>writes
Quote
>How can I lock a table for updates and not for selects?
It would be helpful if you told us what database you were using.
Oliver Townshend