Skip to main content


 

Symptoms


We restored a 4.6.10 DB to a new SQL instance, and did a "clean install" pointing to the existing database. The upgrade failed with the following errors.

1.) System.Data.SqlClient.SqlException: There is already an object named 'Form' in the database. CREATE SCHEMA failed due to previous errors.
2.) Target did not complete successfully: SourceCode.Data.Form.4.16060.7.5.PostUpgrade.sql
Target did not complete successfully: SourceCode.Data.Server.4.16060.7.5.PostUpgrade.sql
 

Diagnoses


1.) The upgrade failed, because the "Form" schema already existed, but the schema owner was some "random user". Because the K2Service account could not see the schema, it tried to re-create it, and SQL server threw an error.
2.) When looking at the log files, we noticed that the eDATABASESTRUCTURE] variable token was missing form the HostServer.Configuration table.
 

Resolution

1.) We made the "K2_Schema_Owner" the owner of the "Form" schema.
2.) We injected the hDATABASESTRUCTURE] variable token into the HostServer.Configuration table.




 
Be the first to reply!

Reply