(1) is anybody familiar with the incremental export/import functionality?
If
so, how does it work? Can you do exports/imports without using
the
incremental flag, such as for daily backups?
(2) how does Oracle load the data from the export file during an import?
What
I mean is, if I export the desire tables in default (alphabetical)
order, but
try to import them in a different order, it doesn't work. Do I have
to
specify the import order during the export, and then let Oracle import
the
file as-is?
1. The incremental functionality works like this (using export as an
example).
Complete exports take everything. Cumulative exports take everything
since the
last cumulative or complete export (depending on timing). Incremental
takes
everything since the last incremental or cumulative (again depending
on timing).
Clear as mud?
It's easier if you think of an example. Let's say we do this on
a monthly cycle
(assume a 28 day month):
Date Export
1 Complete
2 Incremental
(what's changed since last night)
3 Incremental
(what's changed since last night)
4 Incremental
(what's changed since last night)
5 Incremental
(what's changed since last night)
6 Incremental
(what's changed since last night)
7 Cumulative
(everything since the 1st)
8 Incremental
(what's changed since last night)
9 Incremental
(what's changed since last night)
10 Incremental
(what's changed since last night)
11 Incremental
(what's changed since last night)
12 Incremental
(what's changed since last night)
13 Incremental
(what's changed since last night)
14 Cumulative
(everything since the 7th)
15 Incremental
(what's changed since last night)
16 Incremental
(what's changed since last night)
17 Incremental
(what's changed since last night)
18 Incremental
(what's changed since last night)
19 Incremental
(what's changed since last night)
20 Incremental
(what's changed since last night)
21 Cumulative
(everything since the 14th)
22 Incremental
(what's changed since last night)
23 Incremental
(what's changed since last night)
24 Incremental
(what's changed since last night)
25 Incremental
(what's changed since last night)
26 Incremental
(what's changed since last night)
27 Incremental
(what's changed since last night)
28 Complete (the
whole shooting match)
Import can match this, so you could theoretically build a recovery from
this.
The reason I say theoretical is that all we track in the data dictionary
is which
tables have changed, not which rows. As a result, if you change
1 row in a 5
million row table, an incremental export picks up the flag to say there
has been
a change and exports all 5 million rows, not just the row that's changed.
That,
plus the fact that imports can't be combined with archives to perform
point-in-time recovery, generally means many clients haven't bothered
with this
functionality. The block level backup in Oracle8 makes a lot
more sense if
you're at that level.
2. The default level isn't really alphabetic, but based on the relationships
between
tables. It's important to not try and import table A with foreign keys
pointing
to table B, before table B is imported for example. Having said
that, if you're
aware of these relationships you should be able to import tables in
the order you
want, provided you follow this caveat - tables that foreign keys point
to need to
be imported first. The easiest way to manage this is to let Oracle
import the
data.