<! -- [If! SupportLists] --> 1. <! -- [Endif] --> Go to the oracle server AMX currently used, execute
[Oracle @ lnxas4-ce2 ~] $ Sqlplus/nolog
SQL * Plus: Release 10.2.0.1.0-Production on Wed Jan 12 07:18:47 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
SQL> connect/as sysdba
Connected.
SQL> create or replace directory bakdir as/home/oracle/bak;
Directory created.
SQL> grant read, write on directory bakdir to qsh05;
Grant succeeded.
SQL> exit
/Home/oracle/bak is where to save database dump file, and 'qsh05 'is database username.
<! -- [If! SupportLists] --> 2. <! -- [Endif] --> Make sure/home/oracle/bak is created, then execute
Expdp qsh05/qsh05 dumpfile = qsh05.dmp directory = bakdir include = table
'Qsh05/qsh05 'is database username/password, and 'dumpfile' is the file name of database dump file, and 'directory' is the directory name created in step 1, because only need export table, so add 'include = Table '.
<! -- [If! SupportLists] --> 3. <! -- [Endif] --> If the export is successful, the end of log looks like following,
Dump file set for QSH05.SYS _ EXPORT_SCHEMA_01 is:
/Home/oracle/bak/qsh05.dmp
Job "QSH05". "SYS_EXPORT_SCHEMA_01" successfully completed at 07:25:30
And go to/home/oracle/bak, there are two files, 'qsh05. dmp 'and 'export. log '.
<! -- [If! SupportLists] --> 4. <! -- [Endif] --> Go to the ORACLE server where the AMX wanted to migrate, and create a new user/password in database.
<! -- [If! SupportLists] --> 5. <! -- [Endif] --> Create a new dir, and create a new directory mapping to this dir as step 1.
<! -- [If! SupportLists] --> 6. <! -- [Endif] --> Copy dump file to the dir created in step 5, then execute
Impdp new_user/new_pass remap_schema = qsh05: new_user dumpfile = qsh05.dmp directory = new_directory include = table
<! -- [If! SupportLists] --> 7. <! -- [Endif] --> If the import is successful, the end of log looks like following,
Job "QSH07". "SYS_IMPORT_FULL_01" successfully completed at 17:46:55