I'm working with a database that has many cross-database views. While INFORMATION_SCHEMA.VIEWS lists all these views, INFORMATION_SCHEMA.VIEW_TABLE_USAGE and INFORMATION_SCHEMA.VIEW_COLUMN_USAGE do not.
All views in question are in this format:
CREATE VIEW [dbo].[Invoice] AS SELECT * FROM [otherdb].[dbo].[Invoice]
The following query returns 0 rows:
SELECT VIEW_CATALOG ,VIEW_SCHEMA ,VIEW_NAME FROM INFORMATION_SCHEMA.VIEW_TABLE_USAGE WHERE TABLE_CATALOG <> VIEW_CATALOG
Leaving the appropriateness of SELECT * for another discussion, why are the external database references not in the INFORMATION_SCHEMA views and is there any way to get them?