declare objcur cursor for select name from sys.objects where type = 'u' order by name
declare @obj sysname
open objcur
fetch next from objcur into @obj
while @@fetch_status = 0begin print @obj dbcc dbreindex( @obj )
fetch next from objcur into @obj
end
deallocate objcur
No comments:
Post a Comment