CTE00246S Rolling back, error removing entry_id nnn from presentment or segment. Rollback stopped. Exception is: xxx.

Explanation

Transaction Server

When an error occurs during a CPCS extract, any modifications that were made to the database during the extract are rolled back so the database appears the same as before the extract started. This error indicates that the database rollback did not complete because a second exception was received. As a result, entry ID nnn still exists in the database and references to entry ID nnn might still be in other tables. The exception message that was received is xxx.

Operator response

You can choose to manually roll back any changes by removing any references to entry ID nnn and deleting the entry that was created during CPCS extraction. The manual rollback can be done by running the following example SQL statements, substituting nnn with the actual value.
update presentment set cpcs_entry_id=null where cpcs_entry_id=nnn
update segment set entry_id=0, tracer_group=0 where entry_id=nnn
delete from entry where entry_id=nnn