March 10, 2004 at 2:34 pm
March 10, 2004 at 3:26 pm
March 10, 2004 at 3:32 pm
All objects? DBCC FREEPROCCACHE
--Jonathan
March 10, 2004 at 3:44 pm
Thank u very much Jonathan.
Thats what i am looking for
March 10, 2004 at 4:00 pm
Hi Jonathan
It does not work with views,does it?
March 10, 2004 at 4:31 pm
No, but you could try something like this:
DECLARE @v-2 nvarchar(258)
DECLARE ViewCur CURSOR FOR
SELECT QUOTENAME(Table_Schema + '.' + Table_Name)
FROM INFORMATION_SCHEMA.VIEWS
OPEN ViewCur
FETCH NEXT FROM ViewCur INTO @v-2
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC('EXEC sp_refreshview ' + @v-2)
FETCH NEXT FROM ViewCur INTO @v-2
END
CLOSE ViewCur
DEALLOCATE ViewCur
--Jonathan
March 10, 2004 at 4:32 pm
Thank you very much Jonathan
March 10, 2004 at 9:08 pm
by the way
Hmm... but does that clear the on-disk compiled versions of the stored procedures as well?
March 11, 2004 at 5:03 am
There are no "on-disk compiled versions of the stored procedures."
--Jonathan
August 30, 2004 at 9:12 am
exec sp_recompile <tablename> marks dependant stored procedures and triggers for recompilation.
exec sp_refreshview <viewname> refreshes the metadata for views
Does anyone know how to recompile or refresh user defined functions?
November 2, 2006 at 8:42 am
also, since [sp_recompile] just marks a proc to be recompiled on next execution... is there any way to force recompilation immediately? aside from performing a 'meaningless edit'/ALTER statement (which means you have to script out the body of the proc in order to do so)
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply