Data Pump

50
ORACLE 10g DATA PUMP ORACLE 10g DATA PUMP ORACLE 10g DATA PUMP ORACLE 10g DATA PUMP ORACLE 10g DATA PUMP ORACLE 10g DATA PUMP ORACLE 10g DATA PUMP ORACLE 10g DATA PUMP Inderpal S. Johal Inderpal S. Johal Inderpal S. Johal Inderpal S. Johal Inderpal S. Johal Inderpal S. Johal Inderpal S. Johal Inderpal S. Johal Principal Consultant Principal Consultant Principal Consultant Principal Consultant Principal Consultant Principal Consultant Principal Consultant Principal Consultant Data Data Data Data Data Data Data Data Softech Softech Softech Softech Softech Softech Softech Softech Inc. Inc. Inc. Inc. Inc. Inc. Inc. Inc. April 24 April 24 April 24 April 24 th th th th , 2006 , 2006 , 2006 , 2006

description

Data Pump

Transcript of Data Pump

Page 1: Data Pump

ORACLE 10g DATA PUMPORACLE 10g DATA PUMPORACLE 10g DATA PUMPORACLE 10g DATA PUMPORACLE 10g DATA PUMPORACLE 10g DATA PUMPORACLE 10g DATA PUMPORACLE 10g DATA PUMP

Inderpal S. JohalInderpal S. JohalInderpal S. JohalInderpal S. JohalInderpal S. JohalInderpal S. JohalInderpal S. JohalInderpal S. JohalPrincipal ConsultantPrincipal ConsultantPrincipal ConsultantPrincipal ConsultantPrincipal ConsultantPrincipal ConsultantPrincipal ConsultantPrincipal ConsultantData Data Data Data Data Data Data Data SoftechSoftechSoftechSoftechSoftechSoftechSoftechSoftech Inc.Inc.Inc.Inc.Inc.Inc.Inc.Inc.

April 24April 24April 24April 24thththth, 2006, 2006, 2006, 2006

Page 2: Data Pump

AGENDAAGENDAAGENDAAGENDAAGENDAAGENDAAGENDAAGENDA

�� Oracle Data Loading/Unloading optionsOracle Data Loading/Unloading optionsOracle Data Loading/Unloading optionsOracle Data Loading/Unloading optionsOracle Data Loading/Unloading optionsOracle Data Loading/Unloading optionsOracle Data Loading/Unloading optionsOracle Data Loading/Unloading options

�� Why we use Data pump or exp/impWhy we use Data pump or exp/impWhy we use Data pump or exp/impWhy we use Data pump or exp/impWhy we use Data pump or exp/impWhy we use Data pump or exp/impWhy we use Data pump or exp/impWhy we use Data pump or exp/imp

�� Introduction to Data PumpIntroduction to Data PumpIntroduction to Data PumpIntroduction to Data PumpIntroduction to Data PumpIntroduction to Data PumpIntroduction to Data PumpIntroduction to Data Pump

�� Data Pump Architecture & ImplementationData Pump Architecture & ImplementationData Pump Architecture & ImplementationData Pump Architecture & ImplementationData Pump Architecture & ImplementationData Pump Architecture & ImplementationData Pump Architecture & ImplementationData Pump Architecture & Implementation

�� Benefits of Data Pump UtilityBenefits of Data Pump UtilityBenefits of Data Pump UtilityBenefits of Data Pump UtilityBenefits of Data Pump UtilityBenefits of Data Pump UtilityBenefits of Data Pump UtilityBenefits of Data Pump Utility

�� Data Pump vs. Exp/Imp Data Pump vs. Exp/Imp Data Pump vs. Exp/Imp Data Pump vs. Exp/Imp Data Pump vs. Exp/Imp Data Pump vs. Exp/Imp Data Pump vs. Exp/Imp Data Pump vs. Exp/Imp

�� DBMS_DATAPUMP packageDBMS_DATAPUMP packageDBMS_DATAPUMP packageDBMS_DATAPUMP packageDBMS_DATAPUMP packageDBMS_DATAPUMP packageDBMS_DATAPUMP packageDBMS_DATAPUMP package

�� Questions & AnswersQuestions & AnswersQuestions & AnswersQuestions & AnswersQuestions & AnswersQuestions & AnswersQuestions & AnswersQuestions & Answers

Page 3: Data Pump

Oracle Data Loading/Unloading OptionsOracle Data Loading/Unloading OptionsOracle Data Loading/Unloading OptionsOracle Data Loading/Unloading OptionsOracle Data Loading/Unloading OptionsOracle Data Loading/Unloading OptionsOracle Data Loading/Unloading OptionsOracle Data Loading/Unloading Options

�� INSERT Sql CommandINSERT Sql CommandINSERT Sql CommandINSERT Sql CommandINSERT Sql CommandINSERT Sql CommandINSERT Sql CommandINSERT Sql Command

�� MERGE Sql CommandMERGE Sql CommandMERGE Sql CommandMERGE Sql CommandMERGE Sql CommandMERGE Sql CommandMERGE Sql CommandMERGE Sql Command

�� Exp/Imp utilityExp/Imp utilityExp/Imp utilityExp/Imp utilityExp/Imp utilityExp/Imp utilityExp/Imp utilityExp/Imp utility

�� PL/SQL API UTL_FILE PL/SQL API UTL_FILE PL/SQL API UTL_FILE PL/SQL API UTL_FILE PL/SQL API UTL_FILE PL/SQL API UTL_FILE PL/SQL API UTL_FILE PL/SQL API UTL_FILE

�� SQL*LoaderSQL*LoaderSQL*LoaderSQL*LoaderSQL*LoaderSQL*LoaderSQL*LoaderSQL*Loader

�� External TablesExternal TablesExternal TablesExternal TablesExternal TablesExternal TablesExternal TablesExternal Tables

�� PL/SQL Bulk Collect PL/SQL Bulk Collect PL/SQL Bulk Collect PL/SQL Bulk Collect PL/SQL Bulk Collect PL/SQL Bulk Collect PL/SQL Bulk Collect PL/SQL Bulk Collect …………………… ForAllForAllForAllForAllForAllForAllForAllForAll

�� Data PumpData PumpData PumpData PumpData PumpData PumpData PumpData Pump

Page 4: Data Pump

Why Export/Import or DataPumpWhy Export/Import or DataPumpWhy Export/Import or DataPumpWhy Export/Import or DataPumpWhy Export/Import or DataPumpWhy Export/Import or DataPumpWhy Export/Import or DataPumpWhy Export/Import or DataPump

�� For Moving Data between DatabaseFor Moving Data between DatabaseFor Moving Data between DatabaseFor Moving Data between DatabaseFor Moving Data between DatabaseFor Moving Data between DatabaseFor Moving Data between DatabaseFor Moving Data between Database

Development QA ProductionDevelopment QA ProductionDevelopment QA ProductionDevelopment QA ProductionDevelopment QA ProductionDevelopment QA ProductionDevelopment QA ProductionDevelopment QA Production

�� Taking Logical BackupTaking Logical BackupTaking Logical BackupTaking Logical BackupTaking Logical BackupTaking Logical BackupTaking Logical BackupTaking Logical Backup

�� Archiving Data for future ReferenceArchiving Data for future ReferenceArchiving Data for future ReferenceArchiving Data for future ReferenceArchiving Data for future ReferenceArchiving Data for future ReferenceArchiving Data for future ReferenceArchiving Data for future Reference

�� Migrating DatabaseMigrating DatabaseMigrating DatabaseMigrating DatabaseMigrating DatabaseMigrating DatabaseMigrating DatabaseMigrating Database

��Operating System[MS] Operating System [Linux]Operating System[MS] Operating System [Linux]Operating System[MS] Operating System [Linux]Operating System[MS] Operating System [Linux]Operating System[MS] Operating System [Linux]Operating System[MS] Operating System [Linux]Operating System[MS] Operating System [Linux]Operating System[MS] Operating System [Linux]

��Oracle Version [9i] 10gOracle Version [9i] 10gOracle Version [9i] 10gOracle Version [9i] 10gOracle Version [9i] 10gOracle Version [9i] 10gOracle Version [9i] 10gOracle Version [9i] 10g

��One Character Set Other Character SetOne Character Set Other Character SetOne Character Set Other Character SetOne Character Set Other Character SetOne Character Set Other Character SetOne Character Set Other Character SetOne Character Set Other Character SetOne Character Set Other Character Set

Page 5: Data Pump

Export/Import RestrictionsExport/Import RestrictionsExport/Import RestrictionsExport/Import RestrictionsExport/Import RestrictionsExport/Import RestrictionsExport/Import RestrictionsExport/Import Restrictions

�� Cannot use for Large DatabasesCannot use for Large DatabasesCannot use for Large DatabasesCannot use for Large DatabasesCannot use for Large DatabasesCannot use for Large DatabasesCannot use for Large DatabasesCannot use for Large Databases

�� Slow Data Loading and UnloadingSlow Data Loading and UnloadingSlow Data Loading and UnloadingSlow Data Loading and UnloadingSlow Data Loading and UnloadingSlow Data Loading and UnloadingSlow Data Loading and UnloadingSlow Data Loading and Unloading

�� Limited fineLimited fineLimited fineLimited fineLimited fineLimited fineLimited fineLimited fine--------grained object selectiongrained object selectiongrained object selectiongrained object selectiongrained object selectiongrained object selectiongrained object selectiongrained object selection

�� Limited Job MonitoringLimited Job MonitoringLimited Job MonitoringLimited Job MonitoringLimited Job MonitoringLimited Job MonitoringLimited Job MonitoringLimited Job Monitoring

�� No callable APINo callable APINo callable APINo callable APINo callable APINo callable APINo callable APINo callable API

�� Limited MaintenanceLimited MaintenanceLimited MaintenanceLimited MaintenanceLimited MaintenanceLimited MaintenanceLimited MaintenanceLimited Maintenance

Page 6: Data Pump

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP -------- IntroductionIntroductionIntroductionIntroductionIntroductionIntroductionIntroductionIntroduction

� Oracle Data/Metadata Loading/Unloading utilityOracle Data/Metadata Loading/Unloading utilityOracle Data/Metadata Loading/Unloading utilityOracle Data/Metadata Loading/Unloading utility� Use PL/SQL APIUse PL/SQL APIUse PL/SQL APIUse PL/SQL API

� DBMS_DATAPUMP for Data written in direct path stream formatDBMS_DATAPUMP for Data written in direct path stream formatDBMS_DATAPUMP for Data written in direct path stream formatDBMS_DATAPUMP for Data written in direct path stream format� DBMS_METADATA for Metadata written in XML formatDBMS_METADATA for Metadata written in XML formatDBMS_METADATA for Metadata written in XML formatDBMS_METADATA for Metadata written in XML format

� New client expdp and impdpNew client expdp and impdpNew client expdp and impdpNew client expdp and impdp� High speed server based utilityHigh speed server based utilityHigh speed server based utilityHigh speed server based utility� Create platform independent dump file in binary Create platform independent dump file in binary Create platform independent dump file in binary Create platform independent dump file in binary

proprietary formatproprietary formatproprietary formatproprietary format� Support parallel, bulk data & metadata movementSupport parallel, bulk data & metadata movementSupport parallel, bulk data & metadata movementSupport parallel, bulk data & metadata movement� Available with all Oracle 10g version for all supported Available with all Oracle 10g version for all supported Available with all Oracle 10g version for all supported Available with all Oracle 10g version for all supported

platform platform platform platform � Can be monitored remotelyCan be monitored remotelyCan be monitored remotelyCan be monitored remotely� Stop and Restart anytimeStop and Restart anytimeStop and Restart anytimeStop and Restart anytime� Allow Data movement thru database linksAllow Data movement thru database linksAllow Data movement thru database linksAllow Data movement thru database links

Page 7: Data Pump

DATA PUMP ArchitectureDATA PUMP ArchitectureDATA PUMP ArchitectureDATA PUMP ArchitectureDATA PUMP ArchitectureDATA PUMP ArchitectureDATA PUMP ArchitectureDATA PUMP Architecture

