SQL Server Error Code – 10509 cannot create plan guide ‘%.*ls’ because

In this blog post, you’ll learn more about the SQL Server Error Code 10509 and the error message description that is shown

SQL Server Error Code

10509

SQL Server Error Description for the Code :10509

Cannot create plan guide ‘%.*ls’ because the statement specified by @stmt or @statement_start_offset either contains a syntax error or is ineligible for use in a plan guide. Provide a single valid Transact-SQL statement or a valid starting position of the statement within the batch. To obtain a valid starting position, query the ‘statement_start_offset’ column in the sys.dm_exec_query_stats dynamic management function.