property.ExtendedProperty_Repo2Sys_level2_RepoObjectColumn - V

type: V ( view ), modify_date: 2022-01-05 18:06:33

RepoObject_guid: 57B33A4A-426D-EB11-84E2-A81E8446D5B0

Description

Examples

Entity Diagram

entity-property.extendedproperty_repo2sys_level2_repoobjectcolumn

Columns

Table 1. Columns of property.ExtendedProperty_Repo2Sys_level2_RepoObjectColumn - V
PK Column Name Data Type NULL? ID

1

nvarchar(6)

NOT NULL

2

nvarchar(128)

NOT NULL

3

varchar(9)

NULL

4

nvarchar(128)

NOT NULL

5

nvarchar(6)

NOT NULL

6

nvarchar(128)

NOT NULL

7

nvarchar(128)

NOT NULL

uniqueidentifier

NOT NULL

char(2)

NOT NULL

nvarchar(4000)

NULL

nvarchar(128)

NULL

uniqueidentifier

NOT NULL

Foreign Key Diagram

entity_1_1_fk-property.extendedproperty_repo2sys_level2_repoobjectcolumn

References

Object Reference Diagram - 1 1

entity_1_1_objectref-property.extendedproperty_repo2sys_level2_repoobjectcolumn

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-property.extendedproperty_repo2sys_level2_repoobjectcolumn

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-property.extendedproperty_repo2sys_level2_repoobjectcolumn

Column Reference Diagram

entity_1_1_colref-property.extendedproperty_repo2sys_level2_repoobjectcolumn

Indexes

PK_ExtendedProperty_Repo2Sys_level2_RepoObjectColumn

idx_ExtendedProperty_Repo2Sys_level2_RepoObjectColumn__2

idx_ExtendedProperty_Repo2Sys_level2_RepoObjectColumn__3

idx_ExtendedProperty_Repo2Sys_level2_RepoObjectColumn__4

idx_ExtendedProperty_Repo2Sys_level2_RepoObjectColumn__5

idx_ExtendedProperty_Repo2Sys_level2_RepoObjectColumn__6

Column Details

_

level0type

1

level0type

nvarchar(6)

NOT NULL

level0name

2

level0name

nvarchar(128)

NOT NULL

level1type

3

level1type

varchar(9)

NULL

level1name

4

level1name

nvarchar(128)

NOT NULL

Referenced Columns

level2type

5

level2type

nvarchar(6)

NOT NULL

level2name

6

level2name

nvarchar(128)

NOT NULL

property_name

7

property_name

nvarchar(128)

NOT NULL

parent_RepoObject_guid

parent_RepoObject_guid

uniqueidentifier

NOT NULL

Referenced Columns

parent_RepoObject_type

parent_RepoObject_type

char(2)

NOT NULL

Referenced Columns

property_value

property_value

nvarchar(4000)

NULL

Repo_user_type_fullname

Repo_user_type_fullname

nvarchar(128)

NULL

RepoObjectColumn_guid

RepoObjectColumn_guid

uniqueidentifier

NOT NULL

sql_modules_definition

property.ExtendedProperty_Repo2Sys_level2_RepoObjectColumn - V script
CREATE View property.ExtendedProperty_Repo2Sys_level2_RepoObjectColumn
As
Select
    prop.property_name
  , property_value         = Cast(prop.property_value As NVarchar(4000))
  , level0type             = N'Schema'
  , level0name             = ro_parent.RepoObject_schema_name
  , lev_parent.level1type
  , level1name             = ro_parent.RepoObject_name
  , level2type             = N'COLUMN'
  , level2name             = roc.RepoObjectColumn_name
  , prop.RepoObjectColumn_guid
  , roc.Repo_user_type_fullname
  , parent_RepoObject_guid = ro_parent.RepoObject_guid
  , parent_RepoObject_type = ro_parent.RepoObject_type
From
    property.RepoObjectColumnProperty      As prop
    Inner Join
        repo.RepoObjectColumn              As roc
            On
            roc.RepoObjectColumn_guid = prop.RepoObjectColumn_guid

    Inner Join
        repo.RepoObject                    As ro_parent
            On
            ro_parent.RepoObject_guid = roc.RepoObject_guid

    Inner Join
        configT.type_level1type_level2type As lev_parent
            On
            lev_parent.type           = ro_parent.RepoObject_type
Where
    roc.is_RepoObjectColumn_name_uniqueidentifier = 0
    --SchemaCompare has issues comparing extended properties for graph table columns, we need to exclude them
    And roc.Repo_graph_type Is Null