OracleDB‎ > ‎

exp/imp

Oracle old import export tools (imp/exp).

user doing the import or export should have imp_full_database and exp_full_database in order to do a import of export on a full database


Examples

set ORACLE_SID to whatever instance they want the dump from

exp \'sys/mypass AS SYSDBA\' OWNER=USER1 FILE=USER1_2007041101.dmp

create user USER1 identified by pass123

SQL> alter user USER1 quota unlimited on SYSTEM;

User altered.

SQL>


import to another user:

imp \'sys/mypass AS SYSDBA\' fromuser=USER1 touser=USER2 ignore=y commit=y file=/var/exports_20070726/USER1_2007072601.dmp log=./USER12.log


NOTE

if the import hangs run the following:

Archive log list;


if ‘Automatic archival Disabled’ run the following:
ALTER SYSTEM ARCHIVE LOG START;

for manual run:

Alter system archive log all;

to update spfile on 9i

create pfile='/tmp/pf' from spfile; (then go edit the /tmp/pf then run the following)
create spfile from pfile='/tmp/pf';


Sometimes when exporting you get a warning about the server being in one character set and export is being done in another. Then you might get a bunch of 'questionable statistics exported' warning. If this is the case, stop the export and set your shell's NLS_LANG to the same charset as the server. (note that you need a . before the charset)

export NLS_LANG=.AL32UTF8

Comments