Skip to content

Commit c91f143

Browse files
adding ISNULL check in get-properties
1 parent 5c83029 commit c91f143

1 file changed

Lines changed: 4 additions & 4 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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ set @result += (select compatibility_level, snapshot_isolation_state_desc, is_re
1515
from sys.databases
1616
where name = 'tempdb'
1717
for xml raw('tempdb'), elements);
18-
set @result += (
18+
set @result += ISNULL((
1919
select name = CONCAT('DB-CONFIG:',name), value
2020
from sys.database_scoped_configurations
21-
for xml raw, elements );
21+
for xml raw, elements ),'');
2222
declare @tf table (TraceFlag smallint, status bit,global bit, session bit)
2323
insert into @tf execute('DBCC TRACESTATUS(-1)');
24-
set @result += (
24+
set @result += ISNULL((
2525
select name=CONCAT('TF:',TraceFlag), value=status from @tf
2626
where global=1 and session=0
2727
for xml raw, elements
28-
);
28+
),'');
2929
set @result += (
3030
select name = CONCAT('CONFIG:',name), value from sys.configurations
3131
where name in ('cost threshold for parallelism','cursor threshold','fill factor (%)'

0 commit comments

Comments
 (0)