title: The definition of object '[sp_name]' has changed since it was compiled on fail-over to mirror database
body: <p>We have two SQL 2012 database servers configured in a mirror with a witness for automatic fail-over.</p>
  
  <p>Yesterday the primary server suffered a HDD degradation which triggered the fail-over, however when the secondary server became the principle we started to see many errors on execution of some SPROCs.</p>
  
  <blockquote>
    <p>The definition of object '[sp_name]' has changed since it was compiled</p>
  </blockquote>
  
  <p>I understand that this can be resolved by running <code>sp_recompile</code> on the new principle, which would force a recompile on all SPROCs, functions and triggers. </p>
  
  <p>This is not ideal as it requires manual intervention on fail-over. Is this a problem I can resolve through amending the configuration, or is it a known SQL Server bug?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Edition and version number -</p>
  
  <blockquote>
    <p>Microsoft SQL Server 2012 - 11.0.5058.0 (X64)  Standard Edition
    (64-bit) on Windows NT 6.2  (Build 9200: )</p>
  </blockquote>