1
2 /*
3 ** Generated by spgenmsgs.pl on Tue Dec 19 13:41:30 2006
4 */
5 /*
6 ** raiserror Messages for flush_query_tuning [Total 0]
7 */
8 /*
9 ** sp_getmessage Messages for flush_query_tuning [Total 0]
10 */
11 /*
12 ** End spgenmsgs.pl output.
13 */
14
15 /*
16 ** sp_flush_query_tuning
17 **
18 ** Dump query_tuning metrics in memory to system catalog
19 ** Requires Galaxy or later
20 **
21 */
22
23 create procedure sp_flush_query_tuning
24 as
25
26 if @@trancount = 0
27 begin
28 set chained off
29 end
30
31 set transaction isolation level 1
32
33 dbcc traceon(3604)
34 dbcc flushmetrics
35 dbcc traceoff(3604)
36
37 return (0)
38
exec sp_procxmode 'sp_flush_query_tuning', 'AnyMode'
go
Grant Execute on sp_flush_query_tuning to public
go