Let's say I have 2 databases, A and B, which originally have the same schema, tables, etc., and the same data in those tables.
Then, users are only able to modify database A for a month, and B does not change during that month. At the end of the month, I want to move data from A to B.
If possible, I only want to take modified and new data from A. I can export from A with expdp using queries that check for records that were added or updated within that month, but I'm not sure if/how that data can be imported with impdp.
I might be mistaken, but it doesn't look like any of the TABLE_EXISTS_ACTION options (SKIP, APPEND, TRUNCATE, REPLACE) for impdp handle importing new AND changed rows WITHOUT reloading all rows.
From the Oracle site, "APPEND loads rows from the source and leaves existing rows unchanged.", so from my understanding that can't be used since it wouldn't handle importing any rows that exist in the destination (A), but were modified in the source (B).
Is there a way that impdp can import just new rows AND updated existing rows? Or do I have to export all data from A and import to B?
"If possible, I only want to take modified and new data from A"
Why do you care? The end state is the same whether you teardown everything or just apply a delta.
Generally speaking, truncate + wholesale insert
is more efficient than append + selective update
would be, especially at scale, which is presumably why datapump import doesn't include an update operation.