This script permit executes the sp_updatestats in all databases at same time.
First I create the stored procedure above in an admin database, for sample I create one database with ADMIN name where I put all administration objects create for me. You can create this sp in exist db, if you want.
Now you can execute this sp in Query Analyzer or create a job to automate this operation. To execute this, call the next commands:
use ADMIN --or the name of database where you create this sp
exec SPUpdateStats
Good work
Harnessing SQL Server Metadata- Disabling and Rebuilding Indexes
When doing bulk data changes it may be beneficial to disable indexes prior to starting the operation. Fortunately, SQL's rich metadata makes this very easy to automate in a robust fashion.
2018-05-18 (first published: 2015-10-19)
4,855 reads