Network Management
Orion Configuration Wizard failed with error Could not complete cursor operation because the table schema changed after the cursor was declared
Configuration Wizard fails and a logged error message says the failure occurred because the table schema was changed after the database cursor was declared, Configuration Wizard Error: Error while executing script - Could not complete cursor operation because the table schema changed after the cursor was declared.
First published date
Last published date
Overview
2021-08-07 02:36:17,293 [54] ERROR TaskAdapter - Error running task NPM.ConfigureDatabase NPM Database System.Data.SqlClient.SqlException (0x80131904): Could not complete cursor operation because the table schema changed after the cursor was declared. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at SolarWinds.Orion.Common.SqlHelper.ExecuteNonQuery(SqlCommand command, SqlConnection connection, SqlTransaction transaction) at SolarWinds.ConfigurationWizard.Plugin.Common.NavigationHelper.AssignMenuBarToUsers(String name, Int32 tabId, Byte defPosition) at SolarWinds.ConfigurationWizard.Plugin.Common.NavigationHelper.DefineNavigation(String name, IList`1 items, Byte defaultPosition, ConfigurationLogDelegate delegate) at SolarWinds.ConfigurationWizard.Plugin.Common.ModuleHelper.DefineModuleNavigation(String moduleName, IList`1 menuItems, Byte defPosition, ConfigurationLogDelegate log) at SolarWinds.ConfigurationWizard.Plugin.NPM.ConfigureDatabase.PopulateMenuItems() at SolarWinds.ConfigurationWizard.Plugin.NPM.ConfigureDatabase.DoSync(IConfigurationWizardTaskProgressReporter progressReporter, CancellationToken cancellationToken) at SolarWinds.ConfigurationWizard.Common.PluginTasks.PluginTaskBaseSynchronous.DoAsync(IConfigurationWizardTaskProgressReporter progressReporter, CancellationToken cancellationToken) at SolarWinds.ConfigurationWizard.Common.PluginTasks.PluginTaskBase.RunAsync(IConfigurationWizardTaskProgressReporter progressReporter, CancellationToken cancellationToken) at SolarWinds.ConfigurationWizard.Host.TaskEngine.TaskAdapter.<RunAsync>d__47.MoveNext() ClientConnectionId:e23850e2-edd8-4b06-9b6e-d690ae0cd67c Error Number:16943,State:4,Class:16 2021-08-07 02:36:17,308 [54] TRACE TaskAdapter - [NPM.ConfigureDatabase | NPM Database] Waiting for lock to set Failed state. 2021-08-07 02:36:17,308 [54] TRACE TaskAdapter - [NPM.ConfigureDatabase | NPM Database] Locked to set Failed state.
Note: The error may fail with
ERROR TaskAdapter - Error running task SPM.ConfigureDatabase SPM Configure Database System.Data.SqlClient.SqlException (0x80131904): Could not complete cursor operation because the table schema changed after the cursor was declared.OR|
ERROR DBConfigProcessor - Error while executing script - Could not complete cursor operation because the table schema changed after the cursor was declared.. Error details: System.Data.SqlClient.SqlException (0x80131904): Could not complete cursor operation because the table schema changed after the cursor was declared.
Product section
Cause
Resolution
Resolution #1:
Right-click on the Configuration Wizard > More > Run as administrator.Resolution #2:
- Disable "Parallel Config Wizard" by editing X:\Program Files (x86)\SolarWinds\Orion\ConfigurationWizard.exe.config and set "MaxParallelTasks" to 1 (0-parallel (default), 1-serial)
- Re-run Configuration Wizard.
Resolution #3:
- Close any Active Sessions on the Orion database (may need help from DBA here) via SQL Management studio. You may need help from your DBA.
- Re-run Configuration Wizard on the Main Polling Engine.