ORACLE_ORACLE_

DATAPUMPDATAPUMP

Read/WriteRead/Write

ORACLE_ORACLE_

LOADERLOADER

ReadReadDIRECT DIRECT

PATH APIPATH API

METADATA API: METADATA API:

DBMS_METADATADBMS_METADATA

Expdp Expdp

ClientClient

Impdp Impdp

ClientClientGrid ControlGrid Control

DB ControlDB Control

Other Other

ClientsClients

DBMS_DATAPUMPDBMS_DATAPUMPData / MetaData Movement EngineData / MetaData Movement Engine

External Table APIExternal Table API

DATA PUMPDATA PUMP

SQL SQL

LoaderLoader

Page 8: Data Pump

Expdp Expdp

ClientClient

Server 1Server 1 Server 2Server 2

Server Process

NNETWORKETWORK_L_LINKINK

DbLinkDbLink

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– New Export ClientNew Export ClientNew Export ClientNew Export ClientNew Export ClientNew Export ClientNew Export ClientNew Export Client

DATA PUMP JOB

Dump FileDump File

SetSet

Dump FileDump File

SetSet

Server1>expdp indy/indy dumpfile=indy.dmp logfile=indy.log full=yServer2>expdp indy/indy@server1 dumpfile=indy.dmp logfile=indy.log full=yServer2>expdp indy/indy network_link=server1 dumpfile=indy.dmp logfile=indy.log full=y

DATA PUMP JOB

Page 9: Data Pump

ImpdpImpdp

ClientClient

Server 1Server 1 Server 2Server 2

Server Process

NNETWORKETWORK_L_LINKINK

DbLinkDbLink

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– New Export ClientNew Export ClientNew Export ClientNew Export ClientNew Export ClientNew Export ClientNew Export ClientNew Export Client

DATA PUMP JOB

Dump FileDump File

SetSet

Server1>Server1>Server1>Server1>impdpimpdpimpdpimpdp indy/indy dumpfile=indy.dmp logfile=indy.log full=yindy/indy dumpfile=indy.dmp logfile=indy.log full=yindy/indy dumpfile=indy.dmp logfile=indy.log full=yindy/indy dumpfile=indy.dmp logfile=indy.log full=yServer2>Server2>Server2>Server2>impdpimpdpimpdpimpdp indy/indyindy/indyindy/indyindy/indy@server1@server1@server1@server1 dumpfile=indy.dmp dumpfile=indy.dmp dumpfile=indy.dmp dumpfile=indy.dmp logfile=indy.log full=ylogfile=indy.log full=ylogfile=indy.log full=ylogfile=indy.log full=y

Server2>impdp indy/indy network_link=server1 dumpfile=indy.dmp logfile=indy.log full=y

DATA PUMP JOB

Page 10: Data Pump

DirectDirect

PathPath

External External

TablesTables

Data-AccessMethods

Dump FileDump File

SetSet

Source DatabaseSource DatabaseSource DatabaseSource DatabaseSource DatabaseSource DatabaseSource DatabaseSource Database

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Data Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading Features

Page 11: Data Pump

When DIRECT Path is not used by DATAPUMPWhen DIRECT Path is not used by DATAPUMPWhen DIRECT Path is not used by DATAPUMPWhen DIRECT Path is not used by DATAPUMPWhen DIRECT Path is not used by DATAPUMPWhen DIRECT Path is not used by DATAPUMPWhen DIRECT Path is not used by DATAPUMPWhen DIRECT Path is not used by DATAPUMP

� Loading tables with Global index on partitioned tables Loading tables with Global index on partitioned tables Loading tables with Global index on partitioned tables Loading tables with Global index on partitioned tables existsexistsexistsexists

� Loading tables with domain index exists for a LOB columnLoading tables with domain index exists for a LOB columnLoading tables with domain index exists for a LOB columnLoading tables with domain index exists for a LOB column

� Loading Clustered tablesLoading Clustered tablesLoading Clustered tablesLoading Clustered tables

� Loading tables with active TriggersLoading tables with active TriggersLoading tables with active TriggersLoading tables with active Triggers

� Loading and Unloading tables with encrypted columnsLoading and Unloading tables with encrypted columnsLoading and Unloading tables with encrypted columnsLoading and Unloading tables with encrypted columns

� Loading tables with fineLoading tables with fineLoading tables with fineLoading tables with fine----grained access control enabled for grained access control enabled for grained access control enabled for grained access control enabled for insertsinsertsinsertsinserts

� Loading table containing BFILE or VARRAY columnsLoading table containing BFILE or VARRAY columnsLoading table containing BFILE or VARRAY columnsLoading table containing BFILE or VARRAY columns

Page 12: Data Pump

Source DatabaseSource Database

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Data Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading Features

Fine-GrainedFiltering

Procedure/FunctionProcedure/Function

Package/Trigger/viewsPackage/Trigger/views

Grant/ConstraintsGrant/Constraints

EXCLUDE/INCLUDEEXCLUDE/INCLUDE

Dump FileDump File

SetSet

Data-AccessMethods

Include=functionInclude=functionInclude=functionInclude=functionInclude=functionInclude=functionInclude=functionInclude=function

Include=procedureInclude=procedureInclude=procedureInclude=procedureInclude=procedureInclude=procedureInclude=procedureInclude=procedure

Include=triggerInclude=triggerInclude=triggerInclude=triggerInclude=triggerInclude=triggerInclude=triggerInclude=trigger

Include=viewInclude=viewInclude=viewInclude=viewInclude=viewInclude=viewInclude=viewInclude=view

include=table:include=table:include=table:include=table:include=table:include=table:include=table:include=table:””””””””in (in (in (in (in (in (in (in (‘‘‘‘‘‘‘‘empempempempempempempemp’’’’’’’’,,,,,,,,’’’’’’’’deptdeptdeptdeptdeptdeptdeptdept’’’’’’’’))))))))””””””””

Exclude=indexExclude=indexExclude=indexExclude=indexExclude=indexExclude=indexExclude=indexExclude=index

Exclude=triggerExclude=triggerExclude=triggerExclude=triggerExclude=triggerExclude=triggerExclude=triggerExclude=trigger

Exclude=view:Exclude=view:Exclude=view:Exclude=view:Exclude=view:Exclude=view:Exclude=view:Exclude=view:””””””””like like like like like like like like ‘‘‘‘‘‘‘‘app%app%app%app%app%app%app%app%’’’’’’’’””””””””

Page 13: Data Pump

Source DatabaseSource Database

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Data Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading Features

Data-AccessMethods

Fine-GrainedFiltering

Parallelism

Dump File SetDump File Set

expdp hr/hr expdp hr/hr expdp hr/hr expdp hr/hr expdp hr/hr expdp hr/hr expdp hr/hr expdp hr/hr parallel=3parallel=3parallel=3parallel=3parallel=3parallel=3parallel=3parallel=3

PARALLELPARALLELPARALLELPARALLEL

To specify the number of To specify the number of To specify the number of To specify the number of Worker processesWorker processesWorker processesWorker processes

Page 14: Data Pump

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Data Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesSource DatabaseSource Database

Data-AccessMethods

Fine-GrainedFiltering

Parallelism Estimate

ESTIMATEESTIMATEESTIMATEESTIMATEESTIMATEESTIMATEESTIMATEESTIMATE ---------------- Specifies space used by each Table dataSpecifies space used by each Table dataSpecifies space used by each Table dataSpecifies space used by each Table dataSpecifies space used by each Table dataSpecifies space used by each Table dataSpecifies space used by each Table dataSpecifies space used by each Table data

----------------Only for Data and not for MetadataOnly for Data and not for MetadataOnly for Data and not for MetadataOnly for Data and not for MetadataOnly for Data and not for MetadataOnly for Data and not for MetadataOnly for Data and not for MetadataOnly for Data and not for Metadata

----------------Available in the Logfile or output deviceAvailable in the Logfile or output deviceAvailable in the Logfile or output deviceAvailable in the Logfile or output deviceAvailable in the Logfile or output deviceAvailable in the Logfile or output deviceAvailable in the Logfile or output deviceAvailable in the Logfile or output device... ... ... ... exported exported exported exported ““““HR"."PRODUCT" 136.4 MB 649114 rowsHR"."PRODUCT" 136.4 MB 649114 rowsHR"."PRODUCT" 136.4 MB 649114 rowsHR"."PRODUCT" 136.4 MB 649114 rows

ESTIMATE_ONLYESTIMATE_ONLYESTIMATE_ONLYESTIMATE_ONLY -------- To determine space required for ExportTo determine space required for ExportTo determine space required for ExportTo determine space required for Export

-------- No Data is actually exportedNo Data is actually exportedNo Data is actually exportedNo Data is actually exported

$ expdp scott/tiger ESTIMATE_ONLY=Y$ expdp scott/tiger ESTIMATE_ONLY=Y$ expdp scott/tiger ESTIMATE_ONLY=Y$ expdp scott/tiger ESTIMATE_ONLY=Y

Page 15: Data Pump

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Data Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesData Unloading FeaturesSource DatabaseSource Database

Data-AccessMethods

Fine-GrainedFiltering

Parallelism EstimateMonitor

Long Jobs

JOB_NAMEJOB_NAMEJOB_NAMEJOB_NAMEJOB_NAMEJOB_NAMEJOB_NAMEJOB_NAME ---------------- To Specify the Name to the JobTo Specify the Name to the JobTo Specify the Name to the JobTo Specify the Name to the JobTo Specify the Name to the JobTo Specify the Name to the JobTo Specify the Name to the JobTo Specify the Name to the Job

If not given, System generated name is givenIf not given, System generated name is givenIf not given, System generated name is givenIf not given, System generated name is givenIf not given, System generated name is givenIf not given, System generated name is givenIf not given, System generated name is givenIf not given, System generated name is given

expdp hr/hr JOB_NAME=fullScott expdp hr/hr JOB_NAME=fullScott expdp hr/hr JOB_NAME=fullScott expdp hr/hr JOB_NAME=fullScott ……………………

ATTACHATTACHATTACHATTACHATTACHATTACHATTACHATTACH ---------------- To Attach to existing JobTo Attach to existing JobTo Attach to existing JobTo Attach to existing JobTo Attach to existing JobTo Attach to existing JobTo Attach to existing JobTo Attach to existing Job

expdp hr/hr ATTACH= fullScottexpdp hr/hr ATTACH= fullScottexpdp hr/hr ATTACH= fullScottexpdp hr/hr ATTACH= fullScott

Page 16: Data Pump

OWNER_NAME,OWNER_NAME,

JOB_NAMEJOB_NAME

DBA_DATAPUMP_JOBSDBA_DATAPUMP_JOBS

DBA_DATAPUMP_SESSIONSDBA_DATAPUMP_SESSIONS

V$SESSIONV$SESSION

V$SESSION_LONOPSV$SESSION_LONOPS

SADDRSADDR

Monitor the Progress of Long-

running Data Pump Job

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Dictionary ViewsDictionary ViewsDictionary ViewsDictionary ViewsDictionary ViewsDictionary ViewsDictionary ViewsDictionary Views MonitorLong Jobs

Page 17: Data Pump

Dump File SetDump File SetData,Metadata,Data,Metadata,Master TableMaster Table

Master Master

Control Control

ProcessProcess

Master Master

TableTable

DBA

Worker 1: Worker 1:

Worker 2: Worker 2:

Worker 3: Worker 3:

DBA

Client Client AA’’s s

Shadow Shadow ProcessProcess

Status QueueStatus Queue

Client Client BB’’s s

Shadow Shadow ProcessProcess

Command Command & Control & Control

QueueQueue

DynamicDynamicCommandsCommands[Stop,Start][Stop,Start]

P1

P2

DATA PUMP IMPLEMENTATIONDATA PUMP IMPLEMENTATIONDATA PUMP IMPLEMENTATIONDATA PUMP IMPLEMENTATIONDATA PUMP IMPLEMENTATIONDATA PUMP IMPLEMENTATIONDATA PUMP IMPLEMENTATIONDATA PUMP IMPLEMENTATION

DBA DBA

DATAPUMP DATAPUMP

JOBSJOBS

Log FileLog File

DBMS_DATAPUMP.OPENDBMS_DATAPUMP.OPENDBMS_DATAPUMP.OPENDBMS_DATAPUMP.OPEN

MetadataMetadata

Direct PathDirect Path

External TableExternal Table

Page 18: Data Pump

Client Client AA’’s s

Shadow Shadow ProcessProcess

Master Master

TableTable

DATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process Components

�� Foreground process created with datapump calls Foreground process created with datapump calls Foreground process created with datapump calls Foreground process created with datapump calls Foreground process created with datapump calls Foreground process created with datapump calls Foreground process created with datapump calls Foreground process created with datapump calls like dbms_datapump.openlike dbms_datapump.openlike dbms_datapump.openlike dbms_datapump.openlike dbms_datapump.openlike dbms_datapump.openlike dbms_datapump.openlike dbms_datapump.open

�� Create a Job based on JOB_NAME parameterCreate a Job based on JOB_NAME parameterCreate a Job based on JOB_NAME parameterCreate a Job based on JOB_NAME parameterCreate a Job based on JOB_NAME parameterCreate a Job based on JOB_NAME parameterCreate a Job based on JOB_NAME parameterCreate a Job based on JOB_NAME parameter

�� Create Master TableCreate Master TableCreate Master TableCreate Master TableCreate Master TableCreate Master TableCreate Master TableCreate Master Table

�� Create 2 Queues namely Create 2 Queues namely Create 2 Queues namely Create 2 Queues namely Create 2 Queues namely Create 2 Queues namely Create 2 Queues namely Create 2 Queues namely

�� Status Queue and Status Queue and Status Queue and Status Queue and Status Queue and Status Queue and Status Queue and Status Queue and

�� Command & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control Queue

�� Create MCPCreate MCPCreate MCPCreate MCPCreate MCPCreate MCPCreate MCPCreate MCP

�� Give Status to the Client AGive Status to the Client AGive Status to the Client AGive Status to the Client AGive Status to the Client AGive Status to the Client AGive Status to the Client AGive Status to the Client A

�� Process goes away when client detachProcess goes away when client detachProcess goes away when client detachProcess goes away when client detachProcess goes away when client detachProcess goes away when client detachProcess goes away when client detachProcess goes away when client detachCommand Command & Control & Control

QueueQueue

Status Status QueueQueue

Master Master

Control Control

ProcessProcess

Page 19: Data Pump

Master Master

TableTable

DATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process Components

�� Table created within the Schema who initiated Table created within the Schema who initiated Table created within the Schema who initiated Table created within the Schema who initiated Table created within the Schema who initiated Table created within the Schema who initiated Table created within the Schema who initiated Table created within the Schema who initiated Expdp/ImpdpExpdp/ImpdpExpdp/ImpdpExpdp/ImpdpExpdp/ImpdpExpdp/ImpdpExpdp/ImpdpExpdp/Impdp

�� Table Name = JOB_NAME (If specified)Table Name = JOB_NAME (If specified)Table Name = JOB_NAME (If specified)Table Name = JOB_NAME (If specified)Table Name = JOB_NAME (If specified)Table Name = JOB_NAME (If specified)Table Name = JOB_NAME (If specified)Table Name = JOB_NAME (If specified)OROROROROROROROR

�� SYS_<operation>_<mode>_NN SYS_<operation>_<mode>_NN SYS_<operation>_<mode>_NN SYS_<operation>_<mode>_NN SYS_<operation>_<mode>_NN SYS_<operation>_<mode>_NN SYS_<operation>_<mode>_NN SYS_<operation>_<mode>_NN

where NN where NN where NN where NN where NN where NN where NN where NN �������� 22222222--------digit integer starting at 01digit integer starting at 01digit integer starting at 01digit integer starting at 01digit integer starting at 01digit integer starting at 01digit integer starting at 01digit integer starting at 01

Operation Operation Operation Operation Operation Operation Operation Operation �������� EXPORT | IMPORTEXPORT | IMPORTEXPORT | IMPORTEXPORT | IMPORTEXPORT | IMPORTEXPORT | IMPORTEXPORT | IMPORTEXPORT | IMPORT

Mode Mode Mode Mode Mode Mode Mode Mode �������� FULL | TABLESPACE | SCHEMAFULL | TABLESPACE | SCHEMAFULL | TABLESPACE | SCHEMAFULL | TABLESPACE | SCHEMAFULL | TABLESPACE | SCHEMAFULL | TABLESPACE | SCHEMAFULL | TABLESPACE | SCHEMAFULL | TABLESPACE | SCHEMA

TABLE| TRANSPORTABLETABLE| TRANSPORTABLETABLE| TRANSPORTABLETABLE| TRANSPORTABLETABLE| TRANSPORTABLETABLE| TRANSPORTABLETABLE| TRANSPORTABLETABLE| TRANSPORTABLE

�� Heart of Datapump Containing Dumpfile Set, Job Heart of Datapump Containing Dumpfile Set, Job Heart of Datapump Containing Dumpfile Set, Job Heart of Datapump Containing Dumpfile Set, Job Heart of Datapump Containing Dumpfile Set, Job Heart of Datapump Containing Dumpfile Set, Job Heart of Datapump Containing Dumpfile Set, Job Heart of Datapump Containing Dumpfile Set, Job parameters, Status of Exported/Imported database parameters, Status of Exported/Imported database parameters, Status of Exported/Imported database parameters, Status of Exported/Imported database parameters, Status of Exported/Imported database parameters, Status of Exported/Imported database parameters, Status of Exported/Imported database parameters, Status of Exported/Imported database objects, Location of Dumpfile etcobjects, Location of Dumpfile etcobjects, Location of Dumpfile etcobjects, Location of Dumpfile etcobjects, Location of Dumpfile etcobjects, Location of Dumpfile etcobjects, Location of Dumpfile etcobjects, Location of Dumpfile etc

Page 20: Data Pump

Master Master

Control Control

ProcessProcess

DATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process Components�� One Background process for each Datapump operationOne Background process for each Datapump operationOne Background process for each Datapump operationOne Background process for each Datapump operationOne Background process for each Datapump operationOne Background process for each Datapump operationOne Background process for each Datapump operationOne Background process for each Datapump operation

�� Ora_dmNN_<instanceName>Ora_dmNN_<instanceName>Ora_dmNN_<instanceName>Ora_dmNN_<instanceName>Ora_dmNN_<instanceName>Ora_dmNN_<instanceName>Ora_dmNN_<instanceName>Ora_dmNN_<instanceName>

�� Responsible forResponsible forResponsible forResponsible forResponsible forResponsible forResponsible forResponsible for

�� Assigning Data/Metadata Loading/Unloading to Assigning Data/Metadata Loading/Unloading to Assigning Data/Metadata Loading/Unloading to Assigning Data/Metadata Loading/Unloading to Assigning Data/Metadata Loading/Unloading to Assigning Data/Metadata Loading/Unloading to Assigning Data/Metadata Loading/Unloading to Assigning Data/Metadata Loading/Unloading to Workers ProcessWorkers ProcessWorkers ProcessWorkers ProcessWorkers ProcessWorkers ProcessWorkers ProcessWorkers Process

�� Maintain Job StateMaintain Job StateMaintain Job StateMaintain Job StateMaintain Job StateMaintain Job StateMaintain Job StateMaintain Job State

�� Establish and Maintain Dump file Set informationEstablish and Maintain Dump file Set informationEstablish and Maintain Dump file Set informationEstablish and Maintain Dump file Set informationEstablish and Maintain Dump file Set informationEstablish and Maintain Dump file Set informationEstablish and Maintain Dump file Set informationEstablish and Maintain Dump file Set information

�� Maintain Restart and dump file set information in Maintain Restart and dump file set information in Maintain Restart and dump file set information in Maintain Restart and dump file set information in Maintain Restart and dump file set information in Maintain Restart and dump file set information in Maintain Restart and dump file set information in Maintain Restart and dump file set information in Master TableMaster TableMaster TableMaster TableMaster TableMaster TableMaster TableMaster Table

�� Logging operationsLogging operationsLogging operationsLogging operationsLogging operationsLogging operationsLogging operationsLogging operations

�� Update Status QueueUpdate Status QueueUpdate Status QueueUpdate Status QueueUpdate Status QueueUpdate Status QueueUpdate Status QueueUpdate Status Queue

Page 21: Data Pump

Status QueueStatus Queue

DATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process Components

Status QueueStatus QueueStatus QueueStatus QueueStatus QueueStatus QueueStatus QueueStatus Queue

�� Populated by MCPPopulated by MCPPopulated by MCPPopulated by MCPPopulated by MCPPopulated by MCPPopulated by MCPPopulated by MCP

�� Consumed by Clients Shadow Process.Consumed by Clients Shadow Process.Consumed by Clients Shadow Process.Consumed by Clients Shadow Process.Consumed by Clients Shadow Process.Consumed by Clients Shadow Process.Consumed by Clients Shadow Process.Consumed by Clients Shadow Process.

�� Following information is available for clientsFollowing information is available for clientsFollowing information is available for clientsFollowing information is available for clientsFollowing information is available for clientsFollowing information is available for clientsFollowing information is available for clientsFollowing information is available for clients

�� Status of the JobStatus of the JobStatus of the JobStatus of the JobStatus of the JobStatus of the JobStatus of the JobStatus of the Job

�� Logging InformationLogging InformationLogging InformationLogging InformationLogging InformationLogging InformationLogging InformationLogging Information

�� Errors EncounteredErrors EncounteredErrors EncounteredErrors EncounteredErrors EncounteredErrors EncounteredErrors EncounteredErrors Encountered

�� Queue name like Queue name like Queue name like Queue name like Queue name like Queue name like Queue name like Queue name like KUPC$S_1_<JobQueTimestamp>KUPC$S_1_<JobQueTimestamp>KUPC$S_1_<JobQueTimestamp>KUPC$S_1_<JobQueTimestamp>KUPC$S_1_<JobQueTimestamp>KUPC$S_1_<JobQueTimestamp>KUPC$S_1_<JobQueTimestamp>KUPC$S_1_<JobQueTimestamp>KUPC$S_1_20060221135223KUPC$S_1_20060221135223KUPC$S_1_20060221135223KUPC$S_1_20060221135223KUPC$S_1_20060221135223KUPC$S_1_20060221135223KUPC$S_1_20060221135223KUPC$S_1_20060221135223

�� Queue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYS

�� Can check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log file

Page 22: Data Pump

Command Command & Control & Control

QueueQueue

DATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process Components

Command & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control QueueCommand & Control Queue

�� Used by MCP to send command and control of worker Used by MCP to send command and control of worker Used by MCP to send command and control of worker Used by MCP to send command and control of worker Used by MCP to send command and control of worker Used by MCP to send command and control of worker Used by MCP to send command and control of worker Used by MCP to send command and control of worker process.process.process.process.process.process.process.process.

�� Used by Client shadow process for executing Used by Client shadow process for executing Used by Client shadow process for executing Used by Client shadow process for executing Used by Client shadow process for executing Used by Client shadow process for executing Used by Client shadow process for executing Used by Client shadow process for executing Abort/Restart request of Datapump job to MCPAbort/Restart request of Datapump job to MCPAbort/Restart request of Datapump job to MCPAbort/Restart request of Datapump job to MCPAbort/Restart request of Datapump job to MCPAbort/Restart request of Datapump job to MCPAbort/Restart request of Datapump job to MCPAbort/Restart request of Datapump job to MCP

�� Bidirectional as MCP send and listen to the queueBidirectional as MCP send and listen to the queueBidirectional as MCP send and listen to the queueBidirectional as MCP send and listen to the queueBidirectional as MCP send and listen to the queueBidirectional as MCP send and listen to the queueBidirectional as MCP send and listen to the queueBidirectional as MCP send and listen to the queue

