Microsoft KB Archive/62860

= INF: Conditions When Stored Procedures Are Recompiled by SQL =

Article ID: 62860

Article Last Modified on 11/14/2003

-

APPLIES TO


 * Microsoft SQL Server 4.21a Standard Edition
 * Microsoft SQL Server 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q62860



SUMMARY
The following list contains the various conditions under which SQL Server will recompile a stored procedure:
 * An index is dropped on the referenced table.
 * The table is dropped and re-created.
 * A rule or default is added to the table.
 * The procedure is dropped and re-created.
 * All copies of the execution plan in the cache are currently in use.
 * The procedure executed was created using the WITH RECOMPILE option.
 * The procedure was executed with the WITH RECOMPILE option.
 * The requested procedure is no longer in the cache.



MORE INFORMATION
SQLServer 7.0 comes with several new reasons for causing a stored procedure to recompile. For additional information on stored procedure recompilation with SQLServer 7.0, click the article number below to view the article in the Microsoft Knowledge Base:

243586 INF: Troubleshooting Stored Procedure Recompilation

Keywords: kbinfo kbprogramming KB62860

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.