Maintenance for a database is always very important and allows us to maintain our database at an optimal level, these maintenance operations can be issued weekly. However, we can vary this frequency according to the environment and the activity to receive each database.
Here we can see some commands that are aimed at updating statistics and checking data consistency;
Before executing the commands we must make a backup in case there is a problem.
Checking
database consistency.
- When you start the Management Studio, we generate a new query and write the following command: DBCC CHECKDB (TU_BD)Update statistics.
- Another command to use is the DBCC DBREINDEX.
Update statistics
- Updating the statistics updates the query optimizer with information about the distribution of the key values of the indexes.
Here are a few
steps to optimize your Database
source:
https://the4beatech.wordpress.com/2011/11/18/mantenimiento-recomendado-para-las-bases-de-datos-microsoft-sql-server/
No hay comentarios:
Publicar un comentario