�� Queue name like Queue name like Queue name like Queue name like Queue name like Queue name like Queue name like Queue name like KUPC$C_1_<JobQueTimestamp>KUPC$C_1_<JobQueTimestamp>KUPC$C_1_<JobQueTimestamp>KUPC$C_1_<JobQueTimestamp>KUPC$C_1_<JobQueTimestamp>KUPC$C_1_<JobQueTimestamp>KUPC$C_1_<JobQueTimestamp>KUPC$C_1_<JobQueTimestamp>KUPC$C_1_20060221135223KUPC$C_1_20060221135223KUPC$C_1_20060221135223KUPC$C_1_20060221135223KUPC$C_1_20060221135223KUPC$C_1_20060221135223KUPC$C_1_20060221135223KUPC$C_1_20060221135223

�� Queue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYSQueue is owned by SYS

�� Can check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log fileCan check the name in Alert.log file

Page 23: Data Pump

Worker 1: Worker 1: MetadataMetadata

Worker 2: Worker 2: Direct Path Direct Path

datadata

Worker 3: Worker 3: External External TableTable

DATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process Components

�� Number of Process depend on the value of PARALLEL Number of Process depend on the value of PARALLEL Number of Process depend on the value of PARALLEL Number of Process depend on the value of PARALLEL Number of Process depend on the value of PARALLEL Number of Process depend on the value of PARALLEL Number of Process depend on the value of PARALLEL Number of Process depend on the value of PARALLEL parameter.parameter.parameter.parameter.parameter.parameter.parameter.parameter.

�� Responsible for Loading/Unloading of Data and Responsible for Loading/Unloading of Data and Responsible for Loading/Unloading of Data and Responsible for Loading/Unloading of Data and Responsible for Loading/Unloading of Data and Responsible for Loading/Unloading of Data and Responsible for Loading/Unloading of Data and Responsible for Loading/Unloading of Data and Metadata.Metadata.Metadata.Metadata.Metadata.Metadata.Metadata.Metadata.

�� Background process of the form Background process of the form Background process of the form Background process of the form Background process of the form Background process of the form Background process of the form Background process of the form Ora_DWnn_<instanceName> Ora_DWnn_<instanceName> Ora_DWnn_<instanceName> Ora_DWnn_<instanceName> Ora_DWnn_<instanceName> Ora_DWnn_<instanceName> Ora_DWnn_<instanceName> Ora_DWnn_<instanceName>

�� Describe what object it is working on like Tables or Describe what object it is working on like Tables or Describe what object it is working on like Tables or Describe what object it is working on like Tables or Describe what object it is working on like Tables or Describe what object it is working on like Tables or Describe what object it is working on like Tables or Describe what object it is working on like Tables or Indexes or views and so onIndexes or views and so onIndexes or views and so onIndexes or views and so onIndexes or views and so onIndexes or views and so onIndexes or views and so onIndexes or views and so on

�� Send information about the current status of Database Send information about the current status of Database Send information about the current status of Database Send information about the current status of Database Send information about the current status of Database Send information about the current status of Database Send information about the current status of Database Send information about the current status of Database objects like Pending, Completed, Failed and so onobjects like Pending, Completed, Failed and so onobjects like Pending, Completed, Failed and so onobjects like Pending, Completed, Failed and so onobjects like Pending, Completed, Failed and so onobjects like Pending, Completed, Failed and so onobjects like Pending, Completed, Failed and so onobjects like Pending, Completed, Failed and so on

Page 24: Data Pump

Dump File Dump File SetSet

DATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process ComponentsDATA PUMP Process Components�� Represented by DUMPFILE parameter.Represented by DUMPFILE parameter.Represented by DUMPFILE parameter.Represented by DUMPFILE parameter.Represented by DUMPFILE parameter.Represented by DUMPFILE parameter.Represented by DUMPFILE parameter.Represented by DUMPFILE parameter.

�� Contains the Data as well as metadata informationContains the Data as well as metadata informationContains the Data as well as metadata informationContains the Data as well as metadata informationContains the Data as well as metadata informationContains the Data as well as metadata informationContains the Data as well as metadata informationContains the Data as well as metadata information

�� Location depend on the DIRECTORY settingLocation depend on the DIRECTORY settingLocation depend on the DIRECTORY settingLocation depend on the DIRECTORY settingLocation depend on the DIRECTORY settingLocation depend on the DIRECTORY settingLocation depend on the DIRECTORY settingLocation depend on the DIRECTORY setting

SQL>CREATE DIRECTORY dr1 AS SQL>CREATE DIRECTORY dr1 AS SQL>CREATE DIRECTORY dr1 AS SQL>CREATE DIRECTORY dr1 AS SQL>CREATE DIRECTORY dr1 AS SQL>CREATE DIRECTORY dr1 AS SQL>CREATE DIRECTORY dr1 AS SQL>CREATE DIRECTORY dr1 AS ‘‘‘‘‘‘‘‘/oradata/dpdir/oradata/dpdir/oradata/dpdir/oradata/dpdir/oradata/dpdir/oradata/dpdir/oradata/dpdir/oradata/dpdir’’’’’’’’;;;;;;;;

SQL>GRANT READ ON DIRECTORY dr1 TO hr; SQL>GRANT READ ON DIRECTORY dr1 TO hr; SQL>GRANT READ ON DIRECTORY dr1 TO hr; SQL>GRANT READ ON DIRECTORY dr1 TO hr; SQL>GRANT READ ON DIRECTORY dr1 TO hr; SQL>GRANT READ ON DIRECTORY dr1 TO hr; SQL>GRANT READ ON DIRECTORY dr1 TO hr; SQL>GRANT READ ON DIRECTORY dr1 TO hr; ��������ImportImportImportImportImportImportImportImport

SQL>GRANT WRITE ON DIRECTORY dr1 TO hr; SQL>GRANT WRITE ON DIRECTORY dr1 TO hr; SQL>GRANT WRITE ON DIRECTORY dr1 TO hr; SQL>GRANT WRITE ON DIRECTORY dr1 TO hr; SQL>GRANT WRITE ON DIRECTORY dr1 TO hr; SQL>GRANT WRITE ON DIRECTORY dr1 TO hr; SQL>GRANT WRITE ON DIRECTORY dr1 TO hr; SQL>GRANT WRITE ON DIRECTORY dr1 TO hr; ��������ExportExportExportExportExportExportExportExport

Page 25: Data Pump

Use DIRECTORY Parameter e.g Use DIRECTORY Parameter e.g

DIRECTORY=DIRECTORY=DR1DR12

PERPER-- FILE Directory Specifications e.g FILE Directory Specifications e.g

DUMPFILE=DUMPFILE=DR1DR1::ab.dmpab.dmp1

Use DATA_PUMP_DIR Env Setting e.g. Use DATA_PUMP_DIR Env Setting e.g.

$ $ DATA_PUMP_DIR=DATA_PUMP_DIR=DR3DR33

Use Default DATA_PUMP_DIR Database Use Default DATA_PUMP_DIR Database

Setting e.g.Setting e.g.

Default to $ORACLE_HOME/rdbms/logDefault to $ORACLE_HOME/rdbms/log4

DATA PUMP Fileset Location PreferencesDATA PUMP Fileset Location PreferencesDATA PUMP Fileset Location PreferencesDATA PUMP Fileset Location PreferencesDATA PUMP Fileset Location PreferencesDATA PUMP Fileset Location PreferencesDATA PUMP Fileset Location PreferencesDATA PUMP Fileset Location Preferences

Page 26: Data Pump

DUMPFILE DUMPFILE DUMPFILE DUMPFILE DUMPFILE DUMPFILE DUMPFILE DUMPFILE ---------------- Used for creating Dump FilesUsed for creating Dump FilesUsed for creating Dump FilesUsed for creating Dump FilesUsed for creating Dump FilesUsed for creating Dump FilesUsed for creating Dump FilesUsed for creating Dump Files

LOGFILE LOGFILE LOGFILE LOGFILE LOGFILE LOGFILE LOGFILE LOGFILE ---------------- Used for Creating Log file Used for Creating Log file Used for Creating Log file Used for Creating Log file Used for Creating Log file Used for Creating Log file Used for Creating Log file Used for Creating Log file

SQLFILE SQLFILE SQLFILE SQLFILE SQLFILE SQLFILE SQLFILE SQLFILE ---------------- Used for DDL Script FileUsed for DDL Script FileUsed for DDL Script FileUsed for DDL Script FileUsed for DDL Script FileUsed for DDL Script FileUsed for DDL Script FileUsed for DDL Script File

DATA PUMP different File TypesDATA PUMP different File TypesDATA PUMP different File TypesDATA PUMP different File TypesDATA PUMP different File TypesDATA PUMP different File TypesDATA PUMP different File TypesDATA PUMP different File Types

Page 27: Data Pump

$ expdp Id/Pass DIRECTORY=abc DUMPFLE=indy.dmp PARALLEL=4$ expdp Id/Pass DIRECTORY=abc DUMPFLE=indy.dmp PARALLEL=4

Command Line InterfaceCommand Line Interface

$ expdp PARFILE=indy.par$ expdp PARFILE=indy.par

Parameter File InterfaceParameter File Interface

DATA PUMP Export InterfacesDATA PUMP Export InterfacesDATA PUMP Export InterfacesDATA PUMP Export InterfacesDATA PUMP Export InterfacesDATA PUMP Export InterfacesDATA PUMP Export InterfacesDATA PUMP Export Interfaces

Page 28: Data Pump

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Different ModesDifferent ModesDifferent ModesDifferent ModesDifferent ModesDifferent ModesDifferent ModesDifferent Modes

Database Level with FULL=YDatabase Level with FULL=YDatabase Level with FULL=YDatabase Level with FULL=YDatabase Level with FULL=YDatabase Level with FULL=YDatabase Level with FULL=YDatabase Level with FULL=YDDDDDDDD

A A A A A A A A

T T T T T T T T

A A A A A A A A

B B B B B B B B

A A A A A A A A

SSSSSSSS

EEEEEEEE

Need EXP_FULL_DATABASE roleNeed EXP_FULL_DATABASE roleNeed EXP_FULL_DATABASE roleNeed EXP_FULL_DATABASE roleNeed EXP_FULL_DATABASE roleNeed EXP_FULL_DATABASE roleNeed EXP_FULL_DATABASE roleNeed EXP_FULL_DATABASE role

Tablespace Level with TABLESPACE=usersTablespace Level with TABLESPACE=usersTablespace Level with TABLESPACE=usersTablespace Level with TABLESPACE=usersTablespace Level with TABLESPACE=usersTablespace Level with TABLESPACE=usersTablespace Level with TABLESPACE=usersTablespace Level with TABLESPACE=usersTTTTTTTTAAAAAAAABBBBBBBBLLLLLLLLEEEEEEEESSSSSSSSPPPPPPPPAAAAAAAACCCCCCCCEEEEEEEE

Need EXP_FULL_DATABASE role Need EXP_FULL_DATABASE role Need EXP_FULL_DATABASE role Need EXP_FULL_DATABASE role Need EXP_FULL_DATABASE role Need EXP_FULL_DATABASE role Need EXP_FULL_DATABASE role Need EXP_FULL_DATABASE role -------- New in 10gNew in 10gNew in 10gNew in 10gNew in 10gNew in 10gNew in 10gNew in 10g

Including Transportable TablespaceIncluding Transportable Tablespace

Schema Level with SCHEMAS = hrSchema Level with SCHEMAS = hrSchema Level with SCHEMAS = hrSchema Level with SCHEMAS = hrSchema Level with SCHEMAS = hrSchema Level with SCHEMAS = hrSchema Level with SCHEMAS = hrSchema Level with SCHEMAS = hr

SSSSSSSS

C C C C C C C C

H H H H H H H H

E E E E E E E E

MMMMMMMM

AAAAAAAA

Default Mode.Default Mode.Default Mode.Default Mode.Default Mode.Default Mode.Default Mode.Default Mode.

