Could not find prepared statement with handle -1 SQL Server Profiler So I have this issue where I'm running Sql Server Profiler and I'm getting hundreds(at least) of Could not find prepared statement with handle -1.(error 8179) per second.

I can't seem to really correlate the errors with anything specific except some cached prepared statements I think.

I'm using Linq to Sql.

If you need more info just let me know.
Well I figured it out.

Log4Net's AdoAdapter was keeping a prepared statement saved through the duration of its connection, and my plan cache was flushing them out sometimes.