Recompile All SQL Server Stored Procedures with this Script
May 15, 2018

Whenever updating statistics, introducing new indexes or removing old indexes, the following script offers a quick and simple way to flag any stored procedures in your tables to recompile again on next load;
-- Recompile all Stored Procedures and Triggers on a Database USE AdventureWorks; GO EXEC sp_MSforeachtable @command1="EXEC sp_recompile '?'"; GO