Error: F_JD20DB: ORA-01555: Snapshot Too Old
Issue
Refresh jobs fail with the following error:
F_JD20DB: DBMS error [ORA-01555: snapshot too old: rollback segment number 520 with name "_SYSSMU520_2192557663$" too small]
Environment
- HVR version: 6.2.0
- Source: Oracle 19c
- Target: Snowflake
Resolution
To resolve the issue, take one or more of the following actions:
- Reduce Refresh execution time by using the Slicing functionality or defining a Restrict action with the RefreshCondition parameter.
- Retry Refresh during periods of lower database activity.
- Increase the size of the existing UNDO tablespace to prevent required UNDO information from being overwritten in the source Oracle database.
Cause
This issue occurs when the SELECT query requires an earlier version of table data stored in the UNDO tablespace, but Oracle has already overwritten that data with UNDO from other transactions. When this happens, Oracle can't maintain read consistency, and the SELECT query fails.
This may happen when we refresh a table while other database sessions are actively modifying it. Oracle stores previous versions of modified data in the UNDO tablespace to support read consistency. The UNDO tablespace is circular and shared across all database sessions, so Oracle eventually overwrites older UNDO data to make room for new UNDO. Long-running Fivetran refresh queries, such as those that read large tables, may still require this older UNDO data and fail when it is no longer available.