Sie sind auf Seite 1von 12

Oracle Data Pump 10g

<Rupak Mukherjee> <Oracle Database>

Oracle Data Pump 10g

Confidentiality Statement

Include the confidentiality statement within the box provided. This has to be legally approved.

Confidential

Oracle Data Pump 10g

Abstract
<Provide a brief summary of the white paper>.
This paper provides an overview of the Oracle 10g Data Pump architecture, followed by a description of the main features of Data Pump, some discussion of best practices, and finally a brief comparison of the Data Pump Export and Import utilities to the original Export and Import utilities.

Confidential

Oracle Data Pump 10g

About the Author


I have been working as Oracle Applications DBA since 2003. Presently Im working as an Oracle Applications Database Administrator for a Xerox Corporation,USA. I have extensive experience with Oracle 8i, 9i & 10g, and Oracle E-Business Suite 11i, Specializing in Installation, Configuration and Administration of Oracle 8i, 9i, & 10g, Oracle 10g RAC, and Oracle E-Business Suite 11i on different UNIX and Linux OS including Solaris, HP-Unix, IBM AIX and Red Hat. Experience in Upgrading Oracle 8i, 9i, 10g and Oracle E-Business Suite 11i. Good exposure in implementing of backup & recovery strategies, applications cloning & refreshing, applications patching, and performance tuning, Written and published a couple of articles on Oracle Metalink Customer Knowledge Exchange. And also, Im an Oracle Certified Professional (OCP) i9i, Oracle 11i Applications DBA Certified Professional.You can contact me at rupak.mukherjee@tcs.com

About the Domain


The Oracle Database (commonly referred to as Oracle RDBMS or simply Oracle) consists of a relational database management system (RDBMS) produced and marketed by Oracle Corporation. As of 2009, Oracle remains a major presence in database computing

Confidential

Oracle Data Pump 10g

CONTENTS
INTRODUCTION..........................................................................................................................................6 < DATA PUMP EXPORT > .........................................................................................................................7 < EXPORT MONITORING >.......................................................................................................................8 < PARALLEL OPERATION >................................................................................................................................8 < Data Pump Import >...........................................................................................................................9 CONCLUSION.............................................................................................................................................10 ACKNOWLEDGEMENTS.........................................................................................................................11 REFERENCES.............................................................................................................................................12

Confidential

Oracle Data Pump 10g

Introduction
Until now, the export/import toolset has been the utility of choice for transferring data across multiple platforms with minimal effort, despite common complaints about its lack of speed. Import merely reads each record from the export dump file and inserts it into the target table using the usual INSERT INTO command, so it's no surprise that import can be a slow process. Enter Oracle Data Pump, the newer and faster sibling of the export/import toolkit in Oracle Database 10g, designed to speed up the process many times over. Data Pump is a fully integrated feature of Oracle Database that enables very high-speed loading and unloading of data and metadata to and from the database. It automatically manages and schedules multiple, parallel streams of loading or unloading for maximum throughput. Data Pump infrastructure is callable through the PL/SQL package DBMS_DATAPUMP. Thus, custom data movement utilities can be built using Data Pump. Oracle Database includes three such client utilities: Command-line export (expdp) Command-line import (impdp) Web-based Oracle Enterprise Manager export/import interface Data Pump reflects a complete overhaul of the export/import process. Instead of using the usual SQL commands, it provides proprietary APIs to load and unload data significantly faster. In my tests, I have seen performance increases of 10-15 times over export in direct mode and 5-times-over performance increases in the import process. In addition, unlike with the export utility, it is possible to extract only specific types of objects such as procedures. Data Pump is an integral feature of Oracle Database and therefore is available in all configurations. However, some features of Data Pump such as parallelism are available only in the Enterprise Edition. Dump file encryption is available as part of the Advanced Security Option, and dump file data compression is included in the Advanced Compression Option. This white paper describes the ways to utilize Oracle 10g Data Pump to its full potential and shows the benefits which it provides in comparison to oracle export/import.

Confidential

Oracle Data Pump 10g

< Data Pump Export >


