I have a situation where I need:
- to import the latest structure of my prod database (everything including business logic but without any data) into a lower environment - because my web app refers to the new db structure.
- and then import data from a very specific old backup (data only) in this schema - because a certain set of our automated test cases refer to the older data and it's not feasible at this point to rewrite all those test cases. Is it possible? How?
What the team does right now is - Everytime to begin testing in this lower env.- Refresh this database with that specific old backup, say Jan 2021 (structure and data) and then execute all the DDLs that went live in Production after Jan 2021 to align the structure with prod's.. I recently joined team and find it really cumbersome and wondering if above solution I propose is doable by a DBA? It's Oracle Database. Any other way? Thanks for any help you may offer.
The data and data structure must match. You can't import data directly into a table structure that it didn't originate in, so initially the process you describe is the way to go:
At this point, before you do anything else: