repo_sys.Index_unique - V

type: V ( view ), modify_date: 2021-08-17 20:00:51

RepoObject_guid: 0890291C-9D61-EB11-84DC-A81E8446D5B0

Description

Examples

Entity Diagram

entity-repo_sys.index_unique

Columns

Table 1. Columns of repo_sys.Index_unique - V
PK Column Name Data Type NULL? ID

uniqueidentifier

NULL

int

NOT NULL

sysname

NULL

tinyint

NOT NULL

nvarchar(60)

NULL

bit

NULL

bit

NULL

bit

NULL

bit

NULL

uniqueidentifier

NULL

nvarchar(128)

NULL

nvarchar(261)

NULL

nvarchar(128)

NULL

Foreign Key Diagram

entity_1_1_fk-repo_sys.index_unique

References

Referencing Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-repo_sys.index_unique

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-repo_sys.index_unique

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-repo_sys.index_unique

Column Reference Diagram

entity_1_1_colref-repo_sys.index_unique

Indexes

idx_Index_unique__1

idx_Index_unique__2

idx_Index_unique__3

Column Details

_

index_guid

index_guid

uniqueidentifier

NULL

Referenced Columns

index_id

index_id

int

NOT NULL

index_name

index_name

sysname

NULL

index_type

index_type

tinyint

NOT NULL

index_type_desc

index_type_desc

nvarchar(60)

NULL

is_index_disabled

is_index_disabled

bit

NULL

is_index_primary_key

is_index_primary_key

bit

NULL

is_index_unique

is_index_unique

bit

NULL

is_index_unique_constraint

is_index_unique_constraint

bit

NULL

parent_RepoObject_guid

parent_RepoObject_guid

uniqueidentifier

NULL

Referenced Columns

parent_schema_name

parent_schema_name

nvarchar(128)

NULL

parent_SysObject_fullname

parent_SysObject_fullname

nvarchar(261)

NULL

Description

(concat('[',[SysObject_schema_name],'].[',[SysObject_name],']'))


parent_SysObject_name

parent_SysObject_name

nvarchar(128)

NULL

Referenced Columns

sql_modules_definition

repo_sys.Index_unique - V script
CREATE View repo_sys.Index_unique
As
--
Select
    index_guid                 = ro_index.RepoObject_guid
  , index_name                 = si.name Collate Database_Default
  , si.index_id
  , is_index_unique            = si.is_unique
  , is_index_primary_key       = si.is_primary_key
  , is_index_unique_constraint = si.is_unique_constraint
  , is_index_disabled          = si.is_disabled
  , index_type                 = si.type
  , index_type_desc            = si.type_desc
  , parent_RepoObject_guid     = ro_parent.RepoObject_guid
  , parent_schema_name         = ro_parent.SysObject_schema_name
  , parent_SysObject_name      = ro_parent.SysObject_name
  , parent_SysObject_fullname  = ro_parent.SysObject_fullname
From
    sys_dwh.indexes     As si
    Left Join
        repo.RepoObject As ro_index
            On
            ro_index.SysObject_name                 = si.name Collate Database_Default
            And ro_index.SysObject_parent_object_id = si.object_id

    Left Join
        repo.RepoObject As ro_parent
            On
            ro_parent.SysObject_id                  = si.object_id
Where
    si.is_unique = 1
    And Not ro_index.RepoObject_guid Is Null