Skip to content

[Bug]: Actual Execution plan for query with JSON index fails #21670

@gbritton1

Description

@gbritton1

Description

After a SQL Server query with the Actual Execution Plan option, received a result with an HTML link. Expected the extension to show the graphical plan, but instead threw this error

There is an error in XML document (1, 6441). ---> Instance validation error: 'Json' is not a valid value for IndexKindType.

Steps to Reproduce

  1. connected to database
  2. set actual execution plan on
  3. ran this query
    <SELECT COUNT(*)
    FROM dbo.Orders_Native
    WHERE JSON_CONTAINS(OrderPayload, 42, '$.customerId') = 1
    GO
  1. Query worked and returned a link to an xml execution plan
Image
  1. when I clicked on the ShowPlan XML, received an error:

There is an error in XML document (1, 6441). ---> Instance validation error: 'Json' is not a valid value for IndexKindType.

note this happened when I had an active index on a JSON attribute:

<CREATE JSON INDEX JIX_Orders_OrderPayload
ON dbo.Orders_Native (OrderPayload)
FOR ('$.customerId');
GO>

Without the index, the showplan worked and displayed a graphical plan as expected.

Affected Area

  • Connection dialog (SQL Server | Azure browse/Fabric browse)
  • Query editor
  • Query results panel
  • Object Explorer
  • GitHub Copilot integration
  • Preview/Edit data
  • Table Designer
  • Schema Designer
  • Schema Compare
  • Local SQL Server Container provisioning
  • SQL database in Fabric provisioning
  • DACPAC/BACPAC export/import
  • SQL Database projects
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the affected area

Showplan viewer

showplan.json

Environment Information

Version: 1.112.0 (user setup)
Commit: 07ff9d6178ede9a1bd12ad3399074d726ebe6e43
Date: 2026-03-17T18:09:23Z
Electron: 39.8.0
ElectronBuildId: 13470701
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Win 11

identifier
ms-mssql.mssql
Version
1.41.0
Last Updated
11 hours ago
Size
17.78MB

Edition Windows 11 Pro
Version 25H2
Installed on ‎2025-‎11-‎02
OS build 26200.8037
Experience Windows Feature Experience Pack 1000.26100.300.0

Confirmation

  • I have searched existing issues and couldn't find a match
  • I want to work on this issue

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions