SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Update statistics in all database (sp_updatestats)

By Luis Antunes,

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

Total article views: 3981 | Views in the last 30 days: 12
Related Articles

ADMIN Database

The concept of admin dataase


Who is responsible for databases: DBA or Admins

System Admins want authority to backup, restore databases


Role/Rights to be granted to a Login, to create,schedule and execute a Batch Process/Job.

Apart from sys admin,which role a user should be assigned so that the database is secure and also th...


Job Execution System

ever want to allow people to execute jobs bot not be admins?


unable to create database