DBCC UPDATEUSAGE Detects and corrects errors in Page and row numbers.
Prior to SQL Server 2005, the number of rows of some of the tables and indexes could look negative. If you run the DBCC CHECKDB command it checks this, and if this is the case, it recommends using the DBCC UPDATEUSAGE command.
This control is performed for the Test database with the help of the following command.
1 2 3 4 | USE Test; GO DBCC UPDATEUSAGE ('Test'); GO |
This check is can be performed for the TestTable table in the Test database with the help of the following command.
1 2 3 4 | USE Test; GO DBCC UPDATEUSAGE ('Test',"TestTable"); GO |
This control can be performed for the IX_column1 index in the TestTable table in the Test database with the help of the following command.
1 2 3 4 | USE Test; GO DBCC UPDATEUSAGE ('Test',"TestTable",IX_column1); GO |