Search code examples
sql-server-2008-r2linked-server

Determine whether table or view on linked server


I have views in a database that are populated by connecting to (and selecting from) a linked server. Unfortunately I cannot see the objects associated with the linked server due to my permission level.

I am trying to determine if the object I am connecting to on the linked server is a table or a view.

I scripted the view out into a CREATE to statement

SELECT * FROM [linked_server].[database].[schema].[abcd]

So any way for me to tell if abcd is a table or a view?

Thank you


Solution

  • The below script provides the information, there are additional stored procedures as well for more details.

    exec sp_tables_ex [linked_server]