The new utility is known as expdp to differentiate it from exp, the original export. In this example, we will use Data Pump to export a large table, CASES, about 3GB in size. Data Pump uses file manipulation on the server side to create and read files; hence, directories are used as locations. In this case, we are going to use the filesystem /dwhp/exp to hold the dump files. create directory DATA_PUMP_DIR as '/dwhp/exp'; grant read, write on directory DATA_PUMP_DIR to rmukherj; Next, we will export the data: expdp rmukherj/abc123 tables=CASES directory= DATA_PUMP_DIR dumpfile=exp_CASES.dmp job_name=CASES_EXPORT Let's analyze various parts of this command. The userid/password combination, tables, and dumpfile parameters are self-explanatory. Unlike the original export, the file is created on the server (not the client). The location is specified by the directory parameter value DATA_PUMP_DIR, which points to /dwhp/exp as created earlier. Note the parameter job_name above, a special one not found in the original export. All Data Pump work is done though jobs. Data Pump jobs, unlike DBMS jobs, are merely server processes that process the data on behalf of the main process. The main process, known as a master control process, coordinates this effort via Advanced Queuing; it does so through a special table created at runtime known as a master table. In our example, if you check the schema of the user RMUKHERJ while expdp is running you will notice the existence of a table CASES_EXPORT, corresponding to the parameter job_name. This table is dropped when expdp finishes.

Confidential

Oracle Data Pump 10g

< Export Monitoring >


While Data Pump Export (DPE) is running, press Control-C; it will stop the display of the messages on the screen, but not the export process itself. Instead, it will display the DPE prompt as shown below. The process is now said to be in "interactive" mode: Export> This approach allows several commands to be entered on that DPE job. To find a summary, use the STATUS command at the prompt: Export> status Job: CASES_EXPORT Operation: EXPORT Mode: TABLE State: EXECUTING Degree: 1 Job Error Count: 0 Dump file: /dwhp/exp/expCASES.dmp bytes written = 2048 Worker 1 Status: State: EXECUTING Object Schema: STOWNER Object Name: CASES Object Type: TABLE_EXPORT/TBL_TABLE_DATA/TABLE/TABLE_DATA Completed Objects: 1 Total Objects: 1 Completed Rows: 4687818 Remember, this is merely the status display. The export is working in the background. To continue to see the messages on the screen, use the command CONTINUE_CLIENT from the Export> prompt. < Parallel Operation > You can accelerate jobs significantly using more than one thread for the export, through the PARALLEL parameter. Each thread creates a separate dumpfile, so the parameter dumpfile should have as many entries as the degree of parallelism. Instead of entering each one explicitly, you can specify wildcard characters as filenames such as: expdp rmukherj/abc123 tables=CASES directory=DPDATA1 dumpfile=expCASES_%U.dmp parallel=4 job_name=Cases_Export

Confidential

Oracle Data Pump 10g Note how the dumpfile parameter has a wild card %U, which indicates the files will be created as needed and the format will be expCASES_nn.dmp, where nn starts at 01 and goes up as needed. In parallel mode, the status screen will show four worker processes. (In default mode, only one process will be visible.) All worker processes extract data simultaneously and show their progress on the status screen. It's important to separate the I/O channels for access to the database files and the dumpfile directory filesystems. Otherwise, the overhead associated with maintaining the Data Pump jobs may outweigh the benefits of parallel threads and hence degrade performance. Parallelism will be in effect only if the number of tables is higher than the parallel value and the tables are big.
<

Data Pump Import >

Data import performance is where Data Pump really stands out, however. To import the data exported earlier, we will use impdp rmukherj/abc123 directory= DATA_PUMP_DIR dumpfile=expCASES.dmp
job_name=cases_import

The default behavior of the import process is to create the table and all associated objects, and to produce an error when the table exists. Should you want to append the data to the existing table, you could use TABLE_EXISTS_ACTION=APPEND in the above command line. As with Data Pump Export, pressing Control-C on the process brings up the interactive mode of Date Pump Import (DPI); again, the prompt is Import>.

Confidential

Oracle Data Pump 10g

Conclusion
Data Pump is a callable feature in Oracle Database 10g that provides very high-speed loading and unloading of data and metadata. Command line export and import clients, expdp and impdp, that fully exploit the Data Pump infrastructure, are also provided with Oracle Database. They are implemented as complete supersets of the original exp and imp, and will replace these legacy clients going forward

Confidential

10

Oracle Data Pump 10g

Acknowledgements

Confidential

11

Oracle Data Pump 10g

References
[1] www.metalink.oracle.com. [2] Oracle Database Utilities Reference Manual

Confidential

12

Das könnte Ihnen auch gefallen