Skip to content

Instantly share code, notes, and snippets.

@dgosbell
Created September 13, 2020 05:16
Show Gist options
  • Save dgosbell/099c49714dc4832607f7c89eb81aac1f to your computer and use it in GitHub Desktop.
Save dgosbell/099c49714dc4832607f7c89eb81aac1f to your computer and use it in GitHub Desktop.
A DMV query that returns the CSDL metadata for the specified database
SELECT *
FROM SYSTEMRESTRICTSCHEMA ($SYSTEM.DISCOVER_CSDL_METADATA
, [CATALOG_NAME] = '<databaseid>'
, [VERSION]='2.0')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment