Hướng dẫn học Microsoft SQL Server 2008 part 76

Rolling lại một giao dịch SQL Server địa phương lồng nhau cuộn lại tất cả các giao dịch chờ. Tuy nhiên, DTC sử dụng các giao dịch thực sự lồng nhau, và lăn trở lại giao dịch DTC sẽ chỉ quay trở lại giao dịch hiện hành (điều này là khác nhau từ một giao dịch địa phương bình thường, mà cuộn lại mọi cấp độ giao dịch chờ). | PartV Data Connectivity Server Msg 8501 Level 16 State 3 Line 7 MSDTC on server SQL2008RC0 is unavailable. The following example demonstrates a distributed transaction between the local SQL Server and the second instance USE Family SET xact_abort on BEGIN DISTRIBUTED TRANSACTION UPDATE Person SET LastName Johnson2 WHERE PersonlD 10 UPDATE Noli SQL2 . SET LastName Johnson2 WHERE PersonlD 10 COMMIT TRANSACTION FIGURE 31-6 Component Services includes a list of current DTC transactions. 712 Executing Distributed Queries 31 Rolling back a nested SQL Server local transaction rolls back all pending transactions. However DTC uses true nested transactions and rolling back a DTC transaction will roll back only the current transaction this is different from a normal local transaction which rolls back every pending transaction level . Monitoring distributed transactions As a separate service Distributed Transaction Coordinator activity can be viewed from within the Windows operating system by selecting Control Panel O Administrative Tools O Component Services. Component Services provides both a list of current pending distributed transactions see Figure 31-6 and an overview of DTC statistics see Figure 31-7 . FIGURE 31-7 The current and accumulated count of distributed transactions as viewed in Component Services. The statistics begin at 0 when DTC is restarted. If a distributed transaction is having difficulty it will likely be aborted. However if the transaction is marked In Doubt forcibly committing aborting or forgetting the transaction using the context menu in Component Services may resolve the transaction. 713 PartV Data Connectivity Summary Enterprise data tends to involve multiple platforms and locations. SQL Server s ability to leverage OLE DB and ODBC to perform distributed queries is a key factor in the success of many database projects and knowing how to build distributed queries well is a necessary .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
14    77    2    13-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.