源库:11.2.0.3及以上的版本
    目标库:12c
    可以在不同字节序直接转换
    无需做自包含检查
    无法使用exclude排除表空间
    只能全库导出导入

    system,sysaux
    sys用户下的数据不会导出。
    在普通用户下创建的表(存储在system表空间)可以导出
    1.创建oracle 外部文件目录

    1. mkdir /u01/app/oracle/mydump
    2. create directory mydump as '/u01/app/oracle/mydump';
    3. grant read,write on directory mydump to public;

    2.创建被传输的表空间

    1. create tablespace fte datafile '/u01/app/oracle/oradata/orcl/fet.dbf' size 20m ;
    2. create tablespace fte1 datafile '/u01/app/oracle/oradata/orcl/fet1.dbf' size 20m ;

    3.创建测试用户

    1. create user fx identified by fx default tablespace fte;
    2. grant connect ,resource ,dba to fx;

    4.创建测试数据
    conn fx

    1. create table t1 (id int) ;
    2. insert into t1 values(1);
    3. insert into t1 values(2);
    4. insert into t1 values(3);
    5. create table t2 (name varchar2(50)) tablespace fte1;
    6. insert into t2 values ('aa');
    7. insert into t2 values ('bb');
    8. insert into t2 values ('cc');

    5.将除系统表空间之外所有的表空间设置为只读

    1. alter tablespace fte read only;
    2. alter tablespace fte1 read only;
    3. alter tablespace users read only;
    4. alter tablespace example read only;

    6.导出数据

    1. expdp fx/fx dumpfile=exp.dmp directory=mydump transportable=always full=y logfile=export.log

    7.创建导入目录

    1. create directory mydump as '/opt/oracle/mydump/';
    2. grant read ,write on directory mydump to public;

    8.导入数据
    拷贝导出dmp文件和数据文件dbf

    1. impdp system/Oracle123 dumpfile = exp.dmp directory = mydump transport_datafiles='/opt/oracle/oradata/ORCL/datafile/example01.dbf','/opt/oracle/oradata/ORCL/datafile/fet.dbf','/opt/oracle/oradata/ORCL/datafile/fet1.dbf','/opt/oracle/oradata/ORCL/datafile/users01.dbf' full=y logfile=import.log