SA0213 : The DBCC command is deprecated
The topic describes the SA0213 analysis rule.
The DBCC command is deprecated
The rule checks T-SQL code for usages of deprecated DBCC commands.
The deprecated DBCC commands are the following:
- DBCC DBREINDEX
- DBCC INDEXDEFRAG
- DBCC SHOWCONTIG
- DBCC PINTABLE
- DBCC UNPINTABLE
The rule has a Batch scope and is applied only on the SQL script.
Rule has no parameters.
The rule does not need Analysis Context or SQL Connection.
1DBCC DBREINDEX ('HumanResources.Employee', PK_Employee_BusinessEntityID,80); 2DBCC DBREINDEX ('HumanResources.Employee', ' ', 70); 3DBCC INDEXDEFRAG (AdventureWorks2012, 'Production.Product', PK_Product_ProductID); 4 5DBCC SHOWCONTIG ('HumanResources.Employee'); 6DBCC PINTABLE ( 12 , 12 ) 7DBCC UNPINTABLE ( 12 , 33 ) 8DBCC HELP ('CHECKDB')
|1||SA0213 : The DBCC DBREINDEX command is deprecated. Use ALTER INDEX instead.||1||5|
|2||SA0213 : The DBCC DBREINDEX command is deprecated. Use ALTER INDEX instead.||2||5|
|3||SA0213 : The DBCC INDEXDEFRAG command is deprecated. Use ALTER INDEX instead.||3||5|
|4||SA0213 : The DBCC SHOWCONTIG command is deprecated. Use sys.dm_db_index_physical_stats instead.||5||5|
|5||SA0213 : The DBCC PINTABLE command is deprecated. The command has no effect and its usages should be removed.||6||5|
|6||SA0213 : The DBCC UNPINTABLE command is deprecated. The command has no effect and its usages should be removed.||7||5|
© Ubitsoft Ltd. All Rights Reserved.