Stored procedures and triggers are automatically recompiled if SQL replication settings have changed from “off” to “on” between two successive executions of the stored procedure or trigger.
SQL Statement Replication Setting at Compile Time
SQL Statement Replication Setting at Runtime
Automatically Recompile Stored Procedure/Trigger?
Off
On
Yes
No