trimble-oss / dba-dash

DBA Dash - SQL Server Monitoring Tool
MIT License
268 stars 62 forks source link

Error loading Azure DB tab #1088

Closed DavidWiseman closed 3 weeks ago

DavidWiseman commented 1 month ago
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Microsoft.Data.SqlClient.SqlException (0x80131904): Procedure or function 'AzureDBElasticPoolResourceStats_Get' expects parameter '@elastic_pool_name', which was not supplied.
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   at DBADashGUI.Performance.AzureDBResourceStats.GetAzurePoolResourceStats() in D:\a\dba-dash\dba-dash\DBADashGUI\Performance\AzureDBResourceStats.cs:line 242
   at DBADashGUI.Performance.AzureDBResourceStats.RefreshDataLocal() in D:\a\dba-dash\dba-dash\DBADashGUI\Performance\AzureDBResourceStats.cs:line 110
   at DBADashGUI.Performance.AzureDBResourceStats.RefreshData() in D:\a\dba-dash\dba-dash\DBADashGUI\Performance\AzureDBResourceStats.cs:line 105
   at DBADashGUI.Performance.AzureDBResourceStats.SetContext(DBADashContext _context) in D:\a\dba-dash\dba-dash\DBADashGUI\Performance\AzureDBResourceStats.cs:line 99
   at DBADashGUI.Main.LoadSelectedTab() in D:\a\dba-dash\dba-dash\DBADashGUI\Main.cs:line 364
   at DBADashGUI.Main.Tabs_SelectedIndexChanged(Object sender, EventArgs e) in D:\a\dba-dash\dba-dash\DBADashGUI\Main.cs:line 328
   at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.TabControl.WmSelChange()
   at System.Windows.Forms.TabControl.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
ClientConnectionId:ed57e59c-9bb7-4643-b49a-a01398374193
Error Number:201,State:4,Class:16

ElasticPoolName is null & it's checking if it's an empty string and deciding to run the elastic pool query instead of the DB one.

DavidWiseman commented 3 weeks ago

Fixed in 3.13 🎉