Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Thực hành tốt nhất hile SQL Server có thể xử lý các vấn đề kỹ thuật của các truy vấn dữ liệu bên ngoài, nếu hai hệ thống này trong thực tế, hai ứng dụng riêng biệt, sau đó trực tiếp truy cập vào một lưu trữ dữ liệu bên ngoài có thể sẽ vi phạm các nguyên tắc về việc đóng gói và ghép hai dữ liệu các cửa hàng làm giảm tính linh hoạt của kiến trúc. | PartV Data Connectivity Best Practice While SQL Server can handle the technical problems of querying external data if the two systems are in fact two separate applications then directly accessing an external data store will likely violate the principle of encapsulation and coupling the two data stores reduces the flexibility of the architecture. In many IT shops this practice would not be approved. Instead consider using a middle tier that communicates with each of the two databases. New in 2008 The syntax and feature set remain the same in SQL Server 2008 but the internal buffer space for distributed queries has been increased for improved performance. Also the transaction semantics of INSERT . . . EXECUTE against a loopback linked server have changed from not supported to supported as long as MARS is not enabled on the connection . FIGURE 31-1 A linked server is a one-way direct connection and is not dependenton Management Studio registering the servers. In this diagram SQL Server instance A sees SQL Server instance B as a linked server so A can access B s data. Management Studio SQL Server Instance A SQL Server Instance B 692 www.getcoolebook.com Executing Distributed Queries 31 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. receiving. In this chapter 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 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 .