369
Chapter 15: Executing Distributed Queries
15
However, if the objects are not in the dbo schema, then you must use the appropriate
schema:
SELECT FirstName, LastName FROM AdventureWorks.Person.Contact
Querying on the same server is easy, but now take this up a notch and link to an external
source.
Linking to SQL Server with Management Studio
A link to another SQL Server can be established by means of SQL Server Management
Studio, or if you prefer, via code. In SSMS, linked servers are listed under the Server
Objects node in the Object Explorer window. To add a linked server, right mouse click the
Linked Server node and select New Linked Server from the context menu, which opens the
New Linked Server dialog (see Figure 15-2).
FIGURE 15-1
New Linked Server Dialog.
c15.indd 369c15.indd 369 7/30/2012 4:50:38 PM7/30/2012 4:50:38 PM
http://www.it-ebooks.info