home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 September
/
CHIPCD_9_99.iso
/
software
/
uaktualnienia
/
OptionPackPL
/
msmqocm.cab
/
UPDATE.SQL
< prev
next >
Wrap
Text File
|
1998-04-07
|
804b
|
59 lines
CREATE PROCEDURE msmq_update_statistics
as
declare listtables cursor
for select name from sysobjects where type = 'U' for read only
declare @name varchar(40)
open listtables
fetch next from listtables into @name
while @@fetch_status = 0
begin
EXECUTE ("UPDATE STATISTICS " + @name)
fetch next from listtables into @name
end
deallocate listtables
go
use msdb
go
EXECUTE sp_addtask @name = 'msmq_update_statistics', @databasename = 'mqis',
@enabled = 1, @freqtype = 4, @freqinterval = 1,
@activestarttimeofday = 000000, @command = 'msmq_update_statistics'
go