Sie sind auf Seite 1von 4

EXPDP ENHANCEMENTS – FULL EXPORT WITH

TRANSPORTABLE OPTION

[oracle@DB12c ~]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 15 14:43:13 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit
Production
With the Partitioning, OLAP, Advanced Analytics and Real Application
Testing options

SQL> CREATE TABLESPACE test DATAFILE


'/u02/app/oracle/oradata/ORCL/datafile/test01.dbf' size 5M;
Tablespace created.

SQL> CREATE TABLE hr.testtab ( id NUMBER, label VARCHAR2(10)) TABLESPACE


test;
Table created.

SQL> alter user hr quota unlimited on test;


User altered.

SQL> INSERT INTO hr.testtab VALUES (10,'Shirt');


1 row created.

SQL> INSERT INTO hr.testtab VALUES (20,'Trousers');


1 row created.

SQL> commit;
Commit complete.

SQL> SELECT tablespace_name FROM dba_tablespaces ORDER BY 1;


TABLESPACE_NAME
------------------------------
ADOTBS
LOW_COST_STORE
SYSAUX
SYSTEM
TEMP
TEST
UNDOTBS1
USERS
8 rows selected.

SQL> ALTER TABLESPACE test READ ONLY;


Tablespace altered.

SQL> alter tablespace LOW_COST_STORE read only;


Tablespace altered.

SQL> alter tablespace ADOTBS read only;


Tablespace altered.

SQL> alter tablespace users read only;


Tablespace altered.

SQL> SELECT file_name FROM dba_data_files WHERE tablespace_name IN


('TEST');
FILE_NAME
-------------------------------------------------------------------------
-------
/u02/app/oracle/oradata/ORCL/datafile/test01.dbf

SQL> exit

[oracle@DB12c ~]$ expdp system/oracle_4U DUMPFILE=expfull.dmp FULL=Y


TRANSPORTABLE=ALWAYS LOGFILE=exp.log
Export: Release 12.1.0.1.0 - Production on Sun Jun 15 15:12:26 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights
reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 -
64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application
Testing options
Starting "SYSTEM"."SYS_EXPORT_FULL_01": system/********
DUMPFILE=expfull.dmp FULL=Y TRANSPORTABLE=ALWAYS LOGFILE=exp.log
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/PLUGTS_FULL/FULL/PLUGTS_TABLESPACE
Processing object type DATABASE_EXPORT/PLUGTS_FULL/PLUGTS_BLK
Processing object type
DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
Processing object type
DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
.......
.......

[oracle@DB12c ~]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 15 15:14:04 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit
Production
With the Partitioning, OLAP, Advanced Analytics and Real Application
Testing options

SQL> alter database default tablespace system;


Database altered.

SQL> drop tablespace users including contents;


Tablespace dropped.

SQL> drop tablespace ADOTBS including contents;


Tablespace dropped.

SQL> drop tablespace LOW_COST_STORE including contents;


Tablespace dropped.

SQL> drop tablespace test including contents;


Tablespace dropped.

SQL> exit
[oracle@DB12c oracle]$ impdp system/oracle_4U FULL=Y dumpfile=expfull.dmp
TRANSPORT_DATAFILES='/u02/app/oracle/oradata/ORCL/datafile/lcs.dbf','/u02
/app/oracle/oradata/ORCL/datafile/test01.dbf','/u02/app/oracle/oradata/OR
CL/datafile/o1_mf_users_9sptz99v_.dbf_bak','/u02/app/oracle/adotbs1.dbf'
logfile=import.log
Import: Release 12.1.0.1.0 - Production on Sun Jun 15 15:28:10 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights
reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 -
64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application
Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** FULL=Y
dumpfile=expfull.dmp
TRANSPORT_DATAFILES=/u02/app/oracle/oradata/ORCL/datafile/lcs.dbf,/u02/ap
p/oracle/oradata/ORCL/datafile/test01.dbf,/u02/app/oracle/oradata/ORCL/da
tafile/o1_mf_users_9sptz99v_.dbf_bak,/u02/app/oracle/adotbs1.dbf
logfile=import.log
Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER
.....
......

[oracle@DB12c oracle]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 15 15:29:29 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit
Production
With the Partitioning, OLAP, Advanced Analytics and Real Application
Testing options

SQL> select tablespace_name from dba_tablespaces;


TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
ADOTBS
LOW_COST_STORE
TEST

Das könnte Ihnen auch gefallen