Generated script to update statistics
2016-06-15
1,225 reads
simpledba,
2014-05-02 (first published: 2014-04-09)
Generated script to update statistics
---Objetivo: Generated script to update statistics ---Fecha:09/04/2014 ---Autor: Andrés Noé Michaca Trujillo use Database go declare @SQL nvarchar(1000) declare cursor_estadisticas cursor for select 'UPDATE STATISTICS ' + ltrim(rtrim(b.name))+'.'+ltrim(rtrim(a.name))+ ' with fullscan;' from sys.sysobjects a inner join sys.schemas b on a.uid=b.schema_id where a.xtype='U' open cursor_estadisticas fetch cursor_estadisticas into @sql WHILE @@FETCH_STATUS = 0 Begin print @SQL print 'go' fetch cursor_estadisticas into @sql end close cursor_estadisticas deallocate cursor_estadisticas
2016-06-15
1,225 reads
2016-06-10
1,341 reads
2014-01-07
1,730 reads
Generate script to drop any unwanted user created statistics.
2015-02-24 (first published: 2013-12-26)
1,498 reads
2012-10-09
2,475 reads