Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
SQL2000User
Starting Member
13 Posts |
Posted - 2006-11-09 : 10:56:38
|
Hi, Can I use the below sql to copy one table's data from DB in one server to the table in another DB in another server? If yes, does the server name will be put in this SQL ?Insert into ...select * from Or do you have any idea to make this job done ? The table and database name and structure are the same as in two servers.Thanks for any helpFlora |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-11-09 : 11:23:45
|
Yes you can do that - you'll need to set up the other server as a linked server first. Once you have set up the linked server then you will just specify that other server in the name, like thisINSERT INTO ...SELECT ...FROM servername.datbasename.ownername.tablenameThe other alternative would be to do it in DTS. |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-09 : 11:35:58
|
Are you going to transfer data for one table only?If it's for one table only, you can add another server as linked server and then use four-part name to export data to it.Other wise use DTS or BCP or some other convenient method.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
SQL2000User
Starting Member
13 Posts |
Posted - 2006-11-09 : 13:50:37
|
Hi, Thanks a lot for your reply. Yes, it's one time table data copying. |
 |
|
mightypenny_ph
Yak Posting Veteran
54 Posts |
Posted - 2006-11-10 : 02:50:49
|
BCP is the fastest... i've used DTS and i must say it's only good if you need to manipulate your data before transferring.. speed is everything.. so i suggest you use BCP...SlayerS_`BoxeR` + [ReD]NaDa |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-11-10 : 04:13:01
|
If you are looking at BCP make sure you check the NATIVE FORMAT, that will preserve data most effectively.Kristen |
 |
|
|
|
|