Validating Plan Guides

The new system function sys.fn_validate_plan_guide can be used to validate a plan guide. Plan guides can become invalid after changes such as dropping an index are made to the database. By validating a plan guide, you can determine whether the plan guide can be used unmodified by the query optimizer. The sys.fn_validate_plan_guide 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.

Get Microsoft SQL Server 2014 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.