In SQL Server, the sys.sql_expression_dependencies system catalog view "Contains one row for each by-name dependency on a user-defined entity in the current database", to quote the docs. One of the returned columns is referencing_class, of which the docs say this:

referencing_class tinyint Class of the referencing entity.

  • 1 = Object or column

  • 12 = Database DDL trigger

  • 13 = Server DDL trigger

Is not nullable.

However, I'm looking at a database right now in which there is a row with referencing_class equal to 7. What does 7 mean, and what is the correct list of possible values here?


This deficiency in the docs was raised as an issue in August 2019, with MS comment being

We've created an internal work item (1595947) to investigate and potentially update the article.

We're going to close to this item and track with our internal work item

Until such time as MS update the article (or accept a PR against the docs), here is a probably-partial list of the other possible values:

referencing_class referencing_class_desc
----------------- ----------------------
7                 INDEX
9                 STATISTICS
  • 7 = Filtered index (note that regular unfiltered indexes do not feature in this system view at all)
  • 9 = Filtered statistics

This Microsoft Support Document shows referencing_class = 7 in relation to filtered indexes.

Based on the Remarks section there are no others probably.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.