Technical Article

sp_dba_flushprocs_inDB

,

UnDocumented DBCC command flushprocindb to flush procs in db for recompile.

Create proc sp_dba_flushprocs_inDB @dbid sysname =''
AS
Declare   @dbid2 int
if @dbid =''
Begin
Print '/*******************************************************'

Print char(13)+'Must pass a valid dbname'
Print char(13)+'usage : exec sp_dba_flushprocs pubs'
Print char(13)+'This will flush out all procs from db for recompile'
Print char(13)+'This is an undocumented DBCC USE WITH CAUTION!'
 
Print'*********************************************************/'
Return 
End
select @dbid2 = object_id(@dbid)
dbcc flushprocindb(@dbid2)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating