tailieunhanh - Microsoft SQL Server 2000 Programming by Example phần 10
Howeve, SQL Server Phải lập một kết nối vào nhà và gọi điện để OPENDATASOURCE hoặc openrowset, bằng cách sử dụng chuỗi kết nối hoặc các thông số kết nối gửi Cùng với các cuộc gọi chức năng. Nếu bạn là một người sử dụng Microsoft Access, Bạn Will Be With The khái niệm quen thuộc của một bảng liên kết. | Microsoft SQL Server 2000 Programming by Example 0 UTPUT Today 2001-01-02 00 00 00 Linked Servers Any client application can establish connections to more than one server at a time but it is not possible to join directly result sets from different connections. Using the rowset functions from the last section you can execute queries that relate information coming from different data sources. However SQL Server must establish a connection on every call to OPENDATASOURCE or OPENROWSET using the connection string or connection parameters sent along with the function call. If you are a Microsoft Access user you will be familiar with the concept of a linked table. This is a permanent definition of a logical connection to an external data source. SQL Server 2000 implements links to any OLE DB data source as linked servers to any SQL Server instance. Any user connected to an instance of SQL Server can access any linked server defined in that instance without knowing the parameters to connect to this particular data source. In this way you have the flexibility of the OPENROWSET and OPENDATASOURCE functions without exposing to the users the complexity inherent to any OLE DB connection. Caution Having a SQL Server registered in Enterprise Manager does not mean that you have declared that server as a linked server. This is only a setting in a client application Enterprise Manager stored in a specific client computer perhaps the server itself and it does not have to be visible to any other client connecting to the server. Users can access objects on linked servers using fully qualified four-part names and using any data access statement. In this way you can use any kind of information exposed by the OLE DB provider as if it were a table on a database and join that information to other tables in the local server. In the following sections you will learn how to set up and use linked servers. Setting Up and Querying Linked Servers The first thing you need to set up a linked server
đang nạp các trang xem trước