Skip to content

[Bug]: Object Explorer displays user-defined and XML column types without key details #21855

@aasimkhan30

Description

@aasimkhan30

Description

Object Explorer can display column data types inconsistently and miss information for tables that include user-defined alias types and XML columns.

SSMS
Image

Vscode-mssql
Image

In the Azure Data Studio report this was observed on SalesLT.ProductModel, where the ADS Object Explorer display was less usable than SSMS for the same table. The likely issues were missing or incomplete type detail for alias-based types and XML columns.

Related Azure Data Studio issue:
microsoft/azuredatastudio#11834

Steps to Reproduce

  1. Connect to a SQL Server database.
  2. Run the following setup script:
CREATE DATABASE Repro11834;
GO
USE Repro11834;
GO
CREATE SCHEMA SalesLT;
GO
CREATE TYPE dbo.Name FROM NVARCHAR(50) NOT NULL;
GO
CREATE XML SCHEMA COLLECTION dbo.ProductModelXmlSchema AS N'
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="urn:ProductModel"
            xmlns="urn:ProductModel"
            elementFormDefault="qualified">
  <xsd:element name="ProductDescription">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Summary" type="xsd:string" minOccurs="0"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>';
GO
CREATE TABLE SalesLT.ProductModel
(
    ProductModelID int IDENTITY(1,1) NOT NULL PRIMARY KEY,
    Name dbo.Name NOT NULL,
    CatalogDescription xml(DOCUMENT dbo.ProductModelXmlSchema) NULL,
    Instructions xml NULL,
    ModifiedDate datetime2 NOT NULL DEFAULT sysdatetime()
);
GO
  1. In Object Explorer, navigate to Databases > Repro11834 > Tables > SalesLT.ProductModel > Columns.
  2. Inspect how Object Explorer displays the Name, CatalogDescription, and Instructions column types.

Expected Behavior

Object Explorer should display type information consistently and usefully for:

  • alias/user-defined types such as dbo.Name based on nvarchar(50)
  • typed XML columns
  • untyped XML columns

The display should make it clear what the declared type is and should not omit important information that users rely on when browsing schema metadata.

Actual Behavior

Object Explorer displays user-defined and XML column types inconsistently, making the result less usable than SSMS for the same table definition.

Affected Area

  • Object Explorer

Environment Information

  • VS Code Version:
  • MSSQL Extension Version:
  • Operating System:
  • SQL Server target/version:

Confirmation

  • I have searched existing issues and couldn't find a match

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions