Вопрос

I have a Stored Procedure which I want to recompile. is it safe to do that in a Live environment ? Because there's continuous flow of data which is being processed by the Stored Procedure and the SQL Server 2008.

Это было полезно?

Решение

Depending upon the method used (i.e. do not drop and recreate the procedure using the WITH RECOMPILE option), this is perfectly safe to execute on the Live environment.

If using sp_recompile, the stored procedure will simply be flagged to cause a new query plan to be calculated the very next time it is executed. This may cause a very small delay whilst the new query plan is compiled but it will be negligible:

exec sp_recompile N'<your procedure>'
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top