SQL Server 2019 deprecated feature. sys.sysindexes

Chris Tsui 1 Reputation point
2021-05-26T22:33:45.6+00:00

We are migrating from SQL Server 2016 to SQL Server 2019. We check the sysindexes.status column for values 0, 2, 2097154 and 2097152. How do we translate this to SQL Server 2019.

Also, the deprecated feature document indicates the sysindexes table deprecated but we can still access it in our test SQL Server 2019 database. Is this system table still going to be available for 2019?

Thanks

SQL Server Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cris Zhan-MSFT 6,661 Reputation points
    2021-05-27T03:01:22.027+00:00

    Hi,

    The system compatibility view sys.sysindexes is still available in SQL Server 2019. Actually the system table sys.sysindexes Has been deprecated, SQL Server provides a view with the same name as this system table to be compatible with the software that uses the system table.

    As stated in this MS official document about sys.sysindexes:

    This SQL Server 2000 system table is included as a view for backward compatibility. We recommend that you use the current SQL Server system views instead. To find the equivalent system view or views, see Mapping System Tables to System Views (Transact-SQL). This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.