Error during upgrade: There is already an object named 'FastGuidSeq' in the database

When performing an in-place upgrade from 21.10, why does the installer fail with "An error was thrown:System.Exception: Migration failed: There is already an object named 'FastGuidSeq' in the database.Microsoft.Data.SqlClient.SqlException (0x80131904): There is already an object named 'FastGuidSeq' in the database?

Issue description

During an upgrade from 2022.4 or earlier to 2022.10, the installer may fail, indicating:

System.Exception: Migration failed: There is already an object named 'FastGuidSeq' in the database.
Microsoft.Data.SqlClient.SqlException (0x80131904): There is already an object named 'FastGuidSeq' in the database.

Troubleshooting

If encountered, please create a support case through the Customer Portal and share the installation log. You may need to re-run the installer with the /l*vx {log file location and name} command line parameter to capture the log.

Please also share the Orchestrator database table row count, as described in SQL Query To Fetch All Data Tables Records Count From A Database. A sample query is attached to this article, differing only in the sorting method of the tables.

These files will be reviewed by a support engineer to determine the cause of the error and potential approaches to resolve the error.