Problem / Solution: A package appears to import successfully but none or only some of the changes appear in the destination tenant

Version 2

    Environment:

    HEATSM / ISM 2015+ installed on Premise where the Ops Console is not used and development changes are moved between tenants with the Project/Package method

     

    Error message:

    None - no errors are presented

     

    Problem:

    A package appears to import successfully but none or only some of the changes appear in the destination tenant.

     

    Cause:

    This situation can happen when an SQL backup and restore method is used instead of the Ops Console to refresh tenants.  This can result in a situation in the Frs_Ops_Change_Log table where the SourceChangeId column has values that are higher than the RecID values of the new transactions being created in the Staging/development tenant.  When the package is applied any transactions whose RecId matches a SourceChangeId that is already present in the destination database will simply be skipped as the Package import process believes those items have already been applied to this tenant.

     

    Solution:

    Changes in this state will need to be moved manually or recreated after re-syncing the RecId and SourceChangeIDs on all tenants.  This re-sync should also be done after any SQL backup/restore is used to refresh STG or UAT.

     

    --To re-sync the RecId and SourceChangeId columns across all tenant databases, run the following query in all tenants:

    select Max(SourceChangeId) from Frs_Ops_Change_Log

     

    --Take the maximum of those results and reseed the recid column in each tenant with the HIGHEST value from all tenants (where 123456 is the largest value from all three tenants given by the query above):

    DBCC CHECKIDENT (Frs_Ops_Change_Log, RESEED, 123456)