Database Reference
In-Depth Information
Creating a Consistent Export
A consistent export means that all data in the export file are consistent as of a time or an SCN. When you're exporting
an active database with many parent-child tables, you should ensure that you get a consistent snapshot of the data.
If you're using Oracle 11g release 2 or higher, you can take a consistent export by invoking the legacy mode
parameter of CONSISTENT=Y . See the section “Data pump Legacy mode,” later in this chapter, for details.
Tip
You create a consistent export by using either the FLASHBACK_SCN or FLASHBACK_TIME parameter. This example
uses the FLASHBACK_SCN parameter to take an export. To determine the current value of the SCN of your data set, issue
this query:
SQL> select current_scn from v$database;
Here is some typical output:
CURRENT_SCN
-----------
5715397
The following command takes a consistent full export of the database, using the FLASHBACK_SCN parameter:
$ expdp mv_maint/foo directory=dp_dir full=y flashback_scn=5715397 \
dumpfile=full.dmp
The previous export command ensures that all data exported are consistent with any transactions committed in
the database as of the specified SCN.
When you use the FLASHBACK_SCN parameter, Data Pump ensures that the data in the export file are consistent
as of the specified SCN. This means that any transactions committed after the specified SCN aren't included in the
export file.
If you use the NETWORK_LINK parameter in conjunction with FLASHBACK_SCN , then the export is taken with the
SCN consistent with the database referenced in the database link.
Note
You can also use FLASHBACK_TIME to specify that the export file should be created with consistent committed
transactions as of a specified time. When using FLASHBACK_TIME , Oracle determines the SCN that most closely
matches the time specified and uses that to produce an export consistent with that SCN. The syntax for using
FLASHBACK_TIME is as follows:
FLASHBACK_TIME="TO_TIMESTAMP{<value>}"
 
 
Search WWH ::




Custom Search