trimble-oss / dba-dash

DBA Dash - SQL Server Monitoring Tool
MIT License
252 stars 58 forks source link

OS Errors for AWS EC2 #952

Closed aachaemenes closed 1 week ago

aachaemenes commented 1 month ago

Getting this error

Microsoft.Data.SqlClient.SqlException (0x80131904): Operand type clash: datetime2 is incompatible with int The data for table-valued parameter "@OSInfo" doesn't conform to the table type of the parameter. SQL Server error is: 200, state: 7 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.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, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method) at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DBADash.DBImporter.Update(String tableName) in D:\a\dba-dash\dba-dash\DBADash\DBImporter.cs:line 513 at DBADash.DBImporter.<>c__DisplayClass17_0.<TryUpdate>b__0(Context context) in D:\a\dba-dash\dba-dash\DBADash\DBImporter.cs:line 463 at Polly.Policy.<>c__DisplayClass138_0.<Implementation>b__0(Context ctx, CancellationToken token) at Polly.Retry.RetryEngine.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Action4 onRetry, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider) at Polly.Retry.RetryPolicy.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken) at Polly.Policy.Implementation(Action2 action, Context context, CancellationToken cancellationToken) at Polly.Policy.Execute(Action2 action, Context context, CancellationToken cancellationToken) at Polly.Policy.Execute(Action1 action, Context context) at DBADash.DBImporter.TryUpdate(String tableName, List`1& exceptions) in D:\a\dba-dash\dba-dash\DBADash\DBImporter.cs:line 462 ClientConnectionId:fb440ac4-3ae9-48bc-8db7-358f65e4ea0d Error Number:206,State:2,Class:16

DavidWiseman commented 1 month ago

This seems odd. What version of DBA Dash are you using?

aachaemenes commented 1 month ago

Latest version.

On Wed, Jul 24, 2024, 1:38 PM David Wiseman @.***> wrote:

This seems odd. What version of DBA Dash are you using?

— Reply to this email directly, view it on GitHub https://github.com/trimble-oss/dba-dash/issues/952#issuecomment-2248857813, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGN5RX25S6JESOJDVT6DMCDZOAGE5AVCNFSM6AAAAABLM4YED2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYHA2TOOBRGM . You are receiving this because you authored the thread.Message ID: @.***>

DavidWiseman commented 1 month ago

Do you get this error on all your monitored instances? What SQL version is the monitored instance that is having the issue? What SQL version is the repository database?

Can you run this query on the monitored instance and post a screenshot of the results?

If you open the service configuration tool and click the "deploy/update database" button then click "deploy" it will re-apply the dacpac - ensuring your repository DB matches the expected schema.

image

Hope this helps.

aachaemenes commented 1 week ago

Deploy fixed the issue. thanks.