Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exec sp_MSforeachdb @command1 = '
- use [?]
- print ''?''
- if ''?'' not in (''tempdb'', ''model'')
- exec sp_MSforeachtable @replacechar = ''~'', @command1 = ''
- if exists ( select * from sysobjects where type = ''''U'''' and id = object_id(''''~'''') )
- begin
- print ''''~''''
- update statistics ~ with fullscan
- end
- ''
- '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement