microsoft / microsoft/DacFx

SSDT error SQL71526 on stored procedure.

Open
#419 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
460
Forks
29
Avg merge
4d 9h
Merged PRs (30d)
7

Description

- SqlPackage or DacFx Version:
//////////////////////////////////////////////////////////
Microsoft Visual Studio Community 2022
Version 17.9.0
VisualStudio.17.Release/17.9.0+34607.119
Microsoft .NET Framework
Version 4.8.04161

SQL Server Data Tools 17.9.51.1
Microsoft SQL Server Data Tools
//////////////////////////////////////////////////////////

**Steps to Reproduce:**

There is a stored procedure which is working fine on SSMS.
But same stored procedure is failing with below error in SSDT ;

SQL71526: A table that has a defined column set can have up to 30,000 columns with a maximum of 1024 non-sparse and computed columns. Tables that do not have column sets are limited to 1024 columns.

![image](https://github.com/microsoft/DacFx/assets/25321786/fbbe2741-0015-49f2-a8ad-41229d6c2ffb)

The line number highlighted in the message corresponds to a CTE in this SP. (which only has 10 columns ).
If we expand the asterisk (*) in the select list of this CTE to column names , the issue disappears.

(DacFx/SSDT)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the SSDT SQL71526 diagnostic with the stored procedure and its CTE containing SELECT *. Compare the result with the version that expands the CTE's columns explicitly, using the reported SSDT 17.9.51.1 environment. Done means explaining or correcting the false diagnostic without requiring the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.