EXP_FULL_DATABASE role allow to specify EXP_FULL_DATABASE role allow to specify EXP_FULL_DATABASE role allow to specify EXP_FULL_DATABASE role allow to specify EXP_FULL_DATABASE role allow to specify EXP_FULL_DATABASE role allow to specify EXP_FULL_DATABASE role allow to specify EXP_FULL_DATABASE role allow to specify list of Schemaslist of Schemaslist of Schemaslist of Schemaslist of Schemaslist of Schemaslist of Schemaslist of Schemas

Only Tables from same Schema can be Only Tables from same Schema can be Only Tables from same Schema can be Only Tables from same Schema can be Only Tables from same Schema can be Only Tables from same Schema can be Only Tables from same Schema can be Only Tables from same Schema can be specifiedspecifiedspecifiedspecifiedspecifiedspecifiedspecifiedspecified

TTTTTTTTAAAAAAAABBBBBBBBLLLLLLLLEEEEEEEE

Table Level with TABLES=empTable Level with TABLES=empTable Level with TABLES=empTable Level with TABLES=empTable Level with TABLES=empTable Level with TABLES=empTable Level with TABLES=empTable Level with TABLES=emp

Page 29: Data Pump

Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]

FILEFILEFILEFILEFILEFILEFILEFILELOGLOGLOGLOGLOGLOGLOGLOGGRANTS GRANTS GRANTS GRANTS GRANTS GRANTS GRANTS GRANTS INDEXESINDEXESINDEXESINDEXESINDEXESINDEXESINDEXESINDEXESCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSFEEDBACKFEEDBACKFEEDBACKFEEDBACKFEEDBACKFEEDBACKFEEDBACKFEEDBACKOWNEROWNEROWNEROWNEROWNEROWNEROWNEROWNERROWS=NROWS=NROWS=NROWS=NROWS=NROWS=NROWS=NROWS=NROWS=YROWS=YROWS=YROWS=YROWS=YROWS=YROWS=YROWS=YCONSISTENTCONSISTENTCONSISTENTCONSISTENTCONSISTENTCONSISTENTCONSISTENTCONSISTENT

Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]

DUMPFILEDUMPFILEDUMPFILEDUMPFILEDUMPFILEDUMPFILEDUMPFILEDUMPFILELOGFILELOGFILELOGFILELOGFILELOGFILELOGFILELOGFILELOGFILEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDESTATUSSTATUSSTATUSSTATUSSTATUSSTATUSSTATUSSTATUSSCHEMASSCHEMASSCHEMASSCHEMASSCHEMASSCHEMASSCHEMASSCHEMASCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCN

9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export

INCLUDE=GRANTSINCLUDE=GRANTSINCLUDE=GRANTSINCLUDE=GRANTSINCLUDE=GRANTSINCLUDE=GRANTSINCLUDE=GRANTSINCLUDE=GRANTS

Page 30: Data Pump

Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]Export [ exp ]

RECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRESUMABLERESUMABLERESUMABLERESUMABLERESUMABLERESUMABLERESUMABLERESUMABLERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMEUSERIDUSERIDUSERIDUSERIDUSERIDUSERIDUSERIDUSERIDVOLSIZEVOLSIZEVOLSIZEVOLSIZEVOLSIZEVOLSIZEVOLSIZEVOLSIZECOMPRESSCOMPRESSCOMPRESSCOMPRESSCOMPRESSCOMPRESSCOMPRESSCOMPRESSSTATISTICSSTATISTICSSTATISTICSSTATISTICSSTATISTICSSTATISTICSSTATISTICSSTATISTICSBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERDIRECTDIRECTDIRECTDIRECTDIRECTDIRECTDIRECTDIRECTNONENONENONENONENONENONENONENONE

Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]Data Pump Export [ expdp ]

NONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONETABLESPACESTABLESPACESTABLESPACESTABLESPACESTABLESPACESTABLESPACESTABLESPACESTABLESPACES

9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export 9i Export Vs 10g Datapump Export

Page 31: Data Pump

COMPRESSIONCOMPRESSIONCOMPRESSIONCOMPRESSION -------- To Compress Metadata in DumpfileTo Compress Metadata in DumpfileTo Compress Metadata in DumpfileTo Compress Metadata in Dumpfile

METADATA_ONLY | NONEMETADATA_ONLY | NONEMETADATA_ONLY | NONEMETADATA_ONLY | NONE

By Default it is METADATA_ONLYBy Default it is METADATA_ONLYBy Default it is METADATA_ONLYBy Default it is METADATA_ONLY

CONTENTCONTENTCONTENTCONTENTCONTENTCONTENTCONTENTCONTENT ---------------- To take export of Data|Metadata|BothTo take export of Data|Metadata|BothTo take export of Data|Metadata|BothTo take export of Data|Metadata|BothTo take export of Data|Metadata|BothTo take export of Data|Metadata|BothTo take export of Data|Metadata|BothTo take export of Data|Metadata|Both

DATA_ONLY | METADATA_ONLY| ALLDATA_ONLY | METADATA_ONLY| ALLDATA_ONLY | METADATA_ONLY| ALLDATA_ONLY | METADATA_ONLY| ALL

KEEP_MASTERKEEP_MASTERKEEP_MASTERKEEP_MASTER -------- To Keep Master Table in the SchemaTo Keep Master Table in the SchemaTo Keep Master Table in the SchemaTo Keep Master Table in the Schema

KEEP_MASTER=YKEEP_MASTER=YKEEP_MASTER=YKEEP_MASTER=Y

DATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP Export-------- New ParameterNew ParameterNew ParameterNew ParameterNew ParameterNew ParameterNew ParameterNew Parameter

Page 32: Data Pump

DATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP ExportDATA PUMP Export-------- New ParameterNew ParameterNew ParameterNew ParameterNew ParameterNew ParameterNew ParameterNew Parameter

NETWORK_LINKNETWORK_LINKNETWORK_LINKNETWORK_LINKNETWORK_LINKNETWORK_LINKNETWORK_LINKNETWORK_LINK ---------------- To specify name of Database Link NameTo specify name of Database Link NameTo specify name of Database Link NameTo specify name of Database Link NameTo specify name of Database Link NameTo specify name of Database Link NameTo specify name of Database Link NameTo specify name of Database Link Name

Enable Network ExportEnable Network ExportEnable Network ExportEnable Network ExportEnable Network ExportEnable Network ExportEnable Network ExportEnable Network Export

NOLOGFILENOLOGFILENOLOGFILENOLOGFILENOLOGFILENOLOGFILENOLOGFILENOLOGFILE ---------------- By default Logfile export.log is created By default Logfile export.log is created By default Logfile export.log is created By default Logfile export.log is created By default Logfile export.log is created By default Logfile export.log is created By default Logfile export.log is created By default Logfile export.log is created

VERSIONVERSIONVERSIONVERSION -------- To specify the Version of database objects to be To specify the Version of database objects to be To specify the Version of database objects to be To specify the Version of database objects to be

exportedexportedexportedexported

SAMPLESAMPLESAMPLESAMPLESAMPLESAMPLESAMPLESAMPLE ---------------- To specify the Percentage of data to be To specify the Percentage of data to be To specify the Percentage of data to be To specify the Percentage of data to be To specify the Percentage of data to be To specify the Percentage of data to be To specify the Percentage of data to be To specify the Percentage of data to be

sampledsampledsampledsampledsampledsampledsampledsampled

You can specify the specific table You can specify the specific table You can specify the specific table You can specify the specific table You can specify the specific table You can specify the specific table You can specify the specific table You can specify the specific table

SAMPLE=100SAMPLE=100SAMPLE=100SAMPLE=100SAMPLE=100SAMPLE=100SAMPLE=100SAMPLE=100

SAMPLE=SAMPLE=SAMPLE=SAMPLE=SAMPLE=SAMPLE=SAMPLE=SAMPLE=““““““““SCOTTSCOTTSCOTTSCOTTSCOTTSCOTTSCOTTSCOTT””””””””........””””””””DEPTDEPTDEPTDEPTDEPTDEPTDEPTDEPT””””””””:40:40:40:40:40:40:40:40

Page 33: Data Pump

$ expdp hr/hr FULL=Y PARALLEL=4$ expdp hr/hr FULL=Y PARALLEL=4$ expdp hr/hr FULL=Y PARALLEL=4$ expdp hr/hr FULL=Y PARALLEL=4$ expdp hr/hr FULL=Y PARALLEL=4$ expdp hr/hr FULL=Y PARALLEL=4$ expdp hr/hr FULL=Y PARALLEL=4$ expdp hr/hr FULL=Y PARALLEL=4

DUMPFILE=DR1:fullhr1%U.dmp,DUMPFILE=DR1:fullhr1%U.dmp,DUMPFILE=DR1:fullhr1%U.dmp,DUMPFILE=DR1:fullhr1%U.dmp,DUMPFILE=DR1:fullhr1%U.dmp,DUMPFILE=DR1:fullhr1%U.dmp,DUMPFILE=DR1:fullhr1%U.dmp,DUMPFILE=DR1:fullhr1%U.dmp,

DR2:fullhr2%U.dmp,DR2:fullhr2%U.dmp,DR2:fullhr2%U.dmp,DR2:fullhr2%U.dmp,DR2:fullhr2%U.dmp,DR2:fullhr2%U.dmp,DR2:fullhr2%U.dmp,DR2:fullhr2%U.dmp,

DR3:fullhr3%U.dmp,DR3:fullhr3%U.dmp,DR3:fullhr3%U.dmp,DR3:fullhr3%U.dmp,DR3:fullhr3%U.dmp,DR3:fullhr3%U.dmp,DR3:fullhr3%U.dmp,DR3:fullhr3%U.dmp,

DR4:fullhr4%U.dmp,DR4:fullhr4%U.dmp,DR4:fullhr4%U.dmp,DR4:fullhr4%U.dmp,DR4:fullhr4%U.dmp,DR4:fullhr4%U.dmp,DR4:fullhr4%U.dmp,DR4:fullhr4%U.dmp,

This will CreateThis will CreateThis will CreateThis will CreateThis will CreateThis will CreateThis will CreateThis will Create

•• Files as fullhr101.dmp, fullhr201.dmp and soFiles as fullhr101.dmp, fullhr201.dmp and soFiles as fullhr101.dmp, fullhr201.dmp and soFiles as fullhr101.dmp, fullhr201.dmp and soFiles as fullhr101.dmp, fullhr201.dmp and soFiles as fullhr101.dmp, fullhr201.dmp and soFiles as fullhr101.dmp, fullhr201.dmp and soFiles as fullhr101.dmp, fullhr201.dmp and so

•• Job name as SYS_EXPORT_FULL_01Job name as SYS_EXPORT_FULL_01Job name as SYS_EXPORT_FULL_01Job name as SYS_EXPORT_FULL_01Job name as SYS_EXPORT_FULL_01Job name as SYS_EXPORT_FULL_01Job name as SYS_EXPORT_FULL_01Job name as SYS_EXPORT_FULL_01

•• Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01

•• Use DR1,DR2,DR3,DR4 Directory defined in Use DR1,DR2,DR3,DR4 Directory defined in Use DR1,DR2,DR3,DR4 Directory defined in Use DR1,DR2,DR3,DR4 Directory defined in Use DR1,DR2,DR3,DR4 Directory defined in Use DR1,DR2,DR3,DR4 Directory defined in Use DR1,DR2,DR3,DR4 Directory defined in Use DR1,DR2,DR3,DR4 Directory defined in

DatabaseDatabaseDatabaseDatabaseDatabaseDatabaseDatabaseDatabase

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Example # 1Example # 1Example # 1Example # 1Example # 1Example # 1Example # 1Example # 1

Page 34: Data Pump

$ expdp hr/hr PARFILE= indy.par$ expdp hr/hr PARFILE= indy.par$ expdp hr/hr PARFILE= indy.par$ expdp hr/hr PARFILE= indy.par$ expdp hr/hr PARFILE= indy.par$ expdp hr/hr PARFILE= indy.par$ expdp hr/hr PARFILE= indy.par$ expdp hr/hr PARFILE= indy.par

