1

My client wants with recompile in every stored procedure as a quick fix for parameter sniffing. I advised against this, but nonetheless they want to give it a shot.

Now, the database exists of hundreds and hundreds stored procedures. My question: Can I alter a instance level setting instead of changing every stored proc (whether using macro's or not, to make my life easier)?

I repeat: yes I know I shouldn't do this. But hopefully the performance will drop further and I can make my point.

Edit: I can see some votes to close this question. However, I think it's a fair question to ask. I already stated this is not a smart move, but answers like 'trace flag 4136' are very constructive.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Michel van Engelen
  • 2,791
  • 2
  • 29
  • 45
  • It's such a bad plan that I doubt they'd spend time implementing a feature to let you do this. – Damien_The_Unbeliever Jan 27 '14 at 11:17
  • 1
    If the goal is a "quick fix for parameter sniffing" have you looked at [trace flag 4136](http://support.microsoft.com/kb/980653)? – Martin Smith Jan 27 '14 at 11:18
  • 1
    One of the close votes is mine, and it was a vote to move it to [dba](http://dba.stackexchange.com/), not an outright "this isn't a valid question", more of a "DBAs are more likely to be able to answer this than programmers, per se" – Damien_The_Unbeliever Jan 27 '14 at 13:09

0 Answers0