|Lesson 2|| How do you access remote data? |
|Objective|| Describe how to access remote data.|
How do you access remote Data?
for accessing remote data is to use a linked server
To access remote data with a linked server, follow these steps:
- Add the linked server.
- Log in to the server using a remote login.
- Access the remote data using a query or qualified path.
Remote data access (RDA) in Microsoft SQL Server Compact 3.5 lets an application access data from a remote SQL Server database table.
It can also store, read, and update that data in SQL Server Compact 3.5, and then update the original SQL Server table.
The topics in this section provide information about using remote data access (RDA) in SQL Server Compact 3.5.
A linked server can be a SQL server or any other data source with either an OLE DB provider or ODBC drivers. Distributed queries can select data and modify it (INSERT, UPDATE, DELETE), according to the features of the OLE DB provider or ODBC driver.
SQL Server queries can reference external data by referring to the preconfigured linked server or specifying the link in the query code.
Note: In this module, I refer to the two data sources as local and external . Other descriptions of distributed queries might refer to the same two servers as local and remote, or sending and receiving.
In a sense, linking to an external data source only moves declaring the link from the query code to a server administration task.
Because queries can refer to the named link without concern for the location or security particulars of the link, queries that use linked servers are more portable and easier to maintain than queries that declare the external data source in the query code. If the database is moved
to a new server, then once the database administrator creates the appropriate links, the queries will work without modification.
In the case of a distributed query, SQL Server is the client process receiving the results from the external
data source. Distributed queries can either pull the data into SQL Server for processing or pass the query to the external data source for processing.
In the next lesson, you will learn how to add a linked server.