In this blog post, let’s learn about the error message “10502 – Cannot create plan guide ‘%.*ls’ because the statement specified by @stmt and @module_or_batch, or by @plan_handle and @statement_start_offset, matches the existing plan guide ‘%.*ls’ in the database. Drop the existing plan guide before creating the new plan guide.” in Microsoft SQL Server, the reason why it appears and the solution to fix it.
SQL Server Error Message
10502 – Cannot create plan guide ‘%.*ls’ because the statement specified by @stmt and @module_or_batch, or by @plan_handle and @statement_start_offset, matches the existing plan guide ‘%.*ls’ in the database. Drop the existing plan guide before creating the new plan guide.
Reason for the Error
To be update soon…
Solution
To be update soon…