Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Maintenance Plan
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Web
Divers
Thread ID:
01461013
Message ID:
01461049
Vues:
55
>All,
>
>What is a good way to create a maintenance plan in SQL Server 2005? Basically, I want to recompile all my stored procedures on a nightly basis so that data statistics, etc. are updated so that stored procedures run with the latest information on the data.
>
>I have experienced situations where stored procedures timeout (based on 30 second timeout parameter), but when I recompile the procedure manually, the procedure then runs very fast (2 seconds).
>
>I remember years ago creating a data maintenance plan in SQL Server Enterprise Manager (SQL 2000?) that did something like this, but this is no longer available in SQL 2005.
>
>TIA
>
>Bob

Update Statistics is a good command to run on a regular basis, although daily might be overkill. Last week I lost a couple of days at work trying to figure out why inserts into one particular table on the development server hung up. Other inserts and updates in the same program, using the exact same calling pattern, worked with no problem. It turned out this table is the biggest in the system, unbeknownst to me. Our SQL Server guru suggested Update Statistics and that cleared it up. It also turned out the DBA runs it against the production database every weekend. So, two aggravating days lost but another arrow in the quiver....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform