TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P136

Microsoft SQL Server 2008 R2 Unleashed- P136: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 | 1294 CHAPTER 35 Understanding Query Optimization sp_control_plan_guide N DROP1 N PlanGuidel1 To execute sp_control_plan_guide on a plan guide of type OBJECT for example a plan guide created for a stored procedure you must have at least ALTER permission on the object that is referenced by the plan guide. For all other plan guides you must have at least ALTER DATABASE permission. Attempting to drop or alter a function or stored procedure that is referenced by a plan guide results in an error. In SQL Server 2008 it is possible to define multiple plan guides for the same query. However only one plan guide can be active at a time. You can use sp_control_plan_guide to enable and disable plan guides. Validating Plan Guides The new system function can be used to validate a plan guide. Plan guides can become invalid after changes such as dropping an index are made to the physical design of the database. By validating a plan guide you can determine whether the plan guide can be used unmodified by the query optimizer. The function returns the first error message encountered when the plan guide is applied to its query. If the plan guide is valid an empty rowset is returned. The Catalog View All plan guides are stored in the database system catalog view. You can get information about the plan guides defined in a database by running a query against the catalog view as in the following example select name is_disabled scope_type_desc scope_object_id parameters hints query_text from Table describes the columns in the catalog view. TABLE guides Columns Column Name Description plan_guide_id Unique identifier of the plan guide. Name Name of the plan guide. create_date Date and time the plan guide was created. modify_date Date the plan guide was last modified. is_disabled 1 disabled and 0 enabled. query_text Text of the query on which

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.