repo_sys.Index_unique - V
type: V ( view ), modify_date: 2021-08-17 20:00:51
RepoObject_guid: 0890291C-9D61-EB11-84DC-A81E8446D5B0
Columns
PK | Column Name | Data Type | NULL? | ID |
---|---|---|---|---|
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
Indexes
idx_Index_unique__1
-
IndexSemanticGroup: no_group
-
[column-index_guid]; uniqueidentifier
-
-
PK, Unique, Real: 0, 0, 0
idx_Index_unique__2
-
IndexSemanticGroup: no_group
-
[column-parent_RepoObject_guid]; uniqueidentifier
-
-
PK, Unique, Real: 0, 0, 0
idx_Index_unique__3
-
IndexSemanticGroup: no_group
-
[column-parent_schema_name]; nvarchar(128)
-
[column-parent_SysObject_name]; nvarchar(128)
-
-
PK, Unique, Real: 0, 0, 0
Column Details
_
parent_SysObject_fullname
parent_SysObject_fullname |
|
|
Description
(concat('[',[SysObject_schema_name],'].[',[SysObject_name],']'))
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
sql