How can I copy data records between two instances of an SQLServer database How can I copy data records between two instances of an SQLServer database sql-server sql-server

How can I copy data records between two instances of an SQLServer database


If your production SQL server and test SQL server can talk, you could just do in with a SQL insert statement.

first run the following on your test server:

Execute sp_addlinkedserver PRODUCTION_SERVER_NAME

Then just create the insert statement:

INSERT INTO [PRODUCTION_SERVER_NAME].DATABASE_NAME.dbo.TABLE_NAME   (Names_of_Columns_to_be_inserted)SELECT Names_of_Columns_to_be_insertedFROM TABLE_NAME


I use SQL Server Management Studio and do an Export Task by right-clicking the database and going to Task>Export. I think it works across servers as well as databases but I'm not sure.


An SSIS package would be best suited to do the transfer, it would take literally seconds to setup!