Query processor could not produce a query plan because of the hints defined in this query.
I am getting this error when running dynamic sql with the forceseek query hint.
Tagged:
Answers
Thanks for reaching out!
I have not personally encountered this issue but it does seem related to SSMS (which you may be able to raise a bug with Microsoft). Another user that had the same error along with the forceseek query hint:
https://dba.stackexchange.com/questions/222640/query-processor-could-not-produce-a-query-plan-because-of-the-hints-defined-in-t
Finally I figured out that table was a
HEAP
and the creation of aClustered Index
solved the problem.I hope this helps you out.
Kind regards,
David