microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.5k stars 882 forks source link

An error occurred while initializing the table designer: Failed to initialize the table model. azure data studio #25092

Open Abanoub98 opened 7 months ago

Abanoub98 commented 7 months ago

Type: Bug

i cant load the table designer for all my tables in all the databases from godaddy while i tried a database on another host and it works

the details for the error are shown below:

at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.CreateTableDesigner(TableInfo tableInfo) in /_/src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs:line 1821 at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.<>cDisplayClass20_0.<b_0>d.MoveNext() in //src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs:line 106 --- End of stack trace from previous location --- at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.<>cDisplayClass19_0`1.<b_0>d.MoveNext() in //src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs:line 98

Azure Data Studio version: azuredatastudio 1.47.0 (c7c2b2f21505562d21972d4c135119d00806db4f, 2023-11-07T17:17:45.669Z) OS version: Windows_NT x64 10.0.19045 Restricted Mode: No Preview Features: Enabled Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz (8 x 3600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.86GB (6.81GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions: none
kisantia commented 6 months ago

@Abanoub98 can you please provide the script of a table that fails to load with this error so that we can try to repro?

Abanoub98 commented 6 months ago

@Abanoub98 can you please provide the script of a table that fails to load with this error so that we can try to repro?

All the tables failed to load with this error ... below is a create script for one of them as example

SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Wishlist]( [Id] [int] IDENTITY(1,1) NOT NULL, [ClientId] [int] NOT NULL, [ServiceId] [int] NOT NULL, [CreatedAt] [datetime] NOT NULL, CONSTRAINT [PK_NewTable] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[Wishlist] WITH CHECK ADD CONSTRAINT [FK_Wishlist_Clients] FOREIGN KEY([ClientId]) REFERENCES [dbo].[Clients] ([Id]) GO ALTER TABLE [dbo].[Wishlist] CHECK CONSTRAINT [FK_Wishlist_Clients] GO ALTER TABLE [dbo].[Wishlist] WITH CHECK ADD CONSTRAINT [FK_Wishlist_Services] FOREIGN KEY([ServiceId]) REFERENCES [dbo].[Services] ([Id]) GO ALTER TABLE [dbo].[Wishlist] CHECK CONSTRAINT [FK_Wishlist_Services] GO

hjoab commented 4 months ago

I have same issue here when using Azure Data Studio. Using the same connection and login I have no issues using SSMS. The DB is running in Azure SQL Server (accessed thru a gateway) that using a VPN

bam65y commented 1 month ago

I have a similar issue. I get the following error:

image

with the following details:

at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.CreateTableDesigner(TableInfo tableInfo) in /_/src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs:line 1821 at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.<>cDisplayClass20_0.<b_0>d.MoveNext() in //src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs:line 106 --- End of stack trace from previous location --- at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.<>cDisplayClass19_0`1.<b_0>d.MoveNext() in //src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs:line 92

I'm running on a Mac

Version: 1.48.0 Commit: 4970733324ef8254b7c22a5dc55af7f8a1dea93f Date: 2024-02-26T20:59:15.629Z VS Code: 1.82.0 Electron: 25.9.8 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin arm64 23.4.0