This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

K2 Upgrade from 4.6.11 to 4.7 failed at the K2 Server and Database level with this error appearing:


ExecuteSqlScript.Execute: 15:23:16:>> Logged Error: Script execute failed: System.Exception: Script execution exception: Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Cannot drop the table '#Result', because it does not exist or you do not have permission.

Symptoms

The error saying the SourceCode.Data.Form.4.16060.7.5.PostUpgrade.sql script failed to execute. It was determined there was another application on the same SQL database server as the K2 database, that created a system temp table with the name "Result_Set" in the system database.

When K2 installer executed the SQL script to see if a temp table with a similar name currently existed and then tried to DROP it, because it was there initially, it failed with the SQL exception, and eventually stopped the upgrade process.

Resolution

Please log a support case to obtain the fix.