I need to export a live, archive-enabled, OLTP complete or partial database and import it to a different host or remote location without causing the live (source) database any downtime or interruptions, and without losing any data on the target database.
top of page
bottom of page
There are some options we might want to consider
- DataGuard (whole database only)
You create a standby (the target) and then sever the link between primary and target, leaving the target as a standalone byte for byte replica.
- Transportable tablespace/database
You unload metadata about the tablespaces, then copy the tablespace files to the target , whole database or partial.
- Pluggable database
Use a clone command to copy a pluggable to a destination, although in 12.1 this requires an interruption to the primary. Much better in 12.2
- Datapump
Various modes to choose from
Full
expdp system/password full=Y directory=MYDIR dumpfile=full.dmp logfile=full.log impdp system/password full=Y directory=MYDIR dumpfile=full.dmp logfile=impfull.log
Schema level
expdp system/password schemas=HR directory=MYDIR dumpfile=hr.dmp logfile=hr.log impdp system/password schemas=HR directory=MYDIR dumpfile=hr.dmp logfile=imphr.log
Adding a "consistent=y" parameter to the export will ensure all the data is exported as at a common point in time.