Source Table Schema on a different server

VS29 246 Reputation points

Hi All,

can someone please suggest how I can get the schema of a source table along with constraints while I only have access to source table using linked server only.

thanks in advance..

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,096 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 72,341 Reputation points MVP

    Here is another option:

    EXEC LinkedServer.db.sys.sp_help 'dbo.MyTable'
    1 person found this answer helpful.
    No comments

  2. Guoxiong 8,056 Reputation points
    SELECT SCHEMA_NAME(schema_id) AS Schema_Name, name AS Table_Name