'DF_Device_adPassword' Database Error During PVS Upgrade from 2203 CU3 and CU5 to 2402 LTSR
Recently, while upgrading a customer’s PVS environment from 2203 CU3 to 2402 Long Term Service Release (LTSR), I faced a database error that halted the process. The same error was also observed when upgrading from 2203 CU5 to 2402 LTSR.
Error message:
[13:16:16.824][0001] WARNING:Upgrade command failed: ALTER TABLE [dbo].[Device] DROP CONSTRAINT DF_Device_adPassword, 'DF_Device_adPassword' is not a constraint.
Could not drop constraint. See previous errors. [CommandProcessorConfigWizard.cs(821): UpgradeDatabase]
[13:16:16:840] Error: 'DF_Device_adPassword' is not a constraint.
Could not drop constraint. See previous errors.
[13:16:16:840] Error: Source = .Net SqlClient Data Provider
[13:16:16:840] Error: StackTrace = at System.Data.SqlClient.SqlConnection.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.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
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 Mapi.CommandProcessor.UpgradeDatabase()
[13:16:16:840] Running in OnPrem environment
Solution:
Connect to your SQL Server and navigate to the dbo.Device
table.
Look for the constraint named DF__Device__adPassword_*****
.
Rename the constraint to DF_Device_adPassword.
Make sure you note the two underscores in the name. You can also copy the exact name from the logfile if needed.
After renaming the constraint, your database upgrade should work as expected.
Disclaimer:
Please rename only the DF_Device_adPassword
constraint and ensure you back up your database before making any changes. This should be part of your standard upgrade routine to avoid potential data loss or other issues
Post Views: 1,746
One Response
Awesome, Thank you!!!