When trying to upgrade the database, the following error occurs: ESDatabaseUpgradePrepare returned: -1
There is an issue with System default workspace_copy in StruxureWare Building Operation v1.4 that can cause an upgrade to fail.
When the ES Installer fails ("ESDatabaseUpgradePrepare returned: -1"), you have to localize the "dump.log" file on disk: C:\ProgramData\Schneider Electric StruxureWare\Building Operation 1.5\Enterprise Server\db_backup\dump\dump.log and check if this file contains an error message in this style:
WARNING: Error: Type_Error (0xd001a), module Impex(57), moduleCode 0, dispString "~/System/Domains/Builders/Workspaces/System default workspace_copy", techString "Cannot find declared instance in parents type."
and then this:
ERROR: Exception encountered while reading db objects or writing objects to dump file: RecoverableException: d:\dev\rb-dev-dbexport142-system\source\packages\commons\components\C3Po\utilities\impex\source\ImpexContext.cpp(248) Error: Type_Error (0xd001a), module Impex(57), moduleCode 0, dispString "~/System/Domains/Builders/Workspaces/System default workspace_copy", techString "Object is not populated with a declared instance template!"
NOTE: In this example we use the domain name "Builders" and workspace name "System default workspace_copy" in your case this names can be different ince its a user that create and name thi intances.
As you can see in the Error above ""~/System/Domains/Builders/Workspaces/System default workspace_copy"," the issue lies with System default workspace_copy that is related to the domain "Builders". The copy paste issue has corrupted the workspace and only way is to remove the whole domain "Builders" and then upgrade.
In your case the domain name and the workspace name can be something different since this is a name you choose when creating a domain and/or a workspace.
For now we do not have a fix for this defect but the above workaround is valid.