Bosch VMS Patch for BVMS-12.1.0.414: 454274 - Migration of configuration takes long during Upgrade to BVMS 12.1.0.414
---------------------------------------------------------------------------------------------------------------------

Patch ID: 454274
Patch Title: Migration of configuration takes long during Upgrade to BVMS 12.1.0.414
Patch Target Version: BVMS-12.1.0.414


Patch Details:
----------------

This tool fixes issue 454274 by removing unused user profiles in the BVMS configuration.

Important hint:
The UserProfileCleanupTool needs to be executed on the Bosch VMS Management Server machine before the upgrade to BVMS 12.1.0.414 is started.

To run the UserProfileCleanupTool:
	Extract the .zip archive in some temporary folder on the PC where the BVMS Management Server runs (that is supposed to be upgraded).
	Start cmd-Shell with adminstrative privileges.
	In the cmd-Shell change to the temporary folder where the .zip archive was extracted to.
	There are two command-scripts available:

	- SearchBvmsConfigForWasteUserProfiles.cmd displays an analysis-report about the configuration, but does not change it.
	- RemoveWasteUserProfilesFromBvmsConfig.cmd removes waste user profiles from the configuration.
	
	In the cmd-Shell run one or both of the above mentioned command-scripts.
	After successfull run of the UserProfileCleanupTool, upgrade to BVMS 12.1.0.414.

When upgrading to a BVMS Version higher than 12.1.0.414, there is no need to run the UserProfileCleanupTool 
because there the performance of the migration code was improved considerably.


Problem Details:
----------------

Issue 454274 reported the problem that the Setup-Upgrade process to BVMS 12.1.0.414 takes long if there are many unused user profiles in the BVMS configuration.

Background:
On BVMS-systems which have been running for many years now and where - over the time - many user-accounts for operators were added and removed, due to staff 
turnover, the number of UserProfile-DataObjects in the configuration can be hundreds or even thousands, because the ConfigClient does not delete the 
UserProfile-DataObject belonging to user-account when the user-account is removed from the configuration. 
When such a BVMS system is upgraded to version 12.1 of BVMS then the setup can take a long time (more than 30 minutes), because the BVMS setup program starts 
the CentralServer service of the new BVMS version and waits for the service to finish start-up. The CentralServer migrates the configuration (in the Elements.bvms file)
during its start-up phase. The config-migration can take a long time when there are many UserProfile-DataObjects in the configuration, because most 
UserProfile-DataObjects contain the password-hash for a user. (A UserGroup-DataObject has also a related UserProfile-DataObject that normally does not contain a 
password-hash, unless it is a UserGroup-DataObject for a 'remote' user-group.)
The time needed for migrating password-hashes in the configuration can be reduced drastically on these systems by removing the UserProfile-DataObjects from the 
configuration that belonged to user-accounts that have been removed from the configuration. 


Affected Bosch VMS Components / Machines:
-----------------------------------------

- Bosch VMS Management Server machine (before upgrading to BVMS 12.1.0.414)
