Pere Miquel Brull 34fbe5d64c
Docs - Prepare 1.7 docs and 1.8 snapshot (#20882)
* DOCS - Prepare 1.7 Release and 1.8 SNAPSHOT

* DOCS - Prepare 1.7 Release and 1.8 SNAPSHOT
2025-04-18 12:12:17 +05:30

1.4 KiB

Reverse Metadata

Description Management

MSSQL supports description updates at the following levels:

  • Schema level
  • Table level
  • Column level

Owner Management

MSSQL supports owner management at the following levels:

  • Database level
  • Schema level

Tag Management

Tag management is not supported for MSSQL.

Custom SQL Template

MSSQL supports custom SQL templates for metadata changes. The template is interpreted using python f-strings.

Here are examples of custom SQL queries for metadata changes:

-- Update schema description
IF NOT EXISTS (SELECT 1 
               FROM {database}.sys.extended_properties 
               WHERE name = N'MS_Description' And
               major_id = SCHEMA_ID('{schema}') AND 
               minor_id = 0
     		)
BEGIN
    EXEC {database}.{schema}.sp_addextendedproperty 
     @name = N'MS_Description', 
     @value = N{description}, 
     @level0type = N'SCHEMA', 
     @level0name = N'{schema}'
END
ELSE
BEGIN
    EXEC {database}.{schema}.sp_updateextendedproperty 
     @name = N'MS_Description', 
     @value = N{description}, 
     @level0type = N'SCHEMA', 
     @level0name = N'{schema}'
END;

The list of variables for custom SQL can be found here.

For more details about reverse metadata ingestion, visit our Reverse Metadata Documentation.