Difference Between ORACLE Export

Embed Size (px)

Citation preview

  • 7/27/2019 Difference Between ORACLE Export

    1/1

    Difference Between ORACLE Export (exp) and Datapump (expdp)?

    ORACLE provides two external utilities to transfer database objects from one database to anotherdatabase. Traditional exports (exp /imp) are introduced before 10g. Then from 10g, ORACLEintroduced datapump (expdp / impdp) as an enhancement to traditional export utility.

    Traditional Export (exp/ imp)This is an ORACLE database external utility, which is used to transfer database objects from onedatabase server to another database server. It allows transferring the database objects over differentplatforms, different hardware and software configurations. When an export command is executed on adatabase, database objects are extracted with their dependency objects. That means if it extracts atable, the dependences like indexes, comments, and grants are extracted and written into an exportfile (binary format dump file). Following is the command to export a full database,

    Cmd > exp user id=username/password@exportdb_tns

    f i le=export .dmp log=export .log fu l l=y stat is t ics=none

    The above command will be exported the database to a binary dump file named export.dmp. Then

    imp utility can be used to import this data to another database. Following is the command to import,

    Cmd > imp us er id=username/password@im portdb_tns

    f i le=export .dmp log=import . log fu l l=y stat is t ics=none

    Datapump Export (expdp/ impdp)

    This is also an ORACLE database external utility, which is used to transfer objects betweendatabases. This utility is coming from ORACLE 10g database. It has more enhancements than thetraditional exp/ imp utilities. This utility also makes dump files, which are in binary formats withdatabase objects, object metadata and their control information. The expdp and impdp commandscan be executed in three ways,

    1. Command line interface (specify expdp/impdp parameters in command line)2. Parameter file interface (specify expdp/impdp parameters in a separate file)

    3. Interactive-command interface (entering various commands in exportprompt)There are five different modes of data unloading using expdp. They are,

    1. Full Export Mode (entire database is unloaded)2. Schema Mode (this is the default mode, specific schemas are unloaded)3. Table Mode (specified set of tables and their dependent objects are unloaded)4. Tablespace Mode (the tables in the specified tablespace are unloaded)5. Transportable Tablespace Mode (only the metadata for the tables and their dependent objects within

    a specified set of tablespaces are unloaded)Following is the way to export a full database using expdp,

    Cmd > expdp user id=username/passwo rd dum pf i le=expdp_export .dmp

    logf i le=expdp_export .log fu l l=y directory=export

    Then impdp utility should be used to import this file to another database.

    What is the difference between Traditional Export and Datapump?

    Datapump operates on a group of files called dump file sets. However, normal export operates on asingle file. Datapump access files in the server (using ORACLE directories). Traditional export can access filesin client and server both (not using ORACLE directories). Exports (exp/imp) represent database metadata information as DDLs in the dump file, but indatapump, it represents in XML document format. Datapump has parallel execution but in exp/imp single stream execution. Datapump does not support sequential media like tapes, but traditional export supports.