c# - SQL Server query plan cache randomly getting corrupted -
i have asp.net site running off sql server database following nightly maintenance plan:
- check database integrity
- rebuild index
- update stats
- clean history
every , wake stream of following errors (and unhappy users!)
the conversion of varchar data type datetime data type resulted in out-of-range value.
i've figured out that's it's because 1 of sp cache plans has gone skewiff, i.e. 1 of signatures no longer correct (it's trying force varchar parameter datetime). i'm using linq 2 sql (can't change that!) results in manner of weird , wonderful sp_executesql calls. way know fix step in , execute following sql after fact:
dbcc dropcleanbuffers dbcc freeproccache
any ideas can stop issue happening in first place?
Comments
Post a Comment