DBCC UPDATEUSAGE

Report and correct page and row count inaccuracies in catalog views, use this after upgrading a database.

Syntax
      DBCC UPDATEUSAGE ( database 
         [, {table | view}  [,{index} ] ] )
            [WITH [ NO_INFOMSGS ] [ , ] [COUNT_ROWS ] ] 

 Key:
   database    - 'database_name' or database_id or 0 (current db)
   NO_INFOMSGS - Suppress all information messages.
   COUNT_ROWS  - Update the row count column.

The table/view and indexes may be specified by 'name' (in single quotes) or ID.

If 0 is specified, the current database will be used.

Examples

DBCC UPDATEUSAGE ('MyDatabase','MySchema.MyTable');
GO

“No matter how cynical you get, it is impossible to keep up” ~ Lily Tomlin

Related commands

sp_spaceused
sys.sysindexes
UPDATE STATISTICS
Equivalent Oracle command: DBA_TABLES - Rows in table , DBA_TAB_COL_STATISTICS - Other column stats


 
Copyright © 1999-2024 SS64.com
Some rights reserved