Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is DTS a good way to initialize and copy a table?

Status
Not open for further replies.

antivirus22

Programmer
Dec 9, 2002
34
US
I have been using the DTS Import/Export wizard to copy a table ABC from our Live server to our Dev server. First i would Drop the table from our Dev server and then run the DTS, which would create the table and copy data. The problem is it is not copying over the indexs. What is the best way for me to do this?
 
Instead of selecting the default "Copy tables and views" when the wizzard asks you to specify the table copy or query, choose the "Copy objects and data".
You will have to uncheck "copy all objects" in the next window you get. If you also uncheck "use default options" then you will see that the indexes are set by default to copy (when you do it this way).
-Karl
 
Now what objects would be important to copy? What is the drop destination objects first option? Include dependant objects? Should I copy the security options or will this override the destination database's security settings?
 
Read BOL to get the details. I don't know the implications of the security option...I always uncheck it. The other questions are pretty definative. Drop the destination object means just that. If the object already exists it might have data in it. Dropping it first allows you to possibly change the schema besides preventing duplicate records from being inserted. But in some situations you may want to just append the records.
Dependent objects are the objects that will show up when you do a dependance check by right clicking on the table, stored procedure etc. and selecting "check dependances".
Again BOL is the way to go for questions about the wizzards. If you have the EM client on your desktop then BOL should be in your Start Menu.
-Karl
-Karl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top