DF045: The DBCC command is used.
The topic describes the DF045 T-SQL code analysis rule.
Category
Deprecated
Message
The DBCC command is used.
Description
The DBCC commands are deprecated. Use actual alternatives instead.
The rule checks for the following commands:
- INDEXDEFRAG: Use the REBUILD option of ALTER INDEX instead.
- DBREINDEX: Rewrite the statement to use the REBUILD option of ALTER INDEX.
- CONCURRENCYVIOLATION: It no longer exists in SQL Server.
- SHOWCONTIG: Query sys.dm_db_index_physical_stats to get this information.
- OUTPUTBUFFER: It may require administrative privileges.
Noncompliant code example
DBCC DBREINDEX ('HumanResources.Employee', ' ', 70);
GO
Compliant solution
ALTER INDEX all ON HumanResources.Employee REBUILD
GO
Want to Find out More?
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?