Link to home
Start Free TrialLog in
Avatar of parpaa
parpaa

asked on

How to mention NOLOCK during SSIS import and export wizard

Hello experts,

I wanted to copy around 20 tables from one db to another using import and expoert wizard but without locking the source tables. Is there any option inside the wizard where in i can check that option or any other alternative?
Thanks
Avatar of alainbryden
alainbryden
Flag of Canada image

Copying entire tables can't not lock the source because of race conditions that could occur. If the table contents were copied over, and a new entry was made after the copy, and then the index was copied over, where the index has a reference to the new entry which wasn't copied over, then the copied table and index is corrupt. This is the only obvious example I can readily think of as to why the source tables need to be locked for the copy.

--
Alain
You could select * Into MigrateTable1 From Table1 for each of the 20 or so tables and then use the Import/Export, or you can link the db's and do the same as above directly from one to the other.
Avatar of parpaa
parpaa

ASKER

@alain - in my case i am copying whole table so u mean to say there wouldn't be any lock. i am testing it now and so far there is no lock and it still has to transfer around 100k rows
ASKER CERTIFIED SOLUTION
Avatar of alainbryden
alainbryden
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of parpaa

ASKER

Yes it worked, sorry for the late response, been busy..
Thanks!!