How to create a physical copy of a database excluding user data
For some very specific purposes, I need a clone of a production database fulfilling following conditions:
- It *MUST* be a physical copy as far as following tablespaces are concerned: SYSTEM, SYSAUX, UNDO
- It should also contain all other tablespaces and user objects but *WITHOUT ANY APPLICATION DATA*. Deleting data or truncating objects after the creation is not an option.
I could do a duplicate skipping all user tablespaces (mentioned TS are always cloned automatically), but then, also all user objects would be missing. In this particular case, we don't care about those missing user objects as long as Oracle tolerates this situation, but their references should still exist in the dictionary. I am not sure about the implications of working with such a database, but we are troubleshooting a bug that is completely unrelated to user objects or data and leaves them untouched, and we could get along with that database as far as there are no Oracle errors.