Skip to content

Commit 3a5de0d

Browse files
Collecting index information
1 parent 9a9a6b0 commit 3a5de0d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • samples/manage/azure-sql-db-managed-instance/compare-environment-settings

samples/manage/azure-sql-db-managed-instance/compare-environment-settings/get-properties.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ isnull((SELECT name = REPLACE([type], 'MEMORYCLERK_', 'MEMORY:')
6767
HAVING sum(pages_kb) /1024. /1024 > 1
6868
for xml raw, elements),'');
6969

70+
set @result +=
71+
isnull((
72+
select name = 'INDEX:'+schema_name(schema_id)+'.'+object_name(t.object_id)+'.'+ix.name,
73+
value = concat(ix.type_desc COLLATE SQL_Latin1_General_CP1_CI_AS,
74+
'/disabled:',is_disabled,'/row_locks:',allow_row_locks,'/page_locks:',allow_page_locks,'/filter:',filter_definition,'/compression_delay:',compression_delay)
75+
from sys.indexes ix
76+
join sys.tables t on t.object_id = ix.object_id
77+
where ix.type <> 0
78+
for xml raw, elements),'');
79+
7080
select cast(@result as xml);
7181

7282
end;

0 commit comments

Comments
 (0)