Académique Documents
Professionnel Documents
Culture Documents
Export and Import are not backwardly compatible. That is, running the 9i version of
export against an 8i database will produce errors. Similarly, running 8i export against a 7
or 8.0 database will produce fireworks.
To prove the point, here’s what happens when I try to run 9i export against my 8.1.6
database:
Much the same happens when I try to use the 8.1.7 version of export against an 8.1.6
database (which goes to show that point releases are frequently significant):
You’ll notice it gets a bit further than version 9 export against the 8i database, but
essentially, it still falls over.
The same, of course, happens if you try to run version 8.x or 9i export against a version 7
database.
What we learn from this is that the higher version of export can NOT be used against a
lower version of the database. 9i export won’t work when pointed at 8i or 8.0 databases;
8i export won’t work when pointed at 7 or 8.0 databases (nor even when pointed at a
lower point release of 8i). And so on.
However, it is perfectly permissible to use the lower version of export against a higher
version of the database. For example, if I run the 8.1.6 version of export against the 8.1.7
database, this is what happens (trimmed a bit for space reasons):
What about 8.1.6-version export being applied to a 9i database? Does that work?
…obviously, it does. So, lower versions of export can quite happily run against higher
versions of the database, but the dump file produced is a lower-version dump file. It’s
also important to realise that the lower version of export may encounter new data
structures in the higher version of the database –and won’t have a clue as to how to deal
with them. All higher-version structures are therefore ignored during the export, and
won’t get included in the dump file.
Incidentally, the rules I’ve outlined here break down slightly for version 7. The version 7
export can not be run against a version 8 or higher database… not unless, at any rate, you
run the catexp7.sql script provided by Oracle (and found in ORACLE_HOME/rdbms/admin)
in the version 8 or higher database first. That script creates a bunch of views which the
version 7 export utility needs to see before it can function properly.
So, to sum up: a lower version of export can be run against a higher version of the
database, but the dump file produced will be lower version compatible, ignoring any
higher version-specific features it encounters during the export. Version 7 of export is a
law unto itself, and requires the running of a special script in the higher version of the
database before it can work against that higher version database.
First, a higher version of import has no trouble understanding the contents of a lower
version dump file (that is, a dump file produced by running a lower version of export,
regardless of the version of the database it was run against).
To prove, the point, here we see a dump file produced by version 8.1.6 of export being
successfully interpreted by a 9i version of import (which is loading into a 9i database):
But if we try running 8.1.6 against a version 9i dump file, what happens?
Clearly, the lower version of import can make no sense of the higher version dump file.
Bear in mind that it is the versions of import and the dump file that are at issue here, not
what version of the database the dump file originally came from. So, for example, using
an 8.1.6 dump file, and version 8.1.6 of import, I can import the EMP table into a 9i
database without any difficulties:
Certainly, at any rate, this works with simple User tables… quite what happens when you
try using 8.1.6 import to load system tables into a higher version of the database is
anyone’s guess (I’m not brave enough to try it out!), but I wouldn’t recommend it.
The real point is that version 8.1.6 import can interpret the 8.1.6 version dump file (and
you’ll recall that the dump file version is governed by the export version used, not what
version database export happened to be run against).
What about using 9.0.1 version import with a 9.0.1 dump file to load into an 8.1.6
database? Well, that doesn’t work:
Whilst this version of import has no trouble reading the dump file, we encounter another
rule: that a higher version of import cannot be used to load into a lower version of the
database, even if the import version can make perfect sense of the dump file.
The net result of this entire discussion is that multi-versions of import and export don’t
have to be a problem, provided you keep your wits about you. Lower versions of export
Copyright © Howard Rogers 2001 30/10/2001 Page 5 of 6
Export/Import with different Oracle Versions Backup and Recovery Tips
can be run against higher versions of databases; higher versions of import can make sense
of lower version dump files, but can’t be run against a lower version of the database.
And all of that can perhaps best be summarised by the following table:
Now we locate 8.1.6 in the “Dump File Version” column, and see what options we have.
• We could, for example, use the 8.1.6 version of import to load it into an 8.1.6
database (main division 3, row 3, only option).
• Or we could use 8.1.7 import to load it into a 8.1.7 database (main division 4, row 3,
first option).
• Or we could use 8.1.6 import to load it into a 9.0.1 database (main division 5, row 3,
third option).
• But we can’t use 9.0.1 import to load it into a 8.1.7 database (main division 4, no
rows have 9.0.1 as an import option). That would violate the rule about higher
versions of import not running against lower versions of the database.
I confess to not having tested the table’s predictions for 7.x and 8.0.x (neither of which
versions run on my Windows 2000 test-bed). Perhaps you’d like to try it?!