When refreshing the RefDb from another environment (such as PROD or UAT) please ensure the following:
The data in DATABASECHANGELOG and DATABASECHANGELOGLOCK tables must be copied from the source database to the target RefDb.
For multi-schema projects, the schema for these tables can be found by checking the datical.project file for the trackingSchema attribute on row 2.
For single schema projects the tables will be present in the managed schema.
Grants: Ensure any necessary grants are added to the RefDb.
ORACLE: In the event of server outage or unexpected shutdown which requires a refresh of the RefDb, check that no orphan datapump jobs remain on the server.
https://www.oracle-scripts.net/cleanup-orphaned-datapump-jobs
Orphan jobs may result in the following error during the restore operation of a Packager job:
ORA-06512: at "SYS.DBMS_DATAPUMP", line 7143 ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_DATAPUMP", line 4932 ORA-06512: at "SYS.DBMS_DATAPUMP", line 7137
Failure to copy the DATABASECHANGELOG table data will result in re-deployment of all changesets in the changelog.xml file to the RefDb. This will cause errors for non-rerunnable scripts. Users may find that scripts that were added months ago are suddenly trying to Package again which will lead to confusion.