I have a database that is in oracle 8i and i want to export the entire database of a user to a .sql file and the import it to another system that has oracle 10g installed on it.
-
i dont know about exporting am new to this please guide me...Jin– Jin2011-05-26 12:58:27 +00:00Commented May 26, 2011 at 12:58
-
1To export read this: download.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/…Harry Joy– Harry Joy2011-05-26 12:58:45 +00:00Commented May 26, 2011 at 12:58
-
can i have the entire database for a user into a single .sql fileJin– Jin2011-05-26 13:00:50 +00:00Commented May 26, 2011 at 13:00
-
i mean to say all tables and sequences and allJin– Jin2011-05-26 13:01:13 +00:00Commented May 26, 2011 at 13:01
-
DId you literally want a SQL file or are you ok with the Oracle-specific dump (which is the usual solution and the answer suggests)?Nemo– Nemo2018-04-06 20:39:18 +00:00Commented Apr 6, 2018 at 20:39
1 Answer
To export your database, you must use the 8i exp utility:
exp full=y compress=N userid=system/system_pw file=dumpfilename.dmp log=explog.txt
To import your database, you must use the 10g imp utility:
imp full=y file=dumpfilename.dmp userid=system/system_pw log=implog.txt
The 10g imp utility is backward compatible with previous releases, so you should be able to export using the 8i exp utility and import with the 10g imp. Both utilities have a "help=y" parameter that will display a list of parameters you can specify. There are quite a few; for the most part the defaults are fine. Depending on the size of your database, this could take a while.
Creating a single SQL file is not as easy as it may seem at first, due to circular dependencies of certain objects. Plus, it's not as efficient to create or execute - exp/imp is far more so. If your goal is simply to move the database to a new version of Oracle, exp/imp is the simplest way to go.
Some documents to help you out: orafaq.com; Oracle 8i Utilities (oracle.com); Oracle 10g utilities (oracle.com).