Xendesktop manual database upgrade failing with error: StartUpdate: Update requires all services to be stopped.

Xendesktop manual database upgrade failing with error: StartUpdate: Update requires all services to be stopped.

book

Article ID: CTX232174

calendar_today

Updated On:

Description

When performing the manual database upgrade using the scripts generated from Citrix Studio you may receive an error in the SQL Management studio for one or more of the CItrix Services

Updating Host schema in [XenDesktop] from version 6.0.0.0 to 7.6.3.0
Msg 50000, Level 18, State 1, Procedure StartUpdate, Line 63
StartUpdate: Update requires all services to be stopped.
** An error was encountered during execution of batch. Exiting.

Resolution

This is happening when services are set as “Running” in all the service tables. You can verify this by manually checking the failing database table.

For example: if the script fails on the Monitor schema check the following table.

Monitor.services

In the table you will see a column for "CurrentStatus", if this is set to anything other than 0 then the database thinks it is still "Running". Update the services using the following SQL commands:

UPDATE ADIdentitySchema.Services Set Currentstate = 0
UPDATE Analytics.Services Set Currentstate = 0
UPDATE AppLibrarySchema.Services Set Currentstate = 0
UPDATE HostingUnitServiceSchema.Services Set Currentstate = 0
UPDATE DesktopUpdateManagerSchema.Services Set Currentstate = 0
UPDATE Monitor.Services Set Currentstate = 0
UPDATE StorefrontSchema.Services Set Currentstate = 0
UPDATE EnvTestServiceSchema.Services Set Currentstate = 0
UPDATE ConfigurationSchema.Services Set Currentstate = 0
UPDATE ConfigLoggingSiteSchema.Services Set Currentstate = 0
UPDATE OrchestrationSchema.Services Set Currentstate = 0
UPDATE StorefrontSchema.Services Set Currentstate = 0
UPDATE TrustSchema.Services Set Currentstate = 0
UPDATE DAS.Services Set Currentstate = 0

Now run the UpgradeSiteDatabase script again.
Note: Remember to ensure SQLCMD mode is set.

Problem Cause

This is happening when services are set as “Running” in all the service tables.