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
 Copy table in different server

Author  Topic 

Harmanik_Sethi
Starting Member

2 Posts

Posted - 2009-09-10 : 07:07:33
How to copy table from one database to another in different servers using a query

Harmanik Singh Sethi

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-09-10 : 07:13:36
Set up a linked server and then use 4 part naming conventions:

You will not get any indexes or keys doing it this way though, so something to be aware of.

select into <tablename> from <linkedserver>.<database>.<owner>.<tablename>
Go to Top of Page

Harmanik_Sethi
Starting Member

2 Posts

Posted - 2009-09-10 : 07:43:13
thanks.
how to setup a linked server..

Harmanik Singh Sethi
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-09-10 : 08:08:41
look up sp_addlinkedserver and sp_addlinkedsrvlogin in Books Online.
Go to Top of Page
   

- Advertisement -