TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P182

Microsoft SQL Server 2008 R2 Unleashed- P182:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 1764 CHAPTER 44 Advanced Stored Procedure Programming and Optimization performance issues. In some cases for example if the result set is large and accessed repeatedly performance may improve when you use temporary tables instead because they support indexes and statistics. Using Remote Stored Procedures You can execute a stored procedure residing on another server by using a four-part naming scheme EXEC This concept is called remote stored procedures. The name implies that the procedure called on the other server is a special type of stored procedure but it is not. Any stored procedure can be called from another server as long as the remote server has been configured and the appropriate login mapping has been done. The method used to set up servers to allow Remote Procedure Calls RPCs is described in Chapter 54 Managing Linked and Remote Servers on the CD . The processing done by the remote stored procedure is by default not done in the local transaction context. If the local transaction rolls back modifications performed by the remote stored procedure are not undone. However you can get the remote stored procedures to execute within the local transaction context by using distributed transactions as in the following example BEGIN DISTRIBUTED TRANSACTION EXEC purge_old_customers --A local procedure EXEC -- a remote procedure COMMIT TRANSACTION SQL Server also automatically promotes a local transaction to a distributed transaction if the remote proc trans option is enabled and a remote stored procedure is invoked in a transaction. This option can be configured globally in SQL Server via sp_configure or it can be set explicitly at the connection level with the SET REMOTE_PROC_TRANSACTIONS command. If the remote proc trans option is enabled remote stored procedure calls in local transactions are automatically protected as part of distributed transactions without requiring you to rewrite

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.