views:

35

answers:

2

Does anybody know what the recommend method is to copy data from one table to another using a DTS? Should we use the standard Insert/Select statement or a DTS transformation between two connections? Which one is faster? Has anybody done every any performance test on this?

I am using SQL Server 2000 right now, but would also like to know how the performance is on SQL2005+

+1  A: 

If you ever upgrade to SQL 2005, you'll have to rewrite any DTS packages. They're deprecated in favor of SQL Server Integration Services.

So I'd go for the straight SQL, or perhaps the bcp utility.

Andomar
is straight sql faster than the dts transformation or the bcp utility?
vikasde
Rewriting can be avoided, since you can run DTS on 2005+ with the backward compaibility components
Ed Harper
I am not that much worried about rewriting - even if I have to, its not a big deal. But for now I would like to choose the fastest method.
vikasde
Yes, straight sql is faster because SSIS is separate service and requires heavy overhead
vgv8
@vikasde: Bulk copy is usually fastest. Either the `bc` command line utility, the `bulk insert` SQL statement, or the SqlBulkCopy .NET class
Andomar
A: 

I would not use DTS for this task and just use T-SQL

  1. Drop the destination table
  2. Use SELECT INTO to copy the data from server 1 to server 2
  3. Create indexes on the destination table

If the schema of the destination table is not exactly the same as the source, you can manipulate the SELECT statement to get it how you want it.

Since you're on SQL 2000, you can't take advantage of the INSERT with TABLOCK to get the bulk operation without dropping the table.

Mike Forman