Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

367


CHAPTER


15


Executing Distributed Queries


IN THIS CHAPTER


Understanding a Distributed Query Overview

Developing Distributing Queries

Using Distributed Transactions

Considering Performance

D


ata is everywhere. Even within the walls of a company, you never fi nd data in the same
place. As the amount of data increases within an organization, the need to access that data
using distributed methods becomes even more critical. With SQL Server, getting to and que-
rying distributed data is not a problem; SQL Server can access data from a plethora of data sources.

SQL Server provides several methods for accessing data from many different external data sources from
a source location. This chapter discusses the methods for accessing and querying distributed data.

Distributed Query Overview


Several methods exist for querying data from different distributed data sources, ranging from link-
ing servers to developing and executing distributed queries. The most common method is to use
Linked Servers, or to link to an external data source, whereas a similar practice to develop and
execute distributed queries is also common.

In this section you will look at the concept of linking to external data sources such as Microsoft
Excel and other SQL Server instances using Linked Servers.

Connecting to External Data
Connecting to external data is the fi rst step in working with distributed queries. First consider con-
necting to physical servers using linked servers to assist in your distributed query exploration.

Linking to an external data source is nothing more than confi guring the name of the linked server,
along with the necessary login information. After you supply this information, you can access data
from the linked server.

c15.indd 367c15.indd 367 7/30/2012 4:50:35 PM7/30/2012 4:50:35 PM


http://www.it-ebooks.info
Free download pdf