|
Posted by Ben on 03/19/07 07:50
Thanks, I knew about the ALTER solution, the only problem is I can
only do it manually (in the manager, open each function, backspace to
alter and enable the save button, and save).
Do you know any way to do the same automatically? (refresh ALL
functions, or the ENTIRE database) (PS: I can't rebuild it, have to
keep the data)
Cheers, Ben
On Mar 6, 6:17 pm, "Marcin A. Guzowski"
<tu_wstaw_moje_i...@guzowski.info> wrote:
> Hi Ben,
>
> > Hi!
> > I need to refresh an entire database.
>
> > 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).
>
> I'm afraid that no such procedure/DBCC command exists to recompile a
> function. IMHO the best way to refresh function meta-data is to ALTER
> it. That's better solution than dropping and creating (recreating) a
> function, because when using ALTER FUNCTION permissions are retained.
>
> --
> Best regards,
> Marcin Guzowskihttp://guzowski.info
[Back to original message]
|