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
 Database Design and Application Architecture
 View / Query based on 2 Servers

Author  Topic 

rischfre
Starting Member

15 Posts

Posted - 2013-12-17 : 17:09:09
Hi

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...

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2013-12-17 : 17:17:34
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
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-12-18 : 06:36:40
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
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2013-12-24 : 13:40:16
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
   

- Advertisement -