/* ------------------------ My Meta Content Here SEO ------------------------ */


Main Menu

Wednesday, February 19, 2014

How to Create a Linked Server


Copy table from one database to another

Create a linked server to the source server. The easiest way is to right click "Linked Servers" in Management Studio; it's under Management -> Server Objects.
Then you can copy the table using a 4-part name, server.database.schema.table:
select  *
into    DbName.dbo.NewTable
from    LinkedServer.DbName.dbo.OldTable
This will both create the new table with the same structure as the original one and copy the data over.

No comments:

Post a Comment

My Blog List