VIEW_METADATA option

  • Hey everyone. I was hoping that someone can clear something up for me on the VIEW_METADATA option, and what exactly it affects. I have been playing around with this and based on a few queries I've done on the metadata for my view (selecting from sys.view, information_schema.view, information_schema.tables, etc) I have not been able to find a difference in the results for my view with an without the VIEW_METADATA option. I am hoping to understand this a little better but keep running into a wall, so to speak. Any help is appreciated!

  • Rizk.Christopher (2/14/2015)


    Hey everyone. I was hoping that someone can clear something up for me on the VIEW_METADATA option, and what exactly it affects. I have been playing around with this and based on a few queries I've done on the metadata for my view (selecting from sys.view, information_schema.view, information_schema.tables, etc) I have not been able to find a difference in the results for my view with an without the VIEW_METADATA option. I am hoping to understand this a little better but keep running into a wall, so to speak. Any help is appreciated!

    My understanding is it only affects the information passed to 3rd party systems (via ODBC or OLE DB for example).

    By default, if you had a view queried via one of them, metadata would be transferred giving the source table name of every column in the view.

    If you want to hide that information and/or make the view appear as if a table to the accessing program, you would use this setting, and the metadata would treat each column as if the view itself were its source.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply