Solved

Insert data from and to another database and server

Posted on 2009-03-29
5
500 Views
Last Modified: 2012-05-06
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
Comment
Question by:JaimeJegonia
5 Comments
 
LVL 3

Expert Comment

by:xiong8086
Comment Utility
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
 
LVL 26

Expert Comment

by:Chris Luttrell
Comment Utility
create a linked servre between the two servers.
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
Comment Utility
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
 

Author Closing Comment

by:JaimeJegonia
Comment Utility
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
 

Author Comment

by:JaimeJegonia
Comment Utility
Thanks xiong8086 and CGLuttrell for your prompt responses. But I think the best answer for my problem is from rrjegan17.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how the fundamental information of how to create a table.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now