Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 View / Query based on 2 Servers
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

15 Posts

Posted - 12/17/2013 :  17:09:09  Show Profile  Reply with Quote

I plan to migrate a Database from a server, to another server. The issue I see, is that there are several views which connect (INNER JOIN) a table from the database to be migrated and a database which will remain on the old server.
I never seen any view like that, is it possible? In this case how...


Almighty SQL Goddess

38200 Posts

Posted - 12/17/2013 :  17:17:34  Show Profile  Visit tkizer's Homepage  Reply with Quote
It's possible but you'll need to setup a linked server, which is going to slow down the query, possibly significantly. Both databases should be migrated if at all possible.

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 12/18/2013 :  06:36:40  Show Profile  Reply with Quote
your best bet is to migrate the table also along with data to the new server inside same db if possible so as to avoid linked server/distributed queries.

SQL Server MVP
Go to Top of Page

Aged Yak Warrior

819 Posts

Posted - 12/24/2013 :  13:40:16  Show Profile  Reply with Quote
As everyone has stated - ideally you don't want to use a linked server for this. However, if you have no choice then you would need to created the linked server (with appropriate permissions) and modify all queries that need the remote data to either use synonyms (recommended) or 4-part naming.

With synonyms, you can modify the code to use the synonym and when you migrate the other database it is simply a matter of updating the synonyms (no code changes).
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000