000036586 - Tblpackage foreign key contraint error while upgrading in RSA Archer 6.x

Document created by RSA Customer Support Employee on Aug 6, 2018
Version 1Show Document
  • View in full screen mode

Article Content

Article Number000036586
Applies ToRSA Product Set: Archer
RSA Product/Service Type: Archer
RSA Version/Condition: 6.x
IssueDuring an upgrade, for example to 6.4.2, an error occurs during the upgrade scripts.

Starting database install at: 8/3/2018 9:59:23 AM
SetupUtils.Database.SqlException: An error occurred at step 21 of script 6.2.10000.1154.sql (length=327, max=3737) ---> System.Data.SqlClient.SqlException: The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_tblPackageObject_tblPackageRun". The conflict occurred in database "TEST", table "dbo.tblPackageRun", column 'run_id'.


This also shows on the website as well:

Server Error in '/' Application.



The DELETE statement conflicted with the REFERENCE constraint "FK_tblPackageExportObject_tblPackage". The conflict occurred in database "database name here", table "dbo.tblPackageExportObject", column 'package_id'.The statement has been terminated.SQL statement: usp_delete_package @userToken = 'xxxxxxx', @packageId = xxx
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: ArcherTech.Web.UI.ArcherException: The DELETE statement conflicted with the REFERENCE constraint "FK_tblPackageExportObject_tblPackage". The conflict occurred in database "UAT2_INST_ARCHER", table "dbo.tblPackageExportObject", column 'package_id'.The statement has been terminated.SQL statement: usp_delete_package @userToken = 'xxxxxxx', @packageId = xxx

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 
   [ArcherException: The DELETE statement conflicted with the REFERENCE constraint "FK_tblPackageExportObject_tblPackage". The conflict occurred in database "test", table "dbo.tblPackageExportObject", column 'package_id'.The statement has been terminated.SQL statement: usp_delete_package @userToken = 'xxxxxxx', @packageId = xxx]
      ArcherTech.Web.ArcherTechPage`2.OnPreInit(EventArgs e) +752
      System.Web.UI.Page.PerformPreInit() +46
      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +295
CauseThere may be either
a) an additional line in tblpackage that has no association to any packages
b) other package tables MAY need to be cleared as well
c) In Archer UI you may have "packageA" that cannot be deleted
d) If you create a brand new package, and then try to delete it, this cannot be deleted.
ResolutionEnsure that you have a pre-upgrade backup of the instance DB.
Ensure you have a mid-upgrade backup of the instance DB.

DELETE all values from
1) dbo.tblPackage
2) dbo.tblPackageExportObject
3) dbo.tblPackageObject
4) dbo.tblPackageObjectInstall


 

Attachments

    Outcomes