Hi,
I need to transfer data from one table to the same table in another server which has been truncated. Can somebody please, let me know the easiest way to do it. Please, help me.
Thanks, Chris
Hi,
I need to transfer data from one table to the same table in another server which has been truncated. Can somebody please, let me know the easiest way to do it. Please, help me.
Thanks, Chris
Are you simply bulk-duplicating all records, including PKs? Please post schema - it will affect which technique to use.
Use the SQL Server Import and Export wizard. It's probably the easiest way to accomplish this task.
For more advanced data transfer, consider using bcp
utility, BULK INSERT
statement and OPENDATASOURCE
.
I would use Data Transformation Services (aka Integration Services).
Setup linked servers and then use the following on the destination database:
INSERT INTO existingTable (col1,col2..)
SELECT col1,col2...
FROM linkedserver.dbo.database.othertable
Back up the table on the one server, to a file, and restore that file into the empty table on the other one...
Depending on the amount and frequency of your data transfer. It it's a low volume one time process, you're better off with using T-SQL to directly insert the data. This can be done either through linked servers or OPENQUERY clause.
If its high volume one time process, use SSIS or BCP utility.
If its high volume high frequency, use replication.