views:

24

answers:

2

I have a stored procedure that basically calls 7 or 8 other stored procedures. I'd like know if recompiling the outer stored procedure will cause the 7 or 8 to also be recompiled?

A: 

Are you talking about SQL Server or another DB?

pj
sql server 2005 - hence the tag
Phil
+2  A: 

No.

Optimizing SQL Server Stored Procedures to Avoid Recompiles

Stored procedures will normally recompile before execution for a number of reasons, including: dropping and recreating the stored procedure, using the WITH RECOMPILE clause in the CREATE PROCEDURE or the EXECUTE statement, changing the schema of any referenced objects, running the sp_recompile system stored procedure against a table referenced by the stored procedure, restoring the database containing the stored procedure or any object referenced by the stored procedure, or the stored procedures plan dropping from the cache.

About the only automatic way a stored procedure will be recompiled is by adding the WITH RECOMPILE

here are other ways to recompile a stored procedure

KM
sorry, can't vote you up right now because my work has blocked my openid.
Phil