DIRECTORY=DR1DIRECTORY=DR1DIRECTORY=DR1DIRECTORY=DR1DIRECTORY=DR1DIRECTORY=DR1DIRECTORY=DR1DIRECTORY=DR1

DUMPFILE=hr1%U.dmpDUMPFILE=hr1%U.dmpDUMPFILE=hr1%U.dmpDUMPFILE=hr1%U.dmpDUMPFILE=hr1%U.dmpDUMPFILE=hr1%U.dmpDUMPFILE=hr1%U.dmpDUMPFILE=hr1%U.dmp

SCHEMAS=HRSCHEMAS=HRSCHEMAS=HRSCHEMAS=HRSCHEMAS=HRSCHEMAS=HRSCHEMAS=HRSCHEMAS=HR

INCLUDE=PROCEDUREINCLUDE=PROCEDUREINCLUDE=PROCEDUREINCLUDE=PROCEDUREINCLUDE=PROCEDUREINCLUDE=PROCEDUREINCLUDE=PROCEDUREINCLUDE=PROCEDURE

INCLUDE=PACKAGEINCLUDE=PACKAGEINCLUDE=PACKAGEINCLUDE=PACKAGEINCLUDE=PACKAGEINCLUDE=PACKAGEINCLUDE=PACKAGEINCLUDE=PACKAGE

INCLUDE=VIEW:INCLUDE=VIEW:INCLUDE=VIEW:INCLUDE=VIEW:INCLUDE=VIEW:INCLUDE=VIEW:INCLUDE=VIEW:INCLUDE=VIEW:””””””””like like like like like like like like ‘‘‘‘‘‘‘‘VW_H%VW_H%VW_H%VW_H%VW_H%VW_H%VW_H%VW_H%’’’’’’’’ ““““““““

This will exportThis will exportThis will exportThis will exportThis will exportThis will exportThis will exportThis will export

•• All Procedure, Packages and views like VW_H All Procedure, Packages and views like VW_H All Procedure, Packages and views like VW_H All Procedure, Packages and views like VW_H All Procedure, Packages and views like VW_H All Procedure, Packages and views like VW_H All Procedure, Packages and views like VW_H All Procedure, Packages and views like VW_H

•• No Schema Definition/other System grants are exportedNo Schema Definition/other System grants are exportedNo Schema Definition/other System grants are exportedNo Schema Definition/other System grants are exportedNo Schema Definition/other System grants are exportedNo Schema Definition/other System grants are exportedNo Schema Definition/other System grants are exportedNo Schema Definition/other System grants are exported

•• Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01Master Table Name as SYS_EXPORT_FULL_01

•• Use DR1 Directory defined in DatabaseUse DR1 Directory defined in DatabaseUse DR1 Directory defined in DatabaseUse DR1 Directory defined in DatabaseUse DR1 Directory defined in DatabaseUse DR1 Directory defined in DatabaseUse DR1 Directory defined in DatabaseUse DR1 Directory defined in Database

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Example # 2Example # 2Example # 2Example # 2Example # 2Example # 2Example # 2Example # 2

Page 35: Data Pump

$ expdp hr/hr ATTACH = jobname$ expdp hr/hr ATTACH = jobname$ expdp hr/hr ATTACH = jobname$ expdp hr/hr ATTACH = jobname

OrOrOrOr

$ expdp hr/hr ATTACH$ expdp hr/hr ATTACH$ expdp hr/hr ATTACH$ expdp hr/hr ATTACH

………… You will be attached to the Job running as HR UserYou will be attached to the Job running as HR UserYou will be attached to the Job running as HR UserYou will be attached to the Job running as HR User

OrOrOrOr

$ expdp hr/hr dumpfile=a.dmp logfile=a.log full=y$ expdp hr/hr dumpfile=a.dmp logfile=a.log full=y$ expdp hr/hr dumpfile=a.dmp logfile=a.log full=y$ expdp hr/hr dumpfile=a.dmp logfile=a.log full=y

………… when Export is started press Cntrl C [^C]when Export is started press Cntrl C [^C]when Export is started press Cntrl C [^C]when Export is started press Cntrl C [^C]

………… You will get EXPORT> promptYou will get EXPORT> promptYou will get EXPORT> promptYou will get EXPORT> prompt

EXPORT>EXPORT>EXPORT>EXPORT>

New Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive Mode MonitorJobs Remotely

Page 36: Data Pump
Page 37: Data Pump

ADD_FILE ADD_FILE ADD_FILE ADD_FILE ADD_FILE ADD_FILE ADD_FILE ADD_FILE ---------------- Add file or use %UAdd file or use %UAdd file or use %UAdd file or use %UAdd file or use %UAdd file or use %UAdd file or use %UAdd file or use %U

CONTINUE_CLIENT CONTINUE_CLIENT CONTINUE_CLIENT CONTINUE_CLIENT CONTINUE_CLIENT CONTINUE_CLIENT CONTINUE_CLIENT CONTINUE_CLIENT ---------------- Back to Logging ModeBack to Logging ModeBack to Logging ModeBack to Logging ModeBack to Logging ModeBack to Logging ModeBack to Logging ModeBack to Logging Mode

EXIT_CLIENTEXIT_CLIENTEXIT_CLIENTEXIT_CLIENTEXIT_CLIENTEXIT_CLIENTEXIT_CLIENTEXIT_CLIENT ---------------- Exit Interactive ModeExit Interactive ModeExit Interactive ModeExit Interactive ModeExit Interactive ModeExit Interactive ModeExit Interactive ModeExit Interactive Mode

Session broke but job continueSession broke but job continueSession broke but job continueSession broke but job continueSession broke but job continueSession broke but job continueSession broke but job continueSession broke but job continue

KILL_JOBKILL_JOBKILL_JOBKILL_JOBKILL_JOBKILL_JOBKILL_JOBKILL_JOB ---------------- Session broke and Job killedSession broke and Job killedSession broke and Job killedSession broke and Job killedSession broke and Job killedSession broke and Job killedSession broke and Job killedSession broke and Job killed

Cannot be restartCannot be restartCannot be restartCannot be restartCannot be restartCannot be restartCannot be restartCannot be restartedededededededed

PARALLELPARALLELPARALLELPARALLELPARALLELPARALLELPARALLELPARALLEL ---------------- Increase or Decrease WorkersIncrease or Decrease WorkersIncrease or Decrease WorkersIncrease or Decrease WorkersIncrease or Decrease WorkersIncrease or Decrease WorkersIncrease or Decrease WorkersIncrease or Decrease Workers

START_JOBSTART_JOBSTART_JOBSTART_JOBSTART_JOBSTART_JOBSTART_JOBSTART_JOB ---------------- Start the job to which attachedStart the job to which attachedStart the job to which attachedStart the job to which attachedStart the job to which attachedStart the job to which attachedStart the job to which attachedStart the job to which attached

STATUSSTATUSSTATUSSTATUSSTATUSSTATUSSTATUSSTATUS ---------------- Display the Current Status of JobDisplay the Current Status of JobDisplay the Current Status of JobDisplay the Current Status of JobDisplay the Current Status of JobDisplay the Current Status of JobDisplay the Current Status of JobDisplay the Current Status of Job

STOP_JOBSTOP_JOBSTOP_JOBSTOP_JOBSTOP_JOBSTOP_JOBSTOP_JOBSTOP_JOB ---------------- Stop the Current JobStop the Current JobStop the Current JobStop the Current JobStop the Current JobStop the Current JobStop the Current JobStop the Current Job

Job can be restartedJob can be restartedJob can be restartedJob can be restartedJob can be restartedJob can be restartedJob can be restartedJob can be restarted

DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP DATA PUMP –––––––– Interactive ModeInteractive ModeInteractive ModeInteractive ModeInteractive ModeInteractive ModeInteractive ModeInteractive Mode MonitorJobs Remotely

Page 38: Data Pump

New Parameter in Release 2New Parameter in Release 2New Parameter in Release 2New Parameter in Release 2New Parameter in Release 2New Parameter in Release 2New Parameter in Release 2New Parameter in Release 2

FILESIZE FILESIZE FILESIZE FILESIZE FILESIZE FILESIZE FILESIZE FILESIZE ----------------You can restrict the size of file added with You can restrict the size of file added with You can restrict the size of file added with You can restrict the size of file added with You can restrict the size of file added with You can restrict the size of file added with You can restrict the size of file added with You can restrict the size of file added with

ADD_FILEADD_FILEADD_FILEADD_FILEADD_FILEADD_FILEADD_FILEADD_FILE

In Rel 1, this file size was UNLIMITEDIn Rel 1, this file size was UNLIMITEDIn Rel 1, this file size was UNLIMITEDIn Rel 1, this file size was UNLIMITEDIn Rel 1, this file size was UNLIMITEDIn Rel 1, this file size was UNLIMITEDIn Rel 1, this file size was UNLIMITEDIn Rel 1, this file size was UNLIMITED

New Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive ModeNew Interactive Mode MonitorJobs Remotely

Page 39: Data Pump

$ expdp hr/hr attach = export1$ expdp hr/hr attach = export1$ expdp hr/hr attach = export1$ expdp hr/hr attach = export1$ expdp hr/hr attach = export1$ expdp hr/hr attach = export1$ expdp hr/hr attach = export1$ expdp hr/hr attach = export1

……………………........

Export> parallel = 5Export> parallel = 5Export> parallel = 5Export> parallel = 5Export> parallel = 5Export> parallel = 5Export> parallel = 5Export> parallel = 5

Export> add_file = export5.dmpExport> add_file = export5.dmpExport> add_file = export5.dmpExport> add_file = export5.dmpExport> add_file = export5.dmpExport> add_file = export5.dmpExport> add_file = export5.dmpExport> add_file = export5.dmp

Export> start_jobExport> start_jobExport> start_jobExport> start_jobExport> start_jobExport> start_jobExport> start_jobExport> start_job

Export> continue_clientExport> continue_clientExport> continue_clientExport> continue_clientExport> continue_clientExport> continue_clientExport> continue_clientExport> continue_client

Interactive Mode ExampleInteractive Mode ExampleInteractive Mode ExampleInteractive Mode ExampleInteractive Mode ExampleInteractive Mode ExampleInteractive Mode ExampleInteractive Mode Example MonitorJobs Remotely

Page 40: Data Pump

Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]

FILEFILEFILEFILEFILEFILEFILEFILELOGLOGLOGLOGLOGLOGLOGLOGGRANTS GRANTS GRANTS GRANTS GRANTS GRANTS GRANTS GRANTS INDEXESINDEXESINDEXESINDEXESINDEXESINDEXESINDEXESINDEXESCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSCONSTRAINTSFEEDBACKFEEDBACKFEEDBACKFEEDBACKFEEDBACKFEEDBACKFEEDBACKFEEDBACKROWS=NROWS=NROWS=NROWS=NROWS=NROWS=NROWS=NROWS=NROWS=YROWS=YROWS=YROWS=YROWS=YROWS=YROWS=YROWS=YDESTROYDESTROYDESTROYDESTROYDESTROYDESTROYDESTROYDESTROYFROMUSERFROMUSERFROMUSERFROMUSERFROMUSERFROMUSERFROMUSERFROMUSERTOUSERTOUSERTOUSERTOUSERTOUSERTOUSERTOUSERTOUSERINDEXFILEINDEXFILEINDEXFILEINDEXFILEINDEXFILEINDEXFILEINDEXFILEINDEXFILEIGNOREIGNOREIGNOREIGNOREIGNOREIGNOREIGNOREIGNORE

Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]

