目录
$ . oraenv
$ sqlplus / as sysdba
SQL>conn / as sysdba
SQL>create tablespace trans_tbs datafile '/home/oracle/trans01.dbf'
2 size 20M;


SQL>create user trans identified by trans
2 default tablespace trans_tbs;

SQL>alter user trans quota unlimited on trans_tbs;
SQL>grant connect to trans;
SQL>grant create table to trans;
SQL>grant select on hr.employees to trans;

SQL>conn trans/trans;
SQL>create table trans_tb tablespace trans_tbs
2 as select * from hr.employees;

SQL>conn / as sysdba

$ expdp system/oracle_4U directory=udbs_dir dumpfile=trans.dump TRANSPORT_TABLESPACES=trans_tbs_

SQL>drop tablespace trans_tbs including contents;
SQL>conn trans/trans
SQL>select count(*) from trans_tb;

注意:不要同时删除数据文件。
$ impdp system/oracle_4U directory=udbs_dir dumpfile=trans.dump transport_datafiles='/homeoracle/trans01.dbf'_

SQL>conn / as sysdba
SQL>select name from v$tablesapce;
SQL>select count(*) from trans.trans_tb;
