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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Can I transfer data from one database to another

Author  Topic 

rdeavers
Starting Member

2 Posts

Posted - 2009-11-12 : 13:54:11
I understand that I can transfer data from one database to another using SELECT INTO. Can I do this with databases on different servers?

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-12 : 13:56:44
Yes you will need to set up a linked server however AND you must have login and db permissions on that box

IF you do

SELECT * INTO <linkedservername>.<dbname>.<owner>.<tablename>
FROM <dbname>.<owner>.<tablename>

Should do the trick



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

sql-programmers
Posting Yak Master

190 Posts

Posted - 2009-11-13 : 13:39:18
I have ran into a similar issue. If you need instructions on setting up your linked servers, you can use the article below:

[url]http://www.sql-programmers.com/SQLResources/ManagementStudio/LinkedServers.aspx[/url]

After setting up the linked servers, you can run your SELECT INTO query.

SQL Server Programmers and Consultants
http://www.sql-programmers.com/
Go to Top of Page
   

- Advertisement -