Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 511
  • Last Modified:

Insert data from and to another database and server

Hi,

Is it possible to copy/move data from a different server and database to another server and database in SQL? It's easy to copy/move data within 1 server but how can this be done in 2 different servers? Any ideas?
0
JaimeJegonia
Asked:
JaimeJegonia
1 Solution
 
xiong8086Commented:
If you want to insert data from server A to server B.
You need to add a linked server in server A, which is pointing to server B. the syntax to create linked server is here:
http://msdn.microsoft.com/en-us/library/ms190479.aspx

then you need to create linked server login. sytax is here.
http://msdn.microsoft.com/en-us/library/ms189811.aspx

then you can access server B tables in Server A through "linkedServerToServerB.DBName.dbo.tablename"

regards,
Xiong
0
 
Chris LuttrellSenior Database ArchitectCommented:
create a linked servre between the two servers.
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
The simplest way to achieve this is using the Import / Export wizard in SSMS.

http://msdn.microsoft.com/en-us/library/ms188032(SQL.90).aspx

Steps below:

1. Right click your database in SSMS.
2. Choose Import / Export Data and then place your Source and Destination tables correctly to have it done.
0
 
JaimeJegoniaAuthor Commented:
I've been ignoring this Import/Export function for years and I didn't know how useful it is until now. Thanks for introducing it to me. I think I need to explore the tools I use a little bit more. Thanks again!!
0
 
JaimeJegoniaAuthor Commented:
Thanks xiong8086 and CGLuttrell for your prompt responses. But I think the best answer for my problem is from rrjegan17.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now