Upgrading to Blackpearl 4.7 failed to run PostUpgrade script to drop the table '#Result'

  • 16 February 2021
  • 0 replies

Userlevel 4
Badge +17

Blackpearl 4.7 upgrade failed to run PostUpgrade script to drop the temp table '#Result'


K2 blackpearl 4.6.11 to 4.7
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.
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.


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.


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.


Please log a support case to obtain the fix.

0 replies

Be the first to reply!