Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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: 3763 | Views in the last 30 days: 14
 
Related Articles
FORUM

ADMIN Database

The concept of admin dataase

FORUM

Who is responsible for databases: DBA or Admins

System Admins want authority to backup, restore databases

FORUM

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...

ARTICLE

Job Execution System

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

FORUM

unable to create database

CREATE DATABASE failed

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones