This functionality is already built in to Sql Server Management Studio 2008.
Just download the trial and only install the client tools (which shouldn't expire). Use Management Studio 2008 to connect to your 2005 database (its backwards compatible).
(Note: for SQL Server Management Studio 2008 R2, the option is called "Types of data to script" and is the last one in the General section. The choices are "data only", "schema and data", and "schema only")
Use bcp
(from the command line) to a networked file and then restore it.
e.g.
bcp "SELECT * FROM CustomerTable" queryout "c:\temp\CustomerTable.bcp"
-N -S SOURCESERVERNAME -T
bcp TargetDatabaseTable in "c:\temp\CustomerTable.bcp" -N -S TARGETSERVERNAME -T
Very quick and easy to embed within code. (I've built a database backup(restore) system around this very command.
You can check the following article to see how you can do this by using both SQL Server native tools and the third party tools: SQL Server bulk copy and bulk import and export techniques
Disclaimer: I work for ApexSQL as a Support Engineer
Hope this helps
You could always export the data from the Customers table to an Excel file and import that data into your Customers table.
To import/export data:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With