Solved

How to mention NOLOCK during SSIS import and export wizard

Posted on 2009-07-08
5
931 Views
Last Modified: 2013-11-10
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
0
Comment
Question by:parpaa
  • 2
  • 2
5 Comments
 
LVL 20

Expert Comment

by:alainbryden
ID: 24805459
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
0
 
LVL 5

Expert Comment

by:rgc6789
ID: 24805776
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.
0
 

Author Comment

by:parpaa
ID: 24806314
@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
0
 
LVL 20

Accepted Solution

by:
alainbryden earned 200 total points
ID: 24840132
Well you said you were testing, did the transfer work without locking or no? Is there any issue you're having in accomplishing some task?

--
Alain
0
 

Author Comment

by:parpaa
ID: 24859672
Yes it worked, sorry for the late response, been busy..
Thanks!!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now