DUMPFILEDUMPFILEDUMPFILEDUMPFILEDUMPFILEDUMPFILEDUMPFILEDUMPFILELOGFILELOGFILELOGFILELOGFILELOGFILELOGFILELOGFILELOGFILEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDEEXCLUDE & INCLUDESTATUSSTATUSSTATUSSTATUSSTATUSSTATUSSTATUSSTATUSCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=METADATA_ONLYCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLCONTENT=ALLRESUSE_DATAFILESRESUSE_DATAFILESRESUSE_DATAFILESRESUSE_DATAFILESRESUSE_DATAFILESRESUSE_DATAFILESRESUSE_DATAFILESRESUSE_DATAFILESREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMASQLFILESQLFILESQLFILESQLFILESQLFILESQLFILESQLFILESQLFILETABLE_EXISTS_ACTIONTABLE_EXISTS_ACTIONTABLE_EXISTS_ACTIONTABLE_EXISTS_ACTIONTABLE_EXISTS_ACTIONTABLE_EXISTS_ACTIONTABLE_EXISTS_ACTIONTABLE_EXISTS_ACTION

9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import

Page 41: Data Pump

Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]Import [ imp ]

RECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRECORDLENGTHRESUMABLERESUMABLERESUMABLERESUMABLERESUMABLERESUMABLERESUMABLERESUMABLERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMERESUMABLE_NAMEUSERIDUSERIDUSERIDUSERIDUSERIDUSERIDUSERIDUSERIDVOLSIZEVOLSIZEVOLSIZEVOLSIZEVOLSIZEVOLSIZEVOLSIZEVOLSIZESTATISTICSSTATISTICSSTATISTICSSTATISTICSSTATISTICSSTATISTICSSTATISTICSSTATISTICSBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERBUFFERDIRECTDIRECTDIRECTDIRECTDIRECTDIRECTDIRECTDIRECTCOMMITCOMMITCOMMITCOMMITCOMMITCOMMITCOMMITCOMMITFILESIZEFILESIZEFILESIZEFILESIZEFILESIZEFILESIZEFILESIZEFILESIZENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONE

Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]Data Pump Import [ impdp ]

NONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONENONETABLESPACESTABLESPACESTABLESPACESTABLESPACESTABLESPACESTABLESPACESTABLESPACESTABLESPACESSKIP_UNUSABLE_INDEXESSKIP_UNUSABLE_INDEXESSKIP_UNUSABLE_INDEXESSKIP_UNUSABLE_INDEXESSKIP_UNUSABLE_INDEXESSKIP_UNUSABLE_INDEXESSKIP_UNUSABLE_INDEXESSKIP_UNUSABLE_INDEXESSTREAMS_CONFIGURATIONSTREAMS_CONFIGURATIONSTREAMS_CONFIGURATIONSTREAMS_CONFIGURATIONSTREAMS_CONFIGURATIONSTREAMS_CONFIGURATIONSTREAMS_CONFIGURATIONSTREAMS_CONFIGURATION

9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import 9i Import Vs 10g Datapump Import

Page 42: Data Pump

JOB_NAME | ATTACH | DIRECTORY | NETWORK_LINK | PARALLELJOB_NAME | ATTACH | DIRECTORY | NETWORK_LINK | PARALLELJOB_NAME | ATTACH | DIRECTORY | NETWORK_LINK | PARALLELJOB_NAME | ATTACH | DIRECTORY | NETWORK_LINK | PARALLELJOB_NAME | ATTACH | DIRECTORY | NETWORK_LINK | PARALLELJOB_NAME | ATTACH | DIRECTORY | NETWORK_LINK | PARALLELJOB_NAME | ATTACH | DIRECTORY | NETWORK_LINK | PARALLELJOB_NAME | ATTACH | DIRECTORY | NETWORK_LINK | PARALLEL

ENCRYPTION_PASSWORDENCRYPTION_PASSWORDENCRYPTION_PASSWORDENCRYPTION_PASSWORD -------- Allow export/import of EncryptedAllow export/import of EncryptedAllow export/import of EncryptedAllow export/import of Encrypted

column datcolumn datcolumn datcolumn dataaaa$expdp hr/hr dumpfile=dr1:abc.dmp encryption_password=6789$expdp hr/hr dumpfile=dr1:abc.dmp encryption_password=6789$expdp hr/hr dumpfile=dr1:abc.dmp encryption_password=6789$expdp hr/hr dumpfile=dr1:abc.dmp encryption_password=6789

$impdp hr/hr dumpfile=dr1:abc.dmp encryption_password=6789$impdp hr/hr dumpfile=dr1:abc.dmp encryption_password=6789$impdp hr/hr dumpfile=dr1:abc.dmp encryption_password=6789$impdp hr/hr dumpfile=dr1:abc.dmp encryption_password=6789

You cannot use this parameter with NETWORK_LINKYou cannot use this parameter with NETWORK_LINKYou cannot use this parameter with NETWORK_LINKYou cannot use this parameter with NETWORK_LINK

FLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCNFLASHBACK_SCN ---------------- Valid with NETWORK_LINK to getValid with NETWORK_LINK to getValid with NETWORK_LINK to getValid with NETWORK_LINK to getValid with NETWORK_LINK to getValid with NETWORK_LINK to getValid with NETWORK_LINK to getValid with NETWORK_LINK to get

FLASHBACK_TIMEFLASHBACK_TIMEFLASHBACK_TIMEFLASHBACK_TIMEFLASHBACK_TIMEFLASHBACK_TIMEFLASHBACK_TIMEFLASHBACK_TIME Data consistent as of this SCN |TimeData consistent as of this SCN |TimeData consistent as of this SCN |TimeData consistent as of this SCN |TimeData consistent as of this SCN |TimeData consistent as of this SCN |TimeData consistent as of this SCN |TimeData consistent as of this SCN |Time

Both of these parameter are mutually exclusiveBoth of these parameter are mutually exclusiveBoth of these parameter are mutually exclusiveBoth of these parameter are mutually exclusiveBoth of these parameter are mutually exclusiveBoth of these parameter are mutually exclusiveBoth of these parameter are mutually exclusiveBoth of these parameter are mutually exclusive

DATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New Parameter

Page 43: Data Pump

DATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New Parameter

REMAP_DATAFILEREMAP_DATAFILEREMAP_DATAFILEREMAP_DATAFILEREMAP_DATAFILEREMAP_DATAFILEREMAP_DATAFILEREMAP_DATAFILE ---------------- Useful when moving data between platformUseful when moving data between platformUseful when moving data between platformUseful when moving data between platformUseful when moving data between platformUseful when moving data between platformUseful when moving data between platformUseful when moving data between platform

Change Source file to Target file in DDLChange Source file to Target file in DDLChange Source file to Target file in DDLChange Source file to Target file in DDLChange Source file to Target file in DDLChange Source file to Target file in DDLChange Source file to Target file in DDLChange Source file to Target file in DDL’’’’’’’’ssssssss

REMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMAREMAP_SCHEMA ---------------- Load all Source Schema objects to Target Load all Source Schema objects to Target Load all Source Schema objects to Target Load all Source Schema objects to Target Load all Source Schema objects to Target Load all Source Schema objects to Target Load all Source Schema objects to Target Load all Source Schema objects to Target Schema Schema Schema Schema Schema Schema Schema Schema

---------------- Can create Target Schema if dump file set Can create Target Schema if dump file set Can create Target Schema if dump file set Can create Target Schema if dump file set Can create Target Schema if dump file set Can create Target Schema if dump file set Can create Target Schema if dump file set Can create Target Schema if dump file set

contains CREATE USER contains CREATE USER contains CREATE USER contains CREATE USER contains CREATE USER contains CREATE USER contains CREATE USER contains CREATE USER

remap_schema(HR,SCOTT)remap_schema(HR,SCOTT)remap_schema(HR,SCOTT)remap_schema(HR,SCOTT)remap_schema(HR,SCOTT)remap_schema(HR,SCOTT)remap_schema(HR,SCOTT)remap_schema(HR,SCOTT)

REMAP_TABLESPACE REMAP_TABLESPACE REMAP_TABLESPACE REMAP_TABLESPACE -------- All Source Tablespace are mapped to All Source Tablespace are mapped to All Source Tablespace are mapped to All Source Tablespace are mapped to

destination destination destination destination tablespacestablespacestablespacestablespaces

-------- You can specify multiple such parametersYou can specify multiple such parametersYou can specify multiple such parametersYou can specify multiple such parameters

remap_tablespace(users,indy_data)remap_tablespace(users,indy_data)remap_tablespace(users,indy_data)remap_tablespace(users,indy_data)

Page 44: Data Pump

DATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New Parameter

TABLE_EXISTS_ACTION TABLE_EXISTS_ACTION TABLE_EXISTS_ACTION TABLE_EXISTS_ACTION TABLE_EXISTS_ACTION TABLE_EXISTS_ACTION TABLE_EXISTS_ACTION TABLE_EXISTS_ACTION ---------------- What to do if table already existWhat to do if table already existWhat to do if table already existWhat to do if table already existWhat to do if table already existWhat to do if table already existWhat to do if table already existWhat to do if table already exist

SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP ��������Leave the table and move to next object [Default]Leave the table and move to next object [Default]Leave the table and move to next object [Default]Leave the table and move to next object [Default]Leave the table and move to next object [Default]Leave the table and move to next object [Default]Leave the table and move to next object [Default]Leave the table and move to next object [Default]

APPEND APPEND APPEND APPEND APPEND APPEND APPEND APPEND ��������Load rows leaving existing data unchangedLoad rows leaving existing data unchangedLoad rows leaving existing data unchangedLoad rows leaving existing data unchangedLoad rows leaving existing data unchangedLoad rows leaving existing data unchangedLoad rows leaving existing data unchangedLoad rows leaving existing data unchanged

TRUNCATE TRUNCATE TRUNCATE TRUNCATE TRUNCATE TRUNCATE TRUNCATE TRUNCATE ��������Delete existing rows and load rowsDelete existing rows and load rowsDelete existing rows and load rowsDelete existing rows and load rowsDelete existing rows and load rowsDelete existing rows and load rowsDelete existing rows and load rowsDelete existing rows and load rows

REPLACE REPLACE REPLACE REPLACE REPLACE REPLACE REPLACE REPLACE ��������Drop existing table and create and load rowsDrop existing table and create and load rowsDrop existing table and create and load rowsDrop existing table and create and load rowsDrop existing table and create and load rowsDrop existing table and create and load rowsDrop existing table and create and load rowsDrop existing table and create and load rows

Page 45: Data Pump

DATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterTRANSFORM TRANSFORM TRANSFORM TRANSFORM TRANSFORM TRANSFORM TRANSFORM TRANSFORM ---------------- Allow to alter Object Creation DDL before LoadingAllow to alter Object Creation DDL before LoadingAllow to alter Object Creation DDL before LoadingAllow to alter Object Creation DDL before LoadingAllow to alter Object Creation DDL before LoadingAllow to alter Object Creation DDL before LoadingAllow to alter Object Creation DDL before LoadingAllow to alter Object Creation DDL before Loading

TRANSFORM = <TrName>:Value[:object_type]TRANSFORM = <TrName>:Value[:object_type]TRANSFORM = <TrName>:Value[:object_type]TRANSFORM = <TrName>:Value[:object_type]TRANSFORM = <TrName>:Value[:object_type]TRANSFORM = <TrName>:Value[:object_type]TRANSFORM = <TrName>:Value[:object_type]TRANSFORM = <TrName>:Value[:object_type]Where Where Where Where Where Where Where Where <TrName><TrName><TrName><TrName><TrName><TrName><TrName><TrName> can becan becan becan becan becan becan becan be

SEGMENT_ATTRIBUTES = Y | NSEGMENT_ATTRIBUTES = Y | NSEGMENT_ATTRIBUTES = Y | NSEGMENT_ATTRIBUTES = Y | NSEGMENT_ATTRIBUTES = Y | NSEGMENT_ATTRIBUTES = Y | NSEGMENT_ATTRIBUTES = Y | NSEGMENT_ATTRIBUTES = Y | N ----------------YYYYYYYY��������DefaultDefaultDefaultDefaultDefaultDefaultDefaultDefault---------------- Y means following are included with DDLY means following are included with DDLY means following are included with DDLY means following are included with DDLY means following are included with DDLY means following are included with DDLY means following are included with DDLY means following are included with DDL

-------- Physical attributesPhysical attributesPhysical attributesPhysical attributesPhysical attributesPhysical attributesPhysical attributesPhysical attributes

