|
Posted by Erland Sommarskog on 03/06/07 22:50
Ben (benblo@gmail.com) writes:
> I can recompile SPs with sp_recompile (or DBCC FLUSHPROCINDB), and
> refresh views with sp_refreshView, but I cannot find any way to
> refresh my user-defined functions (some of them are like views, with
> parameters).
What do you really want to achieve? sp_recompile and FLUSHPROCINDB just
removes plans out the query cache. sp_refreshview on the other hand
reinterprets the definition of the view, and this is necessary if
the view definition has an * in the select list. Thus the two serve
completely different purposes.
IF the problem is that you cannot refresh your inline table functions,
the simple solution is not to use SELECT *, which is generally considered
bad practice.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|