MERCADOS FINANCIEROS

miércoles, 1 de abril de 2020

Datapump Oracle expdp

EXPORT DATAPUMP FULL

expdp system/oracle full=y directory=DATA_PUMP_DIR dumpfile=hr.dmp logfile=hr.log 

Export: Release 12.1.0.1.0 - Production on Wed Apr 1 21:12:11 2020

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


EXPORT DATAPUMP SCHEMA

[oracle@localhost ~]$ expdp system/oracle owner='HR' directory=DATA_PUMP_DIR dumpfile=hr.dmp logfile=hr.log 

Export: Release 12.1.0.1.0 - Production on Wed Apr 1 21:15:16 2020

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
Legacy Mode Active due to the following parameters:
Legacy Mode Parameter: "owner=HR" Location: Command Line, Replaced with: "schemas=HR"
Legacy Mode has set reuse_dumpfiles=true parameter.
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=HR directory=DATA_PUMP_DIR dumpfile=hr.dmp logfile=hr.log reuse_dumpfiles=true 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 640 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA

EXPORT DATAPUMP TABLA

[oracle@localhost ~]$ expdp system/oracle tables='HR.EMPLOYEES' directory=DATA_PUMP_DIR dumpfile=hr1.dmp logfile=hr1.log

Export: Release 12.1.0.1.0 - Production on Wed Apr 1 21:18:58 2020

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_TABLE_01":  system/******** tables=HR.EMPLOYEES directory=DATA_PUMP_DIR dumpfile=hr1.dmp logfile=hr1.log
Estimate in progress using BLOCKS method...


IMPORTANDO

REMAP_SCHEMA


impdp test/test@db10g tables=SCOTT.EMP network_link=REMOTE_SCOTT directory=TEST_DIR logfile=impdpSCOTT.log remap_schema=SCOTT:TEST

REMAP_TABLESPACE


impdp hr REMAP_TABLESPACE=tbs_1:tbs_6 DIRECTORY=dpump_dir1
  DUMPFILE=employees.dmp 

REMAP_TABLE

This parameter allows a table to be renamed during the import operations performed using the TRANSPORTABLE method. It can also be used to alter the base table name used during PARTITION_OPTIONS imports. The syntax is shown below.

REMAP_TABLE=[schema.]old_tablename[.partition]:new_tablename

An example is shown below.

impdp test/test tables=TAB1 directory=TEST_DIR dumpfile=TEST.dmp logfile=impdpTEST.log
  remap_table=TEST.TAB1:TAB2

TABLE_EXISTS_ACTION: especifica la acción a realizar en caso de que exista una tabla incluida en la importación:

No hay comentarios: