DECLARE @PlanHandle VARBINARY(64);
SELECT @PlanHandle = deps.plan_handle
FROM sys.dm_exec_procedure_stats AS deps
WHERE deps.object_id = OBJECT_ID(‘__NOME__STORED__’) AND deps.database_id = DB_ID();
select @PlanHandle
IF @PlanHandle IS NOT NULL
BEGIN
DBCC FREEPROCCACHE(@PlanHandle);
END
GO
EXEC sp_recompile N’__NOME__STORED__’;