-------- Storage attributesStorage attributesStorage attributesStorage attributesStorage attributesStorage attributesStorage attributesStorage attributes-------- TablespacesTablespacesTablespacesTablespacesTablespacesTablespacesTablespacesTablespaces-------- logginglogginglogginglogginglogginglogginglogginglogging

STORAGE = Y | NSTORAGE = Y | NSTORAGE = Y | NSTORAGE = Y | NSTORAGE = Y | NSTORAGE = Y | NSTORAGE = Y | NSTORAGE = Y | N ----------------YYYYYYYY��������DefaultDefaultDefaultDefaultDefaultDefaultDefaultDefault---------------- Y means Storage clauses are included Y means Storage clauses are included Y means Storage clauses are included Y means Storage clauses are included Y means Storage clauses are included Y means Storage clauses are included Y means Storage clauses are included Y means Storage clauses are included

OID = Y | N OID = Y | N OID = Y | N OID = Y | N OID = Y | N OID = Y | N OID = Y | N OID = Y | N ----------------YYYYYYYY��������DefaultDefaultDefaultDefaultDefaultDefaultDefaultDefault---------------- Y means object ID of abstract types is reusedY means object ID of abstract types is reusedY means object ID of abstract types is reusedY means object ID of abstract types is reusedY means object ID of abstract types is reusedY means object ID of abstract types is reusedY means object ID of abstract types is reusedY means object ID of abstract types is reused

PCTSPACE = Integer valuePCTSPACE = Integer valuePCTSPACE = Integer valuePCTSPACE = Integer valuePCTSPACE = Integer valuePCTSPACE = Integer valuePCTSPACE = Integer valuePCTSPACE = Integer value---------------- Reduce the space required for tablespace byReduce the space required for tablespace byReduce the space required for tablespace byReduce the space required for tablespace byReduce the space required for tablespace byReduce the space required for tablespace byReduce the space required for tablespace byReduce the space required for tablespace byperforming shrink on tablespace storageperforming shrink on tablespace storageperforming shrink on tablespace storageperforming shrink on tablespace storageperforming shrink on tablespace storageperforming shrink on tablespace storageperforming shrink on tablespace storageperforming shrink on tablespace storage

Page 46: Data Pump

DATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New ParameterDATA PUMP Import New Parameter

Impdp hr/hr dumpfile=indy.dmp transform=Impdp hr/hr dumpfile=indy.dmp transform=Impdp hr/hr dumpfile=indy.dmp transform=Impdp hr/hr dumpfile=indy.dmp transform=Impdp hr/hr dumpfile=indy.dmp transform=Impdp hr/hr dumpfile=indy.dmp transform=Impdp hr/hr dumpfile=indy.dmp transform=Impdp hr/hr dumpfile=indy.dmp transform=SEGMENT_ATTRIBUTESSEGMENT_ATTRIBUTESSEGMENT_ATTRIBUTESSEGMENT_ATTRIBUTESSEGMENT_ATTRIBUTESSEGMENT_ATTRIBUTESSEGMENT_ATTRIBUTESSEGMENT_ATTRIBUTES::::::::nnnnnnnn::::::::indexindexindexindexindexindexindexindex

-------------------------------- Ignore Index Storage and Tablespaces ClauseIgnore Index Storage and Tablespaces ClauseIgnore Index Storage and Tablespaces ClauseIgnore Index Storage and Tablespaces ClauseIgnore Index Storage and Tablespaces ClauseIgnore Index Storage and Tablespaces ClauseIgnore Index Storage and Tablespaces ClauseIgnore Index Storage and Tablespaces Clause

Page 47: Data Pump

DBMS_DATAPUMP APIDBMS_DATAPUMP APIDBMS_DATAPUMP APIDBMS_DATAPUMP APIDBMS_DATAPUMP APIDBMS_DATAPUMP APIDBMS_DATAPUMP APIDBMS_DATAPUMP API

Use the following steps to create Datapump scriptUse the following steps to create Datapump scriptUse the following steps to create Datapump scriptUse the following steps to create Datapump scriptUse the following steps to create Datapump scriptUse the following steps to create Datapump scriptUse the following steps to create Datapump scriptUse the following steps to create Datapump script1.1.1.1.1.1.1.1. Create a handle using DBMS_DATAPUMP.OPEN functionCreate a handle using DBMS_DATAPUMP.OPEN functionCreate a handle using DBMS_DATAPUMP.OPEN functionCreate a handle using DBMS_DATAPUMP.OPEN functionCreate a handle using DBMS_DATAPUMP.OPEN functionCreate a handle using DBMS_DATAPUMP.OPEN functionCreate a handle using DBMS_DATAPUMP.OPEN functionCreate a handle using DBMS_DATAPUMP.OPEN functionHandle1 := Handle1 := Handle1 := Handle1 := Handle1 := Handle1 := Handle1 := Handle1 :=

DBMS_DATAPUMP.OPEN(DBMS_DATAPUMP.OPEN(DBMS_DATAPUMP.OPEN(DBMS_DATAPUMP.OPEN(DBMS_DATAPUMP.OPEN(DBMS_DATAPUMP.OPEN(DBMS_DATAPUMP.OPEN(DBMS_DATAPUMP.OPEN(‘‘‘‘‘‘‘‘<operation><operation><operation><operation><operation><operation><operation><operation>’’’’’’’’,,,,,,,,’’’’’’’’<modes><modes><modes><modes><modes><modes><modes><modes>’’’’’’’’,,,,,,,,’’’’’’’’<dblink>,<dblink>,<dblink>,<dblink>,<dblink>,<dblink>,<dblink>,<dblink>,’’’’’’’’<jobname><jobname><jobname><jobname><jobname><jobname><jobname><jobname>’’’’’’’’,,,,,,,,’’’’’’’’<version><version><version><version><version><version><version><version>’’’’’’’’););););););););

Operation can be EXPORT | IMPORT | SQL_FILEOperation can be EXPORT | IMPORT | SQL_FILEOperation can be EXPORT | IMPORT | SQL_FILEOperation can be EXPORT | IMPORT | SQL_FILEOperation can be EXPORT | IMPORT | SQL_FILEOperation can be EXPORT | IMPORT | SQL_FILEOperation can be EXPORT | IMPORT | SQL_FILEOperation can be EXPORT | IMPORT | SQL_FILE

Modes can be FULL | SCHEMA | TABLESPACE | TRANSPORTABLE | TABLEModes can be FULL | SCHEMA | TABLESPACE | TRANSPORTABLE | TABLEModes can be FULL | SCHEMA | TABLESPACE | TRANSPORTABLE | TABLEModes can be FULL | SCHEMA | TABLESPACE | TRANSPORTABLE | TABLEModes can be FULL | SCHEMA | TABLESPACE | TRANSPORTABLE | TABLEModes can be FULL | SCHEMA | TABLESPACE | TRANSPORTABLE | TABLEModes can be FULL | SCHEMA | TABLESPACE | TRANSPORTABLE | TABLEModes can be FULL | SCHEMA | TABLESPACE | TRANSPORTABLE | TABLE

Dblink is the name of database linkDblink is the name of database linkDblink is the name of database linkDblink is the name of database linkDblink is the name of database linkDblink is the name of database linkDblink is the name of database linkDblink is the name of database link

Jobname is the name of Datapump jobJobname is the name of Datapump jobJobname is the name of Datapump jobJobname is the name of Datapump jobJobname is the name of Datapump jobJobname is the name of Datapump jobJobname is the name of Datapump jobJobname is the name of Datapump job

Version can be LATEST | COMPATIBLEVersion can be LATEST | COMPATIBLEVersion can be LATEST | COMPATIBLEVersion can be LATEST | COMPATIBLEVersion can be LATEST | COMPATIBLEVersion can be LATEST | COMPATIBLEVersion can be LATEST | COMPATIBLEVersion can be LATEST | COMPATIBLE

2.2.2.2.2.2.2.2. Get the Dumpfile Set informationGet the Dumpfile Set informationGet the Dumpfile Set informationGet the Dumpfile Set informationGet the Dumpfile Set informationGet the Dumpfile Set informationGet the Dumpfile Set informationGet the Dumpfile Set informationDBMS_DATAPUMP.GET_DUMPFILE_INFO(DBMS_DATAPUMP.GET_DUMPFILE_INFO(DBMS_DATAPUMP.GET_DUMPFILE_INFO(DBMS_DATAPUMP.GET_DUMPFILE_INFO(DBMS_DATAPUMP.GET_DUMPFILE_INFO(DBMS_DATAPUMP.GET_DUMPFILE_INFO(DBMS_DATAPUMP.GET_DUMPFILE_INFO(DBMS_DATAPUMP.GET_DUMPFILE_INFO(‘‘‘‘‘‘‘‘indy.dmpindy.dmpindy.dmpindy.dmpindy.dmpindy.dmpindy.dmpindy.dmp’’’’’’’’,,,,,,,,’’’’’’’’DATA_PUMP_DIRDATA_PUMP_DIRDATA_PUMP_DIRDATA_PUMP_DIRDATA_PUMP_DIRDATA_PUMP_DIRDATA_PUMP_DIRDATA_PUMP_DIR’’’’’’’’,,,,,,,,’’’’’’’’finfo,ftypefinfo,ftypefinfo,ftypefinfo,ftypefinfo,ftypefinfo,ftypefinfo,ftypefinfo,ftype););););););););

3.3.3.3.3.3.3.3. Add any Object filteringAdd any Object filteringAdd any Object filteringAdd any Object filteringAdd any Object filteringAdd any Object filteringAdd any Object filteringAdd any Object filteringDBMS_DATAPUMP.METADATA_FILTER(handle1,DBMS_DATAPUMP.METADATA_FILTER(handle1,DBMS_DATAPUMP.METADATA_FILTER(handle1,DBMS_DATAPUMP.METADATA_FILTER(handle1,DBMS_DATAPUMP.METADATA_FILTER(handle1,DBMS_DATAPUMP.METADATA_FILTER(handle1,DBMS_DATAPUMP.METADATA_FILTER(handle1,DBMS_DATAPUMP.METADATA_FILTER(handle1,’’’’’’’’SCHEMA_NAME_EXPRSCHEMA_NAME_EXPRSCHEMA_NAME_EXPRSCHEMA_NAME_EXPRSCHEMA_NAME_EXPRSCHEMA_NAME_EXPRSCHEMA_NAME_EXPRSCHEMA_NAME_EXPR’’’’’’’’,,,,,,,,’’’’’’’’IN(IN(IN(IN(IN(IN(IN(IN(‘’‘’‘’‘’‘’‘’‘’‘’SCOTTSCOTTSCOTTSCOTTSCOTTSCOTTSCOTTSCOTT’’’’’’’’’’’’’’’’))))))))’’’’’’’’););););););););

4.4.4.4.4.4.4.4. Start the Datapump JobStart the Datapump JobStart the Datapump JobStart the Datapump JobStart the Datapump JobStart the Datapump JobStart the Datapump JobStart the Datapump JobDBMS_DATAPUMP.START_JOB(handle1);DBMS_DATAPUMP.START_JOB(handle1);DBMS_DATAPUMP.START_JOB(handle1);DBMS_DATAPUMP.START_JOB(handle1);DBMS_DATAPUMP.START_JOB(handle1);DBMS_DATAPUMP.START_JOB(handle1);DBMS_DATAPUMP.START_JOB(handle1);DBMS_DATAPUMP.START_JOB(handle1);

Page 48: Data Pump

Enterprise ManagerEnterprise ManagerEnterprise ManagerEnterprise ManagerEnterprise ManagerEnterprise ManagerEnterprise ManagerEnterprise Manager--------DbControlDbControlDbControlDbControlDbControlDbControlDbControlDbControl

Page 49: Data Pump

Q U E S T I O N SQ U E S T I O N S

A N S W E R SA N S W E R S

Page 50: Data Pump

Thank YouThank YouThank YouThank YouThank YouThank YouThank YouThank You