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
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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..
Here is another option:
EXEC LinkedServer.db.sys.sp_help 'dbo.MyTable'
SELECT SCHEMA_NAME(schema_id) AS Schema_Name, name AS Table_Name
FROM [LINKED_SERVER_NAME].[DATABASE_NAME].sys.tables;
Try this:
it worked, thank you @Guoxiong !!
Good to hear it helped. Could you please "Accept Answer" so that it will benefit all community members who are having this similar question? Thanks.
Hi,
I’m glad to see that your question has been resolved. In order to close this thread, please click "Accept Answer" and upvote on GuoxiongYuan-7218's answer.
By the way you can add dfc.definition to the query to view the definition of the default constraints.
Sign in to comment