You are on page 1of 38

8/9/13

Data Pump Import

Skip Headers Oracle® Database Utilities 11g Release 2 (11.2) Part Number E10701-03

Home Book ContentsIndex Master Contact List Index Us
View PDF

Previous Next

3 Data Pump Import
This chapter describes the Oracle Data Pump Import utility (impdp). The following topics are discussed: What Is Data Pump Import? Invoking Data Pump Import Filtering During Import Operations Parameters Available in Import's Command-Line Mode Commands Available in Import's Interactive-Command Mode Examples of Using Data Pump Import Syntax Diagrams for Data Pump Import

What Is Data Pump Import?
Data Pump Import (hereinafter referred to as Import for ease of reading) is a utility for loading an export dump file set into a target system. The dump file set is made up of one or more disk files that contain table data, database object metadata, and control information. The files are written in a proprietary, binary format. During an import operation, the Data Pump Import utility uses these files to locate each database object in the dump file set. Import can also be used to load a target database directly from a source database with no intervening dump files. This is known as a network import. Data Pump Import enables you to specify whether a job should move a subset of the data and metadata from the dump file set or the source database (in the case of a network import), as determined by the import mode. This is done using data filters and metadata filters, which are implemented through Import commands. See "Filtering During Import Operations". To see some examples of the various ways in which you can use Import, refer to "Examples of Using Data Pump Import".

Invoking Data Pump Import
The Data Pump Import utility is invoked using the i m p d pcommand. The characteristics of the import operation are determined by the import parameters you specify. These parameters can be specified either on the command line or in a parameter file. Note: Do not invoke Import as S Y S D B A ,except at the request of Oracle technical support. S Y S D B Ais used internally and has specialized functions; its behavior is not the same as for general users. Note: Be aware that if you are performing a Data Pump Import into a table or tablespace created with the N O L O G G I N Gclause enabled, a redo log file may still be generated. The redo that is generated in such a case is generally for maintenance of the master table or related to underlying recursive space transactions, data dictionary changes, and index maintenance for indices on the table that require logging. The following sections contain more information about invoking Import: "Data Pump Import Interfaces" "Data Pump Import Modes" "Network Considerations"

Data Pump Import Interfaces
You can interact with Data Pump Import by using a command line, a parameter file, or an interactive-command mode. Command-Line Interface: Enables you to specify the Import parameters directly on the command line. For a complete description of the parameters available in the command-line interface, see "Parameters Available in Import's Command-Line Mode". Parameter File Interface: Enables you to specify command-line parameters in a parameter file. The only exception is the P A R F I L Eparameter because parameter files cannot be nested. The use of parameter files is recommended if you
oracle.su/docs/11g/server.112/e10701/dp_import.htm 1/38

8/9/13

Data Pump Import

are using parameters whose values require quotation marks. See "Use of Quotation Marks On the Data Pump Command Line". Interactive-Command Interface: Stops logging to the terminal and displays the Import prompt, from which you can enter various commands, some of which are specific to interactive-command mode. This mode is enabled by pressing Ctrl+C during an import operation started with the command-line interface or the parameter file interface. Interactive-command mode is also enabled when you attach to an executing or stopped job. For a complete description of the commands available in interactive-command mode, see "Commands Available in Import's Interactive-Command Mode".

Data Pump Import Modes
The import mode determines what is imported. The specified mode applies to the source of the operation, either a dump file set or another database if the N E T W O R K _ L I N Kparameter is specified. When the source of the import operation is a dump file set, specifying a mode is optional. If no mode is specified, then Import attempts to load the entire dump file set in the mode in which the export operation was run. The mode is specified on the command line, using the appropriate parameter. The available modes are described in the following sections: "Full Import Mode" "Schema Mode" "Table Mode" "Tablespace Mode" "Transportable Tablespace Mode" Note: When you import a dump file that was created by a full-mode export, the import operation attempts to copy the password for the S Y Saccount from the source database. This sometimes fails (for example, if the password is in a shared password file). If it does fail, then after the import completes, you must set the password for the S Y Saccount at the target database to a password of your choice. Full Import Mode A full import is specified using the F U L Lparameter. In full import mode, the entire content of the source (dump file set or another database) is loaded into the target database. This is the default for file-based imports. You must have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole if the source is another database. Cross-schema references are not imported for non-privileged users. For example, a trigger defined on a table within the importing user's schema, but residing in another user's schema, is not imported. The D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole is required on the target database and the D A T A P U M P _ E X P _ F U L L _ D A T A B A S E role is required on the source database if the N E T W O R K _ L I N Kparameter is used for a full import. See Also: "FULL" Schema Mode A schema import is specified using the S C H E M A Sparameter. In a schema import, only objects owned by the specified schemas are loaded. The source can be a full, table, tablespace, or schema-mode export dump file set or another database. If you have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole, then a list of schemas can be specified and the schemas themselves (including system privilege grants) are created in the database in addition to the objects contained within those schemas. Cross-schema references are not imported for non-privileged users unless the other schema is remapped to the current schema. For example, a trigger defined on a table within the importing user's schema, but residing in another user's schema, is not imported. See Also: "SCHEMAS" Table Mode A table-mode import is specified using the T A B L E Sparameter. In table mode, only the specified set of tables, partitions, and their dependent objects are loaded. The source can be a full, schema, tablespace, or table-mode export dump file set or another database. You must have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole to specify tables that are not in your own schema. You can use the transportable option during a table-mode import by specifying the T R A N P O R T A B L E = A L W A Y Sparameter with the T A B L E Sparameter. Note that this requires use of the N E T W O R K _ L I N Kparameter, as well. See Also:
oracle.su/docs/11g/server.112/e10701/dp_import.htm 2/38

8/9/13

Data Pump Import

"TABLES" "TRANSPORTABLE" "Using Data File Copying to Move Data" Tablespace Mode A tablespace-mode import is specified using the T A B L E S P A C E Sparameter. In tablespace mode, all objects contained within the specified set of tablespaces are loaded, along with the dependent objects. The source can be a full, schema, tablespace, or table-mode export dump file set or another database. For unprivileged users, objects not remapped to the current schema will not be processed. See Also: "TABLESPACES" Transportable Tablespace Mode A transportable tablespace import is specified using the T R A N S P O R T _ T A B L E S P A C E Sparameter. In transportable tablespace mode, the metadata from a transportable tablespace export dump file set or from another database is loaded. The datafiles, specified by the T R A N S P O R T _ D A T A F I L E Sparameter, must be made available from the source system for use in the target database, typically by copying them over to the target system. Encrypted columns are not supported in transportable tablespace mode. This mode requires the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole. Note: You cannot export transportable tablespaces and then import them into a database at a lower release level. The target database must be at the same or higher release level as the source database. See Also: "TRANSPORT_TABLESPACES" "TRANSPORT_FULL_CHECK" "TRANSPORT_DATAFILES"

Network Considerations
You can specify a connect identifier in the connect string when you invoke the Data Pump Import utility. This identifier can specify a database instance that is different from the current instance identified by the current Oracle System ID (SID). The connect identifier can be an Oracle*Net connect descriptor or a name that maps to a connect descriptor. This requires an active listener (to start the listener, enter l s n r c t ls t a r t ) that can be located using the connect descriptor. The following example invokes Import for user h r , using the connect descriptor named i n s t 1 :
>i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = h r . d m pT A B L E S = e m p l o y e e s I m p o r t :R e l e a s e1 1 . 2 . 0 . 1 . 0-P r o d u c t i o no nT u eJ u l1 41 1 : 1 1 : 4 52 0 0 9 C o p y r i g h t( c )1 9 8 2 ,2 0 0 9 ,O r a c l ea n d / o ri t sa f f i l i a t e s . A l lr i g h t sr e s e r v e d . P a s s w o r d :p a s s w o r d @ i n s t 1 C o n n e c t e dt o :O r a c l eD a t a b a s e1 1 gE n t e r p r i s eE d i t i o nR e l e a s e1 1 . 2 . 0 . 1 . 0-P r o d u c t i o n W i t ht h eP a r t i t i o n i n g ,D a t aM i n i n ga n dR e a lA p p l i c a t i o nT e s t i n go p t i o n s

The local Import client connects to the database instance identified by the connect descriptor i n s t 1(a simple net service name, usually defined in a t n s n a m e s . o r afile), to import the data from the dump file set to that database. Specifying a connect identifier when you invoke the Import utility is different than performing an import operation using the N E T W O R K _ L I N Kparameter. Do not confuse the two. When you start an import operation and specify a connect identifier, the local Import client connects to the database instance identified by the connect identifier, retrieves data from that database instance, and writes it to that database instance. There is no dump file set involved. When you perform an import using the N E T W O R K _ L I N Kparameter, the import is performed over a network link. See Also: "NETWORK_LINK" Oracle Database Net Services Administrator's Guide Oracle Database Heterogeneous Connectivity User's Guide

Filtering During Import Operations
Data Pump Import provides data and metadata filtering capability to help you limit the type of information that is imported.

oracle.su/docs/11g/server.112/e10701/dp_import.htm

3/38

but without Package Specifications or Package Bodies. S C H E M A _ E X P O R T _ O B J E C T Sfor schema-mode imports.su/docs/11g/server. and T A B L E _ E X P O R T _ O B J E C T Sfor table-mode and tablespace-mode imports. This is true both on the command line and within parameter files. To use filters correctly and to get the results you expect. the values can be separated by commas or by spaces. For example. not by the import mode. as follows: T A B L E S=\ " M i x e d C a s e T a b l e N a m e \ " oracle. objects participating in the job must pass all of the filters applied to their object types. Be aware that they may not apply to your particular operating system and that this documentation cannot anticipate the operating environments unique to each user. Metadata Filters Data Pump Import provides much greater metadata filtering capability than was provided by the original Import utility. such as the backslash (\). then indexes. and triggers upon the table will also be excluded by the filter. That is. in the following command line.112/e10701/dp_import. Use of Quotation Marks On the Data Pump Command Line Some operating systems treat quotation marks as special characters and will therefore not pass them to an application unless they are preceded by an escape character.8/9/13 Data Pump Import Data Filters Data specific filtering is implemented through the Q U E R Yand S A M P L Eparameters. you could specify T A B L E S = e m p l o y e e s . Each data filter can only be specified once per table and once per job. d m pand n o l o g f i l e . See Also: "Metadata Filters" for an example of using filtering The Import "EXCLUDE" parameter The Import "INCLUDE" parameter Parameters Available in Import's Command-Line Mode This section describes the parameters available in the command-line mode of Data Pump Import. see: Using the Import Parameter Examples Specifying Import Parameters For parameters that can have multiple values specified. if a table is excluded by a filter.htm 4/38 . even though N O L O G F I L Eis a valid parameter. an implicit A N Doperation is applied to them. grants. Suppose you specify the T A B L E Sparameter in a parameter file. Some operating systems may require an additional set of single or double quotation marks on the command line around the entire parameter value containing the special characters. The E X C L U D Eand I N C L U D Eparameters are mutually exclusive. you must enter an equal sign (=) and a value. you could request a full import. specify either N O L O G F I L E = yor N O L O G F I L E = n . Likewise. remember that dependent objects of an identified object are processed along with the identified object. To see which objects can be filtered. For every parameter you enter. which can include or exclude table objects along with any associated row data. if a filter specifies that a package is to be included in an operation. it would be interpreted as another dump file name for the D U M P F I L Eparameter: i m p d pD I R E C T O R Y = d p u m p d i rD U M P F I L E = t e s t . d m p . If different filters using the same name are applied to both a particular table and to the whole job. To avoid this. Note that full object path names are determined by the export mode. the filter parameter supplied for the specific table will take precedence. then grants upon that package will also be included. Data Pump has no other way of knowing that the previous parameter specification is complete and a new parameter specification is beginning. Data filtering can also occur indirectly because of metadata filtering. you can query the following views: D A T A B A S E _ E X P O R T _ O B J E C T Sfor Full-mode imports. The following examples are provided to illustrate these concepts. The same filter name can be specified multiple times within a job. constraints. j o b sor T A B L E S = e m p l o y e e sj o b s . Metadata filters identify a set of objects to be included or excluded from a Data Pump operation. t e s t . which specify restrictions on the table rows that are to be imported. Metadata filtering is implemented through the E X C L U D Eand I N C L U D Eparameters. For background information on setting up the necessary environment to run the examples. For example. d m pN O L O G F I L ET A B L E S = e m p l o y e e s This would result in two dump files being created. If multiple filters are specified for an object type. For example. For example. Be sure to read the following sections before using the Import parameters: Specifying Import Parameters Use of Quotation Marks On the Data Pump Command Line Many of the descriptions include an example of how to use the parameter.

D a t aM i n i n ga n dR e a lA p p l i c a t i o nT e s t i n go p t i o n s Most of the examples use the sample schemas of the seed database. Syntax diagrams of these parameters are provided in "Syntax Diagrams for Data Pump Import". 2 . When you are attached to the job. The examples assume that the directory objects. Aj o b _ n a m edoes not have to be specified if only one running job is associated with your schema and the job is active.2 0 0 9 . See Also: The Import "PARFILE" parameter "Default Locations for Dump. 0-P r o d u c t i o n W i t ht h eP a r t i t i o n i n g .112/e10701/dp_import. Oracle recommends the use of parameter files. 0 . If the job you are attaching to was initially started using an encryption password. See "Default Locations for Dump. which is installed by default when you install Oracle Database. If necessary. the examples use dump files that are generated when you run the Export examples in Chapter 2. ] j o b _ n a m e ] Specify a s c h e m a _ n a m eif the schema to which you are attaching is not your own. Syntax and Description A T T A C H[ = [ s c h e m a _ n a m e . T A B L E S = s c o t t . if there is only one running job. Log.su/docs/11g/server. you must supply the job name. Examples that specify a dump file to import assume that the dump file exists. ask your DBA for help in creating these directory objects and assigning the necessary privileges and roles. Also. some operating systems would require that it be surrounded by single quotation marks. as follows: T A B L E S-' \ " M i x e d C a s e T a b l e N a m e \ " ' To avoid having to supply additional quotation marks on the command line. To see a list of Data Pump job names. the human resources (h r ) schema is often used. Wherever possible. P a s s w o r d :p a s s w o r d C o n n e c t e dt o :O r a c l eD a t a b a s e1 1 gE n t e r p r i s eE d i t i o nR e l e a s e1 1 . be aware of the following: After you enter the username and parameters as shown in the example. In particular. Import displays a description of the job and then displays the Import prompt. 1 . 2 . note that if you use a parameter file and the parameter value being specified does not have quotation marks as the first character in the string (for example. Purpose Attaches the client session to an existing import job and automatically places you in interactive-command mode. these parameters can also be specified in a parameter file. Import is started and you are prompted for a password before a database connection is made: I m p o r t :R e l e a s e1 1 . Restrictions When you specify the A T T A C Hparameter. " E m P " ). already exist and that R E A Dand W R I T Eprivileges have been granted to the h rschema for these directory objects. The examples assume that the h rschema has been granted these roles. and SQL Files" for information about creating directory objects and assigning privileges to them. The only oracle. and SQL Files" for information about creating default directory objects "Examples of Using Data Pump Export" Oracle Database Sample Schemas Your Oracle operating system-specific documentation for information about how special and reserved characters are handled on your system Using the Import Parameter Examples If you try running the examples that are provided for each parameter. ATTACH Default: current job in user's schema. the only other Data Pump parameter you can specify on the command line is E N C R Y P T I O N _ P A S S W O R D . then the use of escape characters may not be necessary on some systems.htm 5/38 . 0 .O r a c l ea n d / o ri t sa f f i l i a t e s . A l lr i g h t sr e s e r v e d . You must have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole to do this.8/9/13 Data Pump Import If you were to specify that on the command line. Some of the examples require the D A T A P U M P _ E X P _ F U L L _ D A T A B A S Eand D A T A P U M P _ I M P _ F U L L _ D A T A B A S Eroles. If the job you are attaching to is stopped. then when you attach to the job you must again enter the E N C R Y P T I O N _ P A S S W O R Dparameter on the command line to re-specify that password. 0-P r o d u c t i o no nT u eJ u l1 41 1 : 3 5 : 4 52 0 0 9 C o p y r i g h t( c )1 9 8 2 . 1 . d p u m p _ d i r 1and d p u m p _ d i r 2 . Unless specifically noted. you can query the D B A _ D A T A P U M P _ J O B Sview or the U S E R _ D A T A P U M P _ J O B Sview. Log.

8/9/13 Data Pump Import exception to this is if the job was initially started with the E N C R Y P T I O N = E N C R Y P T E D _ C O L U M N S _ O N L Yparameter. This is the default. it may be better to specify C L U S T E R = Nto constrain the job to run on the instance where it is started. Use of the C L U S T E Rparameter may affect performance because there is some additional overhead in distributing the import job across Oracle RAC instances. specify C L U S T E R = N . You cannot attach to a job in another schema unless it is already running.htm 6/38 . existing tables. See Also: "Commands Available in Import's Interactive-Command Mode" CLUSTER Default: Y Purpose Determines whether Data Pump can use Oracle Real Application Clusters (RAC) resources and start workers on other Oracle RAC instances. use the S E R V I C E _ N A M Eparameter with the C L U S T E R = Yparameter. The N E T W O R K _ L I N Kvalue of d b s 1would be replaced with the name of the source database from which you were importing data. no database objects are created. To specify a specific. then any index or table statistics imported import operation is complete.2) behavior. >i m p d ph rA T T A C H = i m p o r t _ j o b This example assumes that a job named i m p o r t _ j o bexists in the h rschema. existing service and constrain worker processes to run only on instances defined for that service. Example The following is an example of using the A T T A C Hparameter. the attach operation will fail. the encryption password is not needed when attaching to the job. Up to 3 parallel processes can be used. It is not required when using the C L U S T E R parameter. the job uses only the instance where it is started. Altering the master table in any way will lead to unpredictable results. (Note that there is no dump file generated because this is a network import. no C O N T E N T = M E T A D A T A _ O N L Y . See Also: "SERVICE_NAME" "Oracle RAC Considerations" Example >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1S C H E M A S = h rC L U S T E R = NP A R A L L E L = 3N E T W O R K _ L I N K = d b s 1 This example performs a schema-mode import of the h rschema. Jobs whose performance benefits the most from using the C L U S T E Rparameter are those involving large amounts of data. Because C L U S T E R = Nis used. Restrictions oracle. In that case. table row data is loaded.112/e10701/dp_import. Be aware that if you specify from the dump file are locked after the D A T A _ O N L Yl oads only table row data into M E T A D A T A _ O N L Yloads only database object definitions. Syntax and Description C O N T E N T = { A L L|D A T A _ O N L Y|M E T A D A T A _ O N L Y } A L Lloads any data and metadata contained in the source.) The N E T W O R K _ L I N Kparameter is simply being used as part of the example. For small jobs. Syntax and Description C L U S T E R = [ Y|N ] To force Data Pump Import to use only the instance where the job is started and to replicate pre-Oracle Database 11g release 2 (11.su/docs/11g/server. CONTENT Default: A L L Purpose Enables you to filter what is loaded during the import operation. If the dump file set or master table for the job have been deleted.

It executes a full import because that is the default for file-based imports in which no import mode is specified. the only valid options for the D A T A _ O P T I O N Sparameter are D I S A B L E _ A P P E N D _ H I N Tand S K I P _ C O N S T R A I N T _ E R R O R S . Users with access to oracle. The S K I P _ C O N S T R A I N T _ E R R O R Soption specifies that you want the import operation to proceed even if nondeferred constraint violations are encountered. Disabling the A P P E N Dhint can be useful if there is a small set of data objects to load that already exist in the database and some other application may be concurrently accessing one or more of the data objects. If S K I P _ C O N S T R A I N T _ E R R O R Sis not set. then the A P P E N Dhint will not be used for loading that data object.su/docs/11g/server. If D I S A B L E _ A P P E N D _ H I N Tis not set. S K I P _ C O N S T R A I N T _ E R R O R S- affects how non-deferred constraint violations are handled while a data object (table. Even if S K I P _ C O N S T R A I N T _ E R R O R Sis specified. Example The following is an example of using the C O N T E N Tparameter. then the default behavior is to roll back the entire load of the data object on which non-deferred constraint violations are encountered. It logs any rows that cause non-deferred constraint violations. Example This example shows a data-only table mode import with S K I P _ C O N S T R A I N T _ E R R O R Senabled: >i m p d ph rT A B L E S = e m p l o y e e sC O N T E N T = D A T A _ O N L Y D U M P F I L E = d p u m p _ d i r 1 : t a b l e . then the default behavior is to use the A P P E N Dhint for loading data objects. they will be logged and the import will continue on to completion. Restrictions If D I S A B L E _ A P P E N D _ H I N Tis used. If this parameter is not used. It has no effect on the load if deferred constraint violations are encountered. For import operations. or subpartition) is being loaded. privileged users have access to a default directory object named D A T A _ P U M P _ D I R . Syntax and Description D I R E C T O R Y = d i r e c t o r y _ o b j e c t The d i r e c t o r y _ o b j e c tis the name of a database directory object (not the file path of an actual directory). d m pD A T A _ O P T I O N S = s k i p _ c o n s t r a i n t _ e r r o r s If any non-deferred constraint violations are encountered during this import operation. Syntax and Description D A T A _ O P T I O N S={ D I S A B L E _ A P P E N D _ H I N T|S K I P _ C O N S T R A I N T _ E R R O R S } D I S A B L E _ A P P E N D _ H I N T- Specifies that you do not want the import operation to use the A P P E N Dhint while loading the data object. d m pdump file. DATA_OPTIONS Default: There is no default.htm 7/38 . If S K I P _ C O N S T R A I N T _ E R R O R Sis used and if a data object has unique indexes or constraints defined on it at the time of the load. then the special data handling options it provides simply do not take effect. Purpose The D A T A _ O P T I O N Sparameter provides options for how to handle certain types of data during exports and imports. You can create the e x p f u l l .8/9/13 Data Pump Import The C O N T E N T = M E T A D A T A _ O N L Yparameter and value cannot be used in conjunction with the T R A N S P O R T _ T A B L E S P A C E S(transportable-tablespace-mode) parameter or the Q U E R Yparameter. loading such data objects will take longer when the S K I P _ C O N S T R A I N T _ E R R O R Soption is used.112/e10701/dp_import. but does not stop the load for the data object experiencing the violation. Upon installation. it can take longer for data objects to load. See "FULL". Deferred constraint violations always cause the entire load to be rolled back. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . Therefore. d m pC O N T E N T = M E T A D A T A _ O N L Y This command will execute a full import that will load only the metadata in the e x p f u l l . partition. DIRECTORY Default: D A T A _ P U M P _ D I R Purpose Specifies the default location in which the import job can find the dump file set and where it should create log and SQL files. The C O N T E N T = A L Land C O N T E N T = D A T A _ O N L Yparameter and values cannot be used in conjunction with the S Q L F I L Eparameter. it is not used unless a data object is being loaded using the external table access method. d m pdump file used in this example by running the example provided for the Export F U L Lparameter.

Example The following is an example of using the Import D U M P F I L Eparameter. A directory object specified on the D U M P F I L E . The f i l e _ n a m eis the name of a file in the dump file set. Log. locations. You can create the dump files used in this example by running the example provided for the Export D U M P F I L Eparameter.d m p Purpose Specifies the names and optionally. d m pdump file in the directory pointed to by the d p u m p _ d i r 1directory object. See "DUMPFILE". The password that is specified must be the same one that was specified on the export operation. % U . d m pdump file. d m p L O G F I L E = d p u m p _ d i r 2 : e x p f u l l . provided the file specifications in the D U M P F I L Eparameter encompass the entire set. the value is user-supplied. You must have Read access to the directory used for the dump file set and Write access to the directory used to create the log and SQL files. See Also: "Default Locations for Dump. Syntax and Description E N C R Y P T I O N _ P A S S W O R D=p a s s w o r d This parameter is required on an import operation if an encryption password was specified on the export operation. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . .htm 8/38 . d m p . See "FULL". >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = d p u m p _ d i r 2 : e x p 1 . d m p Because a directory object (d p u m p _ d i r 2 ) is specified for the e x p 1 .112/e10701/dp_import. If you do supply a value here. the import job will look there for the file. The file names can also be templates that contain the substitution variable. It will also look in d p u m p _ d i r 1for dump files of the form e x p 2 n n . A database directory object that is specified as part of the D U M P F I L Eparameter overrides a value specified by the D I R E C T O R Yparameter.8/9/13 D A T A _ P U M P _ D I Rneed Data Pump Import not use the D I R E C T O R Yparameter at all. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. or S Q L F I L Eparameter overrides any directory object that you specify for the D I R E C T O R Yparameter. d m p . See Also: "File Allocation" "Performing a Data-Only Table-Mode Import" ENCRYPTION_PASSWORD Default: There is no default. Syntax and Description D U M P F I L E = [ d i r e c t o r y _ o b j e c t : ] f i l e _ n a m e[ .. Import examines each file that matches the template (until no match is found) to locate all files that are part of the dump file set. it must be a directory object that already exists and that you have access to. and SQL Files" for more information about default directory objects "Oracle RAC Considerations" Oracle Database SQL Language Reference for more information about the C R E A T ED I R E C T O R Ycommand DUMPFILE Default: e x p d a t . Restrictions This parameter is valid only in the Enterprise Edition of Oracle Database 11g. You can create the e x p f u l l . The d p u m p _ d i r 2directory object specified on the L O G F I L Eparameter overrides the D I R E C T O R Yparameter so that the log file is written to d p u m p _ d i r 2 . If % Uis used. the directory objects of the dump file set that was created by Export. Sufficient information is contained within the files for Import to locate the entire set.L O G F I L E . The log file will be written to d p u m p _ d i r 1 . or order that they had at export time.su/docs/11g/server. The % Uexpands to a 2-digit incrementing integer starting with 01. l o g This command results in the import job looking for the e x p f u l l . Example The following is an example of using the D I R E C T O R Yparameter. The files are not required to have the same names. oracle. Purpose Specifies a password for accessing encrypted column data in the dump file set. .e x p 2 % U . This prevents unauthorized access to an encrypted dump file set. ] The d i r e c t o r y _ o b j e c tis optional if one has already been established by the D I R E C T O R Yparameter.

but before importing the table you enable encryption on the E M P N Ocolumn. For this method to be as accurate as possible. Example In the following example. an estimate for the job is calculated based on table statistics. but before importing the table you remove the encryption attribute from the E M P N Ocolumn. all object types contained within the source (and their dependents) are included.su/docs/11g/server. so the percentage complete is automatically calculated. When the import source is a dump file set. When the job begins. all tables should have been analyzed recently. E M P . S T A T I S T I C S- The estimate is calculated using statistics for each table.. any columns in the e m p l o y e e _ s _ e n c r y p ttable that were encrypted during the export operation are decrypted before being imported. >i m p d ph rT A B L E S = j o b _ h i s t o r yN E T W O R K _ L I N K = s o u r c e _ d a t a b a s e _ l i n k D I R E C T O R Y = d p u m p _ d i r 1E S T I M A T E = s t a t i s t i c s The j o b _ h i s t o r ytable in the h rschema is imported from the source database. The estimate may be inaccurate if the Q U E R Y . The E N C R Y P T I O N _ P A S S W O R Dparameter is not valid for network import jobs. d m pE N C R Y P T I O N _ P A S S W O R D = 1 2 3 4 5 6 During the import operation. and one of its columns is named E M P N O . suppose you have a table. For example. >i m p d ph rT A B L E S = e m p l o y e e _ s _ e n c r y p tD I R E C T O R Y = d p u m p _ d i r D U M P F I L E = d p c d 2 b e 1 .8/9/13 Data Pump Import The E N C R Y P T I O N _ P A S S W O R Dparameter is not valid if the dump file set was created using the transparent mode of encryption. the encryption password. EXCLUDE Default: There is no default Purpose Enables you to filter the metadata that is imported by specifying objects and object types to exclude from the import job.S A M P L E . 1 2 3 4 5 6 . or R E M A P _ D A T Aparameter is used. excluding a table will also exclude all indexes and triggers on the table. d m pdump file was created (see "ENCRYPTION_PASSWORD"). For example. except those specified in an E X C L U D Estatement. If an object is excluded. . The E M Ptable is exported without the E M P N Ocolumn being encrypted. Encryption attributes for all columns must match between the exported table definition and the target table. ] For the given mode of import. s o u r c e _ d a t a b a s e _ l i n kwould be replaced with the name of a valid link to the source database.htm 9/38 . Restrictions The Import E S T I M A T Eparameter is valid only if the N E T W O R K _ L I N Kparameter is also specified.112/e10701/dp_import. all of its dependent objects are also excluded. Syntax and Description E X C L U D E = o b j e c t _ t y p e [ : n a m e _ c l a u s e ][ . Syntax and Description E S T I M A T E = { B L O C K S|S T A T I S T I C S } The valid choices for the E S T I M A T Eparameter are as follows: B L O C K S- The estimate is calculated by multiplying the number of database blocks used by the source objects times the appropriate block sizes. A log file is created by default and written to the directory pointed to by the d p u m p _ d i r 1directory object. Example In the following example. The estimate that is generated can be used to determine a percentage complete throughout the execution of the import job. ESTIMATE Default: B L O C K S Purpose Instructs the source system in a network import operation to estimate how much data will be generated. oracle. Both of the following situations would result in an error because the encryption attribute for the E M Pcolumn in the source table would not match the encryption attribute for the E M Pcolumn in the target table: The E M Ptable is exported with the E M P N Ocolumn being encrypted. must be specified because it was specified when the d p c d 2 b e 1 . . the amount of data to be loaded is already known.

Example Assume the following is in a parameter file. Oracle recommends that you place this parameter in a parameter file. being used by a DBA or some other user with the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole. d m pP A R F I L E = e x c l u d e . which can reduce the number of escape characters that might otherwise be needed on the command line. in particular. d m pdump file used in this command by running the example provided for the Export F U L Lparameter. the table would not be found. because single quotation marks are required to delimit the name strings. The name clause applies only to object types whose instances have names (for example. See "FULL".htm 10/38 .112/e10701/dp_import. not the objects contained within users' schemas. there must be an existing table named E M P L O Y E E Susing all upper case. The optional name clause must be separated from the object type with a colon and enclosed in double quotation marks. Specifying E X C L U D E = U S E Rexcludes only the definitions of users. If you try to exclude a user by using a statement such as E X C L U D E =U S E R :"= 'H R '". e x c l u d e . p a r All data from the e x p f u l l . the use of quotation marks when you specify a value for this parameter may also require that you use escape characters. procedures. including upper and lower casing. If the n a m e _ c l a u s ewere supplied as E m p l o y e e sor e m p l o y e e sor any other variation. If no mode were specified. This means that the following E X C L U D Estatements will be interpreted as follows: E X C L U D E = C O N S T R A I N Twill exclude all nonreferential constraints. Depending on your operating system.) E X C L U D E = F U N C T I O N E X C L U D E = P R O C E D U R E E X C L U D E = P A C K A G E E X C L U D E = I N D E X : " L I K E' E M P % '" You could then issue the following command. d m pdump file will be loaded except for functions. E X C L U D E = R E F _ C O N S T R A I N Twill exclude referential integrity (foreign key) constraints.su/docs/11g/server. Restrictions The E X C L U D Eand I N C L U D Eparameters are mutually exclusive. then the default mode. See Also: "Filtering During Import Operations" for more information about the effects of using the E X C L U D Eparameter oracle. i m p d pF U L L = YD U M P F I L E = e x p f u l l . It is a SQL expression used as a filter on the object names of the type. it is applicable to T A B L Eand V I E W .8/9/13 Data Pump Import The n a m e _ c l a u s eis optional. Constraints needed for the table to be created and loaded successfully (for example. primary key constraints for index-organized tables or R E FS C O P Eand W I T HR O W I Dconstraints for tables with R E Fcolumns). See Also: "Use of Quotation Marks On the Data Pump Command Line" As explained in the following sections. you will need to create this file. where h ris the schema name of the user you want to exclude.G R A N T . p a r . packages. if the n a m e _ c l a u s eyou supply is for a table named E M P L O Y E E S . You can create the e x p f u l l . For example. only C R E A T EU S E Rh rDDL statements will be excluded. >i m p d ps y s t e mD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . but not to G R A N T ). C O N S T R A I N T . an import mode of F U L Lis specified. and U S E R . S C H E M A S . and you may not get the results you expect. This would cause an error because the command would indicate that the schema should be both imported and excluded at the same time. specify a command such as the following. Excluding Grants and Users Specifying E X C L U D E = G R A N Texcludes object grants on all object types and system privilege grants. would be used. More than one E X C L U D Estatement can be specified. an existing object in the database. you should be aware of the effects of specifying certain objects for exclusion. Excluding Constraints The following constraints cannot be excluded: N O TN U L Lconstraints. It consists of a SQL operator and the values against which the object names of the specified type are to be compared. It allows fine-grained selection of specific objects within an object type. For example. To exclude a specific user and all objects of that user. (If you want to try the example. The name that you supply for the n a m e _ c l a u s emust exactly match. d m pE X C L U D E = S C H E M A : " = ' H R ' " Note that in this situation. you could set E X C L U D E = I N D E X : " L I K E' D E P T % ' "to exclude all indexes whose names start with d e p t . except for N O TN U L Lconstraints and any constraints needed for successful table creation and loading. and indexes whose names start with e m p .

it would be best to put this parameter in a parameter file. FLASHBACK_TIME Default: There is no default Purpose Specifies the system change number (SCN) that Import will use to enable the Flashback utility. Note: If you are on a logical standby system. See "Use of Quotation Marks On the Data Pump Command Line". p a rN E T W O R K _ L I N K = s o u r c e _ d a t a b a s e _ l i n k The import operation will be performed with data that is consistent with the SCN that most closely matches the specified time. See Oracle Data Guard Concepts and Administration for information about logical standby databases. It is not applicable to Flashback Database. that contains the following: F L A S H B A C K _ T I M E = " T O _ T I M E S T A M P ( ' 2 5 0 8 2 0 0 81 4 : 3 5 : 0 0 ' . E N A B L E _ A T _ T I M Eprocedure accepts. Restrictions This parameter is valid only when the N E T W O R K _ L I N Kparameter is also specified. It is not applicable to Flashback Database.112/e10701/dp_import. The F L A S H B A C K _ S C Nparameter pertains only to the Flashback Query capability of Oracle Database. For example. Note: If you are on a logical standby system.. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1F L A S H B A C K _ S C N = 1 2 3 4 5 6 N E T W O R K _ L I N K = s o u r c e _ d a t a b a s e _ l i n k The s o u r c e _ d a t a b a s e _ l i n kin this example would be replaced with the name of a source database from which you were importing data. Because the T O _ T I M E S T A M Pvalue is enclosed in quotation marks. Restrictions The F L A S H B A C K _ S C Nparameter is valid only when the N E T W O R K _ L I N Kparameter is also specified. F L A S H B A C K _ T I M Eand F L A S H B A C K _ S C Nare mutually exclusive.8/9/13 Data Pump Import FLASHBACK_SCN Default: There is no default Purpose Specifies the system change number (SCN) that Import will use to enable the Flashback utility. Flashback Drop. or Flashback Data Archive. Example You can specify the time in any format that the D B M S _ F L A S H B A C K . Syntax and Description F L A S H B A C K _ T I M E = " T O _ T I M E S T A M P ( ) " The SCN that most closely matches the specified time is found. flashback_imp. or Flashback Data Archive. The F L A S H B A C K _ T I M Eparameter pertains only to the flashback query capability of Oracle Database.' D D M M Y Y Y YH H 2 4 : M I : S S ' ) " You could then issue the following command: >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1P A R F I L E = f l a s h b a c k _ i m p . Example The following is an example of using the F L A S H B A C K _ S C Nparameter. F L A S H B A C K _ S C Nand F L A S H B A C K _ T I M Eare mutually exclusive. the F L A S H B A C K _ S C Nparameter is ignored because SCNs are selected by logical standby. The import operation is performed with data that is consistent as of this SCN. the F L A S H B A C K _ T I M Eparameter is ignored because SCNs are selected by logical standby.htm 11/38 . See Also: Oracle Database Advanced Application Developer's Guide for information about using flashback oracle. and this SCN is used to enable the Flashback utility. suppose you have a parameter file.par. Flashback Drop. Syntax and Description F L A S H B A C K _ S C N = s c n _ n u m b e r The import operation is performed with data that is consistent as of the specified s c n _ n u m b e r . See Oracle Data Guard Concepts and Administration for information about logical standby databases.su/docs/11g/server.

HELP Default: n Purpose Displays online help for the Import utility. only schemas that map to your own schema are imported.htm 12/38 .8/9/13 Data Pump Import FULL Default: Y Purpose Specifies that you want to perform a full database import. You can create the e x p f u l l . See "FULL". The directory objects can be different. If the N E T W O R K _ L I N Kparameter is used. Syntax and Description H E L P = y If H E L P =yis specified. Syntax and Description I N C L U D E=o b j e c t _ t y p e [ : n a m e _ c l a u s e ][ . Therefore. including upper and lower casing. The optional name clause must be separated from the object type with a colon and enclosed in double quotation marks. it is applicable to T A B L E . The n a m e _ c l a u s eis optional. Example The following is an example of using the F U L Lparameter. . For example. l o g This example imports everything from the e x p f u l l . It is a SQL expression used as a filter on the object names of the type. d m pF U L L = y L O G F I L E = d p u m p _ d i r 2 : f u l l _ i m p . d m pdump file. F U L Lis the default mode when you are performing a file-based import. It consists of a SQL operator and the values against which the object names of the specified type are to be compared. a directory object must be provided on both the D U M P F I L Eparameter and the L O G F I L Eparameter. as shown in this example. If the n a m e _ c l a u s ewere supplied as E m p l o y e e sor e m p l o y e e sor any other variation. if the n a m e _ c l a u s eyou supply is for a table named E M P L O Y E E S . oracle. The name that you supply for the n a m e _ c l a u s emust exactly match. a D I R E C T O R Yparameter is not provided.su/docs/11g/server. but not to G R A N T ). because single quotation marks are required to delimit the name strings. Syntax and Description F U L L = y A value of F U L L = yindicates that all data and metadata from the source (either a dump file set or another database) is imported. The name clause applies only to object types whose instances have names (for example. the table would not be found. If you are an unprivileged user importing from a file. More than one I N C L U D Estatement can be specified. . It allows fine-grained selection of specific objects within an object type. In this example.112/e10701/dp_import. Example >i m p d pH E L P=y This example will display a brief description of all Import parameters and commands. there must be an existing table named E M P L O Y E E Susing all upper case. ] Only object types in the source (and their dependents) that are explicitly specified in the I N C L U D Estatement are imported. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. an existing object in the database. then that user must also have the D A T A P U M P _ E X P _ F U L L _ D A T A B A S Erole on the source database. INCLUDE Default: There is no default Purpose Enables you to filter the metadata that is imported by specifying objects and object types for the current import mode. Import displays a summary of all Import command-line parameters and interactive commands.. Filtering can restrict what is imported using this import mode (see "Filtering During Import Operations"). the U S E R I Dthat is executing the import job has the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole on the target database. >i m p d ph rD U M P F I L E = d p u m p _ d i r 1 : e x p f u l l .

If the f i l e _ n a m eyou specify already exists. This overrides the directory object specified with the D I R E C T O R Yparameter. being used by a DBA or some other user with the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole: I N C L U D E = F U N C T I O N I N C L U D E = P R O C E D U R E I N C L U D E = P A C K A G E I N C L U D E = I N D E X : " L I K E' E M P % '" You can then issue the following command: >i m p d ps y s t e mS C H E M A S = h rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l .su/docs/11g/server. d m pdump file used in this example by running the example provided for the Export F U L L parameter. and optionally. and errors encountered are written to the log file. it will be overwritten. The Import operation will load only functions. JOB_NAME Default: system-generated name of the form S Y S _ < I M P O R To rS Q L F I L E > _ < m o d e > _ N N Purpose The job name is used to identify the import job in subsequent actions. The default job name is system-generated in the form S Y S _ I M P O R T _ m o d e _ N Nor S Y S _ S Q L F I L E _ m o d e _ N N . i m p _ i n c l u d e . d m p P A R F I L E = i m p _ i n c l u d e .l o g Purpose Specifies the name. Example Assume the following is in a parameter file. An example of a default name is ' S Y S _ I M P O R T _ T A B L E S P A C E _ 0 2 '.8/9/13 Data Pump Import Depending on your operating system. See "FULL". If spaces are included. work completed. such as when the A T T A C Hparameter is used to attach to a job. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . Although this is a privileged-mode import (the user must have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole). The master table controls the import job. procedures. Oracle recommends that you place this parameter in a parameter file. the log file is relative to oracle. Syntax and Description J O B _ N A M E = j o b n a m e _ s t r i n g The j o b n a m e _ s t r i n gspecifies a name of up to 30 bytes for this import job. p a r You can create the e x p f u l l . you can query the following views: D A T A B A S E _ E X P O R T _ O B J E C T Sfor Full mode. The bytes must represent printable characters and spaces. or to identify the job via the D B A _ D A T A P U M P _ J O B Sor U S E R _ D A T A P U M P _ J O B Sviews. for the log file of the import job. where N N expands to a 2-digit incrementing integer starting at 01. p a r . To see a list of valid paths for use with the I N C L U D Eparameter. a directory object. S C H E M A _ E X P O R T _ O B J E C T Sfor schema mode. See "FULL". The default behavior is to create i m p o r t . As with the dump file set.112/e10701/dp_import. 'Thursday Import'). use the S T A T U Scommand in interactive mode. See "Use of Quotation Marks On the Data Pump Command Line".l o gin the directory referenced by the directory object specified in the D I R E C T O R Yparameter. Example The following is an example of using the J O B _ N A M Eparameter. (For a realtime status of the job. the name must be enclosed in single quotation marks (for example.htm 13/38 . d m pJ O B _ N A M E = i m p j o b 0 1 LOGFILE Default: i m p o r t . All messages regarding work in progress. it must be one that was previously established by the DBA and that you have access to. the use of quotation marks when you specify a value for this parameter may also require that you use escape characters. Restrictions The I N C L U D Eand E X C L U D Eparameters are mutually exclusive.) A log file is always created unless the N O L O G F I L Eparameter is specified. and T A B L E _ E X P O R T _ O B J E C T Sfor table and tablespace mode. Syntax and Description L O G F I L E = [ d i r e c t o r y _ o b j e c t : ] f i l e _ n a m e If you specify a d i r e c t o r y _ o b j e c t . The job name is implicitly qualified by the schema of the user performing the import operation. The job name becomes the name of the master table in the current user's schema. the schema definition is not imported. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. which can reduce the number of escape characters that might otherwise be needed on the command line. because the U S E Robject type was not specified in an I N C L U D Estatement. and packages from the h rschema and indexes whose names start with E M P . You can create the e x p f u l l .

When the N E T W O R K _ L I N Kparameter is used with the T A B L E Sparameter. Note: Data Pump Import writes the log file using the database character set. the log file must be written to a disk file. The only exception to this is if T R A N S P O R T A B L E = A L W A Y Sis also specified. this prevents the writing of the log file. retrieves data from it. then all data is imported as clear text even if it is encrypted in the database. If the source database is read-only.su/docs/11g/server. in which case single or multiple partitions of a specified table can be imported. see Oracle Database SQL Language Reference. For further details about this. d m p Because no directory object is specified on the L O G F I L Eparameter. and writes the data to the database on the connected instance. The s o u r c e _ d a t a b a s e _ l i n kprovided must be the name of a database link to an available database. Network imports do not support L O N Gcolumns. Alternatively. Restrictions To perform a Data Pump Import using Oracle Automatic Storage Management (Oracle ASM). you can specify N O L O G F I L E = Y . and not written into the Oracle ASM storage. Syntax and Description N E T W O R K _ L I N K = s o u r c e _ d a t a b a s e _ l i n k The N E T W O R K _ L I N Kparameter initiates an import via a database link. Network imports do not support the use of evolved types. If the U S E R I Dthat is executing the import job has the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole on the target database. Restrictions The Import N E T W O R K _ L I N Kparameter is not supported for tables containing SecureFiles that have ContentType set or that are currently stored outside of the SecureFile segment through Oracle Database File System Links. There are no dump files involved. That is. See "FULL". For more information about the C R E A T ED A T A B A S EL I N Kstatement. see the information about creating locally managed temporary tablespaces in the Oracle Database Administrator's Guide. When you perform a network import using the transportable method. the job will fail. See Oracle Database Advanced Security Administrator's Guide for more information about network security.T R A N S P O R T _ T A B L E S P A C E S . you must specify a L O G F I L Eparameter that includes a directory object that does not include the Oracle ASM + notation. Otherwise. This means that the system to which the i m p d pclient is connected contacts the source database referenced by the s o u r c e _ d a t a b a s e _ l i n k . The data from the source database instance is written directly back to the connected database instance. If the database on that instance does not already have a database link. you or your DBA must create one. E S T I M A T E .htm 14/38 .F L A S H B A C K _ T I M E . If your client N L S _ L A N Genvironment sets up a different client character set from the database character set. However. the log file is written to the directory object specified on the D I R E C T O R Yparameter. Caution: If an import operation is performed over an unencrypted network link. you must copy the source data files to the target database before you start the import. You can create the e x p f u l l . This parameter is required when any of the following parameters are specified: F L A S H B A C K _ S C N . or T R A N S P O R T A B L E . oracle. Example The following is an example of using the L O G F I L Eparameter. then the connected user must have a locally managed tablespace assigned as the default temporary tablespace on the source database. l o g D U M P F I L E = d p u m p _ d i r 1 : e x p f u l l . only whole tables can be imported (not partitions of tables). then it is possible that table names may be different in the log file than they are when displayed on the client output screen. See Also: "STATUS" "Using Directory Objects When Oracle Automatic Storage Management Is Enabled" for information about Oracle Automatic Storage Management and directory objects NETWORK_LINK Default: There is no default Purpose Enables an import from a (source) database identified by a valid database link.8/9/13 Data Pump Import the server and not the client. >i m p d ph rS C H E M A S = H RD I R E C T O R Y = d p u m p _ d i r 2L O G F I L E = i m p . d m pdump file used in this example by running the example provided for the Export F U L Lparameter.112/e10701/dp_import.

If the import operation has P A R A L L E Lset to a value greater than 1. Restrictions This parameter is valid only in the Enterprise Edition of Oracle Database 11g. PARALLEL Default: 1 Purpose Specifies the maximum number of threads of active execution operating on behalf of the import job. If there are no clients attached to a running job and you specify N O L O G F I L E = y . Example In the following example. Example oracle. Therefore. if an import operation has P A R A L L E L = 1 . Example The following is an example of using the N O L O G F I L Eparameter. but performance may be limited by I/O contention. progress and error information is still written to the standard output device of any attached clients. idle workers. No log file is written because N O L O G F I L Eis set to y . See Also: "Controlling Resource Consumption" Using PARALLEL During An Import In An Oracle RAC Environment In an Oracle Real Application Clusters (RAC) environment. The log file is written to d p u m p _ d i r 1 . you run the risk of losing important progress and error information. and for building indexes.htm 15/38 . including the client that started the original export operation. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . then Data Pump processes can reside on instances other than the one where the job was started. use interactive-command mode.112/e10701/dp_import. then all Data Pump processes reside on the instance where the job is started. To increase or decrease the value of P A R A L L E Lduring job execution. and connected-user. the s o u r c e _ d a t a b a s e _ l i n kwould be replaced with the name of a valid database link. the directory object can point to local storage for that instance. Syntax and Description P A R A L L E L = i n t e g e r The value you specify for i n t e g e rspecifies the maximum number of threads of active execution operating on behalf of the import job. Therefore. >i m p d ph rT A B L E S = e m p l o y e e sD I R E C T O R Y = d p u m p _ d i r 1 N E T W O R K _ L I N K = s o u r c e _ d a t a b a s e _ l i n kE X C L U D E = C O N S T R A I N T This example results in an import of the e m p l o y e e stable (excluding constraints) from the source database. the directory object must point to shared storage that is accessible by all instances of the Oracle RAC. d m pdump file. specified on the D I R E C T O R Yparameter.8/9/13 Data Pump Import then that user must also have the D A T A P U M P _ E X P _ F U L L _ D A T A B A S Erole on the source database. fixed-user. The master control process. The only types of database links supported by Data Pump Import are: public. and worker processes acting as parallel execution coordinators in parallel I/O operations do not count toward this total. Parallelism is used for loading user data and package bodies. multiple processes can read from the same file.su/docs/11g/server. This execution set consists of a combination of worker processes and parallel I/O server processes. If the source of the import is a dump file set consisting of files. NOLOGFILE Default: n Purpose Specifies whether to suppress the default behavior of creating a log file. d m pN O L O G F I L E = y This command results in a full mode import (the default for file-based imports) of the e x p f u l l . Syntax and Description N O L O G F I L E = { y|n } If you specify N O L O G F I L E = yto suppress creation of a log file. This parameter enables you to make trade-offs between resource consumption and elapsed time. Current-user database links are not supported.

d m p . might be as follows: T A B L E S =c o u n t r i e s . Restrictions If the export operation that created the dump file was performed with the transportable method and if a partition or subpartition was specified.l o c a t i o n s .) The names of the dump files are p a r _ e x p 0 1 . d m p . l o g J O B _ N A M E = i m p _ p a r 3D U M P F I L E = p a r _ e x p % U .8/9/13 Data Pump Import The following is an example of using the P A R A L L E Lparameter. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1L O G F I L E = p a r a l l e l _ i m p o r t . (See "DUMPFILE". d m pP A R A L L E L = 3 This command imports the dump file set that is created when you run the example for the Export P A R A L L E Lparameter.112/e10701/dp_import. e x p 2 % U . If the export operation that created the dump file was performed with the transportable method. A value of m e r g ecombines all partitions and subpartitions into one table. The log file for the job will also be written to d p u m p _ d i r 1 .r e g i o n s D U M P F I L E = d p u m p _ d i r 2 : e x p 1 . a directory object name is neither required nor appropriate.htm 16/38 . and r e g i o n swill be imported from the dump file set that is created when you run the example for the Export D U M P F I L Eparameter. See Also: "Use of Quotation Marks On the Data Pump Command Line" Restrictions The P A R F I L Eparameter cannot be specified within a parameter file.su/docs/11g/server. p a r The tables named c o u n t r i e s . as appropriate. d m pfile in the location pointed to by d p u m p _ d i r 2 . and p a r _ e x p 0 3 . Example The content of an example parameter file. Purpose Specifies how table partitions should be created during an import operation. Therefore. along with a partition or subpartition filter. A value of d e p a r t i t i o npromotes each partition or subpartition to a new individual table. Syntax and Description P A R T I T I O N _ O P T I O N S = { n o n e|d e p a r t i t i o n|m e r g e } A value of n o n ecreates tables as they existed on the system from which the export operation was performed. d m p . The default name of the new table will be the concatenation of the table and partition name or the table and subpartition name. Syntax and Description P A R F I L E = [ d i r e c t o r y _ p a t h ] f i l e _ n a m e Unlike dump files. In such a case. Example The following example assumes that the s h . you must use the departition option. d m p D I R E C T O R Y = d p u m p _ d i r 1 P A R A L L E L = 3 You could then issue the following command to execute the parameter file: >i m p d ph rP A R F I L E = h r _ i m p . It uses the oracle. Otherwise. and SQL files which are created and written by the server. (See "PARALLEL". then the import operation cannot use P A R T I T I O N _ O P T I O N S = m e r g e . PARTITION_OPTIONS Default: The default is d e p a r t i t i o nwhen partition names are specified on the T A B L E Sparameter and T R A N P O R T A B L E = A L W A Y Sis set (whether on the import operation or during the export). then the import operation must use the d e p a r t i t i o noption. the parameter file is opened and read by the i m p d pclient.l o c a t i o n s .p a r _ e x p 0 2 . The use of parameter files is highly recommended if you are using parameters whose values require the use of quotation marks. an error message is generated and the objects are not loaded. p a r . d m pin the location pointed to by d p u m p _ d i r 1 . d m p . The default is the user's current directory. the default is n o n e . You cannot use the n o n eoption or the m e r g eoption if the export was performed with the transportable method. log files. h r _ i m p . If there are any grants on objects being departitioned. PARFILE Default: There is no default Purpose Specifies the name of an import parameter file.) The import job looks for the e x p 1 . It looks for any dump files of the form e x p 2 n n . d m p . s a l e stable has been exported into a dump file named s a l e s .

you must be granted access to that specific table. When the query is to be applied to a specific table. Oracle recommends that you place this parameter in a parameter file. suppose you are importing a subset of the s h . p a r . c u s t _ i d ) " ' If K U $is not used for a table alias. In the following example. The table alias used by Data Pump for the table being loaded is K U $ . c u s t o m e r stable. ] t a b l e _ n a m e : ] q u e r y _ c l a u s e The q u e r y _ c l a u s eis typically a SQL W H E R Eclause for fine-grained row selection.000.su/docs/11g/server. the external tables method (rather than the direct path method) is used for data access.8/9/13 m e r g eoption to Data Pump Import merge all the partitions in s h . Restrictions The Q U E R Yparameter cannot be used with the following parameters: C O N T E N T = M E T A D A T A _ O N L Y S Q L F I L E T R A N S P O R T _ D A T A F I L E S When the Q U E R Yparameter is specified for a table. K U $is used to qualify the c u s t _ i dfield in the Q U E R Yparameter for loading s h . Suppose you have a parameter file. and if those columns are used in the query. but only one query can be specified per table. More than one table-specific query can be specified. When the Q U E R Yparameter is used. which means that the actual maximum length allowed is 3998 bytes. the query is applied to (and must be valid for) all tables in the source dump file set or database. s a l e s . The value of the Q U E R Yparameter is included in the W H E R Eclause of the S E L E C Tportion of the I N S E R Tstatement. s a l e stable based on the credit limit for a customer in the s h .htm 17/38 .112/e10701/dp_import. If the Q U E R Yparameter includes references to another table with columns whose names match the table being loaded. Depending on your operating system. s a l e sinto one non-partitioned table in s c o t tschema. Syntax and Description Q U E R Y = [ [ s c h e m a _ n a m e . d m pR E M A P _ S C H E M A = s h : s c o t t See Also: "TRANSPORTABLE" for an example of performing an import operation using P A R T I T I O N _ O P T I O N S = d e p a r t i t i o n QUERY Default: There is no default Purpose Allows you to specify a query clause that filters the data that gets imported. A table-specific query overrides a query applied to all tables. >i m p d ps y s t e mT A B L E S = s h . For example. c u s t _ i d ) " ' The maximum length allowed for a Q U E R Ystring is 4000 bytes including quotation marks. The query must be enclosed in single or double quotation marks. which can reduce the number of escape characters that might otherwise be needed on the command line. s a l e sP A R T I T I O N _ O P T I O N S = m e r g e D I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = s a l e s . If a schema and table name are not supplied. c u s t _ i d=c . See "FULL". To specify a schema other than your own in a table-specific query. Because the Q U E R Yvalue uses quotation marks. the result will be that all rows are loaded: Q U E R Y = ' s a l e s : " W H E R EE X I S T S( S E L E C Tc u s t _ i dF R O Mc u s t o m e r sc W H E R Ec u s t _ c r e d i t _ l i m i t>1 0 0 0 0A N Dc u s t _ i d=c . because strings within the clause must be enclosed in single quotation marks. that contains the following: Q U E R Y = d e p a r t m e n t s : " W H E R Ed e p a r t m e n t _ i d<1 2 0 " You can then enter the following command: oracle. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. q u e r y _ i m p . then you will need to use a table alias to distinguish between columns in the table being loaded and columns in the S E L E C T statement with the same name. Q U E R Y = ' s a l e s : " W H E R EE X I S T S( S E L E C Tc u s t _ i dF R O Mc u s t o m e r sc W H E R Ec u s t _ c r e d i t _ l i m i t>1 0 0 0 0A N Dk u $ . See "Use of Quotation Marks On the Data Pump Command Line". Data Pump imports only rows for customers whose credit limit is greater than $10. External tables uses a SQL I N S E R Tstatement with a S E L E C Tclause. For example. You can create the e x p f u l l . an O R D E RB Yclause could be used to speed up a migration from a heap-organized table to an index-organized table. Oracle recommends that you use a parameter file. As a result. Data Pump uses external tables to load the target table. a colon (:) must separate the table name from the query clause. the use of quotation marks when you specify a value for this parameter may also require that you use escape characters. Example The following is an example of using the Q U E R Yparameter. Double quotation marks are recommended. but could be any SQL clause.

the schema containing the table to be remapped. e m p l o y e e s . As a default. only data that meets the criteria specified in the Q U E R Yparameter is imported.htm 18/38 . c o l u m n _ n a m e : [ s c h e m a . This is useful when you want to guarantee consistency in remapping both the child and parent column in a referential constraint.8/9/13 Data Pump Import >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l .su/docs/11g/server. function -. in the order in which they appear in the syntax. this is the schema of the user doing the import. ] p k g . e m p l o y e e sR E M A P _ D A T A = h r . and C R E A T ED I R E C T O R Y . d m pare imported. See Also: "Use of Quotation Marks On the Data Pump Command Line" oracle. d m p T A B L E S = h r . p l u s x REMAP_DATAFILE Default: There is no default Purpose Changes the name of the source datafile to the target datafile name in all SQL statements where the source datafile is referenced: C R E A T ET A B L E S P A C E . f u n c t i o n The description of each syntax element. is as follows: schema -. A common use is to regenerate primary keys to avoid conflict when importing a table into a pre-existing table on the target database. the use of quotation marks when you specify a value for this parameter may also require that you use escape characters. You can specify a remap function that takes as a source the value of the designated column from either the dump file or a remote database. schema -. p a rN O L O G F I L E = Y All tables in e x p f u l l .the name of the function within the PL/SQL that will be called to remap the column table in each row of the specified table. Syntax and Description R E M A P _ D A T A F I L E = s o u r c e _ d a t a f i l e : t a r g e t _ d a t a f i l e Remapping datafiles is useful when you move databases between platforms that have different file naming conventions. which can reduce the number of escape characters that might otherwise be needed on the command line. d m p P A R F I L E = q u e r y _ i m p . Depending on your operating system. r e m a p .the table whose column will be remapped. pkg -. column_name -. By default.112/e10701/dp_import. but for the d e p a r t m e n t stable.C R E A T EL I B R A R Y . Syntax and Description R E M A P _ D A T A = [ s c h e m a .the schema containing the PL/SQL package you created that contains the remapping function. Remapping functions should not perform commits or rollbacks except in autonomous transactions. this is the schema of the user doing the import.the column whose data is to be remapped. You must have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole to specify this parameter. REMAP_DATA Default: There is no default Purpose The R E M A P _ D A T Aparameter allows you to remap data as it is being inserted into a new database. Example The following example assumes a package named r e m a phas been created that contains a function named p l u s xthat changes the values for f i r s t _ n a m ein the e m p l o y e e stable. ] t a b l e n a m e . f i r s t _ n a m e : h r . tablename -. Restrictions The datatypes of the source argument and the returned value should both match the datatype of the designated column in the table. The remap function then returns a remapped value that will replace the original value in the target database. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p s c h e m a .the name of the PL/SQL package you created that contains the remapping function. Oracle recommends that you enclose datafile names in quotation marks to eliminate ambiguity on platforms for which a colon is a valid file specification character. Oracle recommends that you place this parameter in a parameter file. The s o u r c e _ d a t a f i l eand t a r g e t _ d a t a f i l enames should be exactly as you want them to appear in the SQL statements where they are referenced. The same function can be applied to multiple columns being dumped.

you cannot connect to s c o t ton completion of the import. because there are certain schema references that Import is not capable of finding. oracle. and packages. (Privileged users can perform unrestricted schema remaps. procedures. However.8/9/13 Data Pump Import Example Suppose you had a parameter file. you execute the following Export and Import commands to remap the h rschema into the s c o t tschema: >e x p d ps y s t e mS C H E M A S = h rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = h r . then after the import is complete. For example. you must assign it a valid password to connect to it. If the schema you are remapping to does not already exist. d b f ) to a UNIX file specification.) For example. d m p . d p u m p _ d i r 1 . For example. or if you do not have privileges. and provided that you are importing with enough privileges. Syntax and Description R E M A P _ S C H E M A = s o u r c e _ s c h e m a : t a r g e t _ s c h e m a Multiple R E M A P _ S C H E M Alines can be specified. You can connect to the s c o t tschema after the import by using the existing password (without resetting it). because the user S Y S T E Mhas the necessary privileges: >e x p d ps y s t e mS C H E M A S = h r P a s s w o r d :p a s s w o r d >e x p d ps y s t e mF U L L = y P a s s w o r d :p a s s w o r d If your dump file set does not contain the metadata necessary to create a schema. S C O T Tcan remap his B L A K E 's objects to S C O T T . d b f ' : ' / d b 1 / h r d a t a / p a y r o l l / t b s 6 .d m p . which requires privileges. p a r This example remaps a VMS file specification (D R 1 $ : [ H R D A T A .is located by the directory object. unless you reset the password for s c o t ton the target database after the import completes. then the import operation creates it. was created by S Y S T E M . but S C O T Tcannot remap S C O T T 's objects to B L A K E . This is because the unprivileged dump files do not contain the necessary information for the import to create the schema automatically. views. d b f ' " You can then issue the following command: >i m p d ph rP A R F I L E = p a y r o l l . Import will not find schema references embedded within the body of definitions of types. with the following content: D I R E C T O R Y = d p u m p _ d i r 1 F U L L = Y D U M P F I L E = d b _ f u l l . is: S Q L >A L T E RU S E Rs c h e m a _ n a m eI D E N T I F I E DB Yn e w _ p a s s w o r d Restrictions Unprivileged users can perform schema remaps only if their schema is the target schema of the remap. P A Y R O L L ] t b s 6 . but the source schema must be different for each one. d m p >i m p d ps y s t e mD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = h r . Import automatically creates it with an unusable password. If the import operation does create the schema. p a y r o l l . p a r . then the target schema must be created before the import operation is performed. d m pR E M A P _ S C H E M A = h r : s c o t t In this example. (/ d b 1 / h r d a t a / p a y r o l l / t b s 6 . if user s c o t talready exists before the import. h r . REMAP_TABLE Default: There is no default Purpose Allows you to rename tables during an import operation.htm 19/38 .su/docs/11g/server. then the Import R E M A P _ S C H E M Acommand will add objects from the h rschema into the existing s c o t tschema. REMAP_SCHEMA Default: There is no default Purpose Loads all objects from the source schema into a target schema. The mapping may not be 100 percent complete. This is possible because the dump file. d b f ) for all SQL DDL statements during the import. d m p R E M A P _ D A T A F I L E = " ' D B 1 $ : [ H R D A T A . If user s c o t tdoes not exist before you execute the import operation. d b _ f u l l . provided that the dump file set contains the necessary C R E A T EU S E Rmetadata for the source schema.112/e10701/dp_import. different source schemas can map to the same target schema. The SQL statement to do this. Example Suppose that. as user S Y S T E M . P A Y R O L L ] t b s 6 .which has the privileges necessary to create a dump file that contains the metadata needed to create a schema. the following Export commands create dump file sets with the necessary metadata to create a schema. The dump file. However.

Bis the old table name. Restrictions Only objects created by the Import will be remapped. p a r t i t i o n ] : n e w _ t a b l e n a m e OR R E M A P _ T A B L E = [ s c h e m a . The target schema must have sufficient quota in the target tablespace. ] o l d _ t a b l e n a m e [ . Syntax and Description R E M A P _ T A B L E S P A C E = s o u r c e _ t a b l e s p a c e : t a r g e t _ t a b l e s p a c e Multiple R E M A P _ T A B L E S P A C Eparameters can be specified. but no two can have the same source tablespace. Example The following is an example of using the R E M A P _ T A B L E S P A C Eparameter. if you specify R E M A P _ T A B L E = A . B : C . In particular. Import assumes that Ais a schema name. Restrictions Data Pump Import can only remap tablespaces for transportable imports in databases where the compatibility level is set to 10. ] o l d _ t a b l e n a m e [ : p a r t i t i o n ] : n e w _ t a b l e n a m e You can use the R E M A P _ T A B L Eparameter to rename entire tables or to rename table partitions if the table is being departitioned. and it works regardless of how many tablespace subclauses are in the DDL statement. >i m p d ph rR E M A P _ T A B L E S P A C E = t b s _ 1 : t b s _ 6D I R E C T O R Y = d p u m p _ d i r 1 D U M P F I L E = e m p l o y e e s . The R E M A P _ T A B L Eparameter will not work if the table being remapped has named constraints in the same schema and the constraints need to be created when the table is created.T R U N C A T E . and Cis the new table name.8/9/13 Data Pump Import Syntax and Description You can use either of the following syntaxes (see the Usage Notes below): R E M A P _ T A B L E = [ s c h e m a .htm 20/38 . e m p l o y e e sR E M A P _ T A B L E = h r . In particular. Note that use of the R E M A P _ T A B L E S P A C Eparameter is the only way to remap a tablespace in Data Pump Import. No schema name is required. Only objects created by the Import will be remapped. Example The following is an example of using the R E M A P _ T A B L Eparameter to rename the e m p l o y e e stable to a new name of e m p s : >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p s c h e m a . That method was subject to many restrictions (including the number of tablespace subclauses) which sometimes resulted in the failure of some DDL commands.1 or later. the Data Pump Import method of using the R E M A P _ T A B L E S P A C Eparameter works for all objects. you only need to qualify it with the old table name. Syntax and Description oracle. Usage Notes Be aware that with the first syntax. By contrast. including the user. the tablespaces for preexisting tables will not be remapped if T A B L E _ E X I S T S _ A C T I O Nis set to S K I P . To use the second syntax to rename a partition being promoted to a nonpartitioned table. or A P P E N D . e m p l o y e e s : e m p s REMAP_TABLESPACE Default: There is no default Purpose Remaps all objects selected for import with persistent data in the source tablespace to be created in the target tablespace. d m p T A B L E S = h r .) You can also use it to override the automatic naming of table partitions that were exported. (See "PARTITION_OPTIONS". you must specify a schema name. preexisting tables will not be remapped.112/e10701/dp_import.su/docs/11g/server. d m p REUSE_DATAFILES Default: n Purpose Specifies whether the import job should reuse existing datafiles for tablespace creation. To use the first syntax to rename a partition that is being promoted to a nonpartitioned table. This is a simpler and cleaner method than the one provided in the original Import utility.

htm 21/38 . If this parameter is specified as y . regardless of whether it is part of the resource group.su/docs/11g/server. >i m p d ph rS C H E M A S = h rD I R E C T O R Y = d p u m p _ d i r 1L O G F I L E = s c h e m a s . You can create the e x p f u l l . is written to d p u m p _ d i r 1 . The service name is only used to determine the resource group and instances defined for that resource group. ] If you have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole. l o g R E U S E _ D A T A F I L E S = Y This example reinitializes datafiles referenced by C R E A T ET A B L E S P A C Estatements in the e x p f u l l . you can use this parameter to perform a schema-mode import by specifying a list of schemas to import. Then all objects contained within the schemas are imported. the user definitions are imported (if they do not already exist). SERVICE_NAME Default: There is no default Purpose Used to specify a service name to be used in conjunction with the C L U S T E Rparameter. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. and so on. which is y e s ) and you do not specify the S E R V I C E _ N A M Eparameter. and C only. B. First. See "SCHEMAS". B. Example The following is an example of using the R E U S E _ D A T A F I L E Sparameter. The log file. and C only. and D. depending on the degree of parallelism specified. but the import job continues. B. d m pfile. no information about the schema definition is imported. In that case. C. oracle. d m pL O G F I L E = r e u s e . l o g D U M P F I L E = e x p d a t . s c h e m a s . and D. The instance where the job is started is always used. Caution: Specifying R E U S E _ D A T A F I L E S = ymay result in a loss of data. You can create the e x p d a t . Schema mode is the default mode when you are performing a network-based import. typically a subset of all the Oracle RAC instances. the following would be true: If you start a Data Pump job on instance A and specify C L U S T E R = Y(or accept the default. d m pfile used in this example by running the example provided for the Export S C H E M A Sparameter. SCHEMAS Default: There is no default Purpose Specifies that a schema-mode import is to be performed. l o g . See "FULL".8/9/13 Data Pump Import R E U S E _ D A T A F I L E S = { y|n } If the default (n ) is used and the datafiles specified in C R E A T ET A B L E S P A C Estatements already exist. Suppose you have an Oracle RAC configuration containing instances A. the existing datafiles are reinitialized. In such a scenario. Syntax and Description S C H E M A S = s c h e m a _ n a m e[ . only the objects contained within it. C. Syntax and Description S E R V I C E _ N A M E = n a m e The S E R V I C E _ N A M Eparameter can be used with the C L U S T E R = Yparameter to specify an existing service associated with a resource group that defines a set of Oracle Real Application Clusters (RAC) instances belonging to that resource group. B. including system and role grants. . . Data Pump creates workers on all instances: A. If you start a Data Pump job on instance A and specify C L U S T E R = Yand S E R V I C E _ N A M E = m y _ s e r v i c e . Example The following is an example of using the S C H E M A Sparameter. . Also suppose that a service named m y _ s e r v i c eexists with a resource group consisting of instances A.112/e10701/dp_import. then workers can be started on instances A. d m p The h rschema is imported from the e x p d a t . d m pfile. The S E R V I C E _ N A M Eparameter is ignored if C L U S T E R = Nis also specified. The use of filtering can restrict what is imported using this import mode. See "Filtering During Import Operations". password history. an error message from the failing C R E A T ET A B L E S P A C Estatement is issued. Nonprivileged users can specify only their own schemas or schemas remapped to their own schemas. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l .

continue to be updated as rows are inserted. then the setting of the Oracle Database configuration parameter. with indexes not previously set Unusable. S K I P _ U N U S A B L E _ I N D E X E S(whose default value is y ). Note: This parameter is useful only when importing data into an existing table. If this parameter is not specified. d m pL O G F I L E = s k i p . the objects from that edition are imported. as if the unusable index did not exist. Even though C L U S T E R = Yis not specified on the command line. then any S E R V I C E _ N A M Eparameter you specify is ignored and all processes will start on instance A. then the data is not imported into that table. If the S K I P _ U N U S A B L E _ I N D E X E Sparameter is not specified. (Note that there is no dump file generated because this is a network import. Data Pump selects all inherited objects that have not changed and all actual objects that have changed.8/9/13 Data Pump Import If you start a Data Pump job on instance A and specify C L U S T E R = N . the table and indexes are newly created and will not be marked unusable.su/docs/11g/server.112/e10701/dp_import. l o g S K I P _ U N U S A B L E _ I N D E X E S = y SOURCE_EDITION Default: the default database edition on the remote node from which objects will be fetched Purpose Specifies the database edition on the remote node from which objects will be fetched.) The N E T W O R K _ L I N Kparameter is simply being used as part of the example. it is the default behavior. and a table or partition with an index in the Unusable state is encountered. then the default edition is used. an error message is returned. will be used to determine how to handle unusable indexes. S K I P _ U N U S A B L E _ I N D E X E S . Syntax and Description S O U R C E _ E D I T I O N = e d i t i o n _ n a m e If S O U R C E _ E D I T I O N = n a m eis specified. that table or partition is not loaded. It is not required when using the S E R V I C E _ N A M Eparameter.htm 22/38 . SKIP_UNUSABLE_INDEXES Default: the value of the Oracle Database configuration parameter. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. including inherited and actual objects Restrictions oracle. It has no practical effect when a table is created as part of an import because in that case. See Also: "CLUSTER" Example >i m p d ps y s t e mD I R E C T O R Y = d p u m p _ d i r 1S C H E M A S = h r S E R V I C E _ N A M E = S A L E SN E T W O R K _ L I N K = d b s 1 This example starts a schema-mode network import of the hr schema. You can create the e x p f u l l . >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . If S K I P _ U N U S A B L E _ I N D E X E Sis set to n . Syntax and Description S K I P _ U N U S A B L E _ I N D E X E S = { y|n } If S K I P _ U N U S A B L E _ I N D E X E Sis set to y . Purpose Specifies whether Import skips loading tables that have indexes that were set to the Index Unusable state (by either the system or the user). so the job will use all instances in the resource group associated with the service name S A L E S . and a table or partition with an index in the Unusable state is encountered. Other tables. The N E T W O R K _ L I N Kvalue of d b s 1would be replaced with the name of the source database from which you were importing data. the load of that table or partition proceeds anyway. If indexes used to enforce constraints are marked unusable. If the specified edition does not exist or is not usable. See Also: Oracle Database SQL Language Reference for information about how editions are created Oracle Database Advanced Application Developer's Guide for more information about the editions feature. Example The following is an example of using the S K I P _ U N U S A B L E _ I N D E X E Sparameter. See "FULL".

The S Q L F I L Eparameter cannot be used in conjunction with the Q U E R Yparameter.su/docs/11g/server. For example. Note that passwords are not included in the SQL file. then the C O N T E N Tparameter is ignored if it is set to either A L Lor D A T A _ O N L Y .) SQLFILE Default: There is no default Purpose Specifies a file into which all of the SQL DDL that Import would have executed. Example The following is an example of using the import S O U R C E _ E D I T I O Nparameter: >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1S O U R C E _ E D I T I O N = e x p _ e d i t i o n N E T W O R K _ L I N K = s o u r c e _ d a t a b a s e _ l i n kE X C L U D E = u s e r This example assumes the existence of an edition named e x p _ e d i t i o non the system from which objects are being imported. This parameter is only useful if there are two or more versions of the same versionable objects in the database. The SQL is not actually executed. See "NETWORK_LINK". d m pdump file used in this example by running the example provided for the Export F U L Lparameter. Because no import mode is specified. d m p S Q L F I L E = d p u m p _ d i r 2 : e x p f u l l . before you can execute the SQL file. Example The following is an example of using the S Q L F I L Eparameter. unless another d i r e c t o r y _ o b j e c tis explicitly specified here. table. s q l A SQL file named e x p f u l l .8/9/13 Data Pump Import The S O U R C E _ E D I T I O Nparameter is valid on an import operation only when the N E T W O R K _ L I N Kparameter is also specified. the default of schema mode will be used. The s o u r c e _ d a t a b a s e _ l i n k would be replaced with the name of the source database from which you were importing data. it specifies how frequently. and the h rschema name is shown. is written. the dashes (--) indicate that a comment follows. anonymous PL/SQL blocks may appear within the S Q L F I L Eoutput. based on other parameters. You can create the e x p f u l l . the S Q L F I L Eparameter that you specify must include a directory object that does not use the Oracle ASM + notation. s q lis written to d p u m p _ d i r 2 . Restrictions If S Q L F I L Eis specified. That is. no additional information is displayed beyond information about the completion of each object type.2 or higher. If no value is entered or if the default value of 0 is used. the SQL file must be written to a disk file. it will be replaced by a comment with only the schema name shown. They should not be executed directly. The E X C L U D E = u s e r parameter excludes only the definitions of users. oracle. you must edit it by removing the dashes indicating a comment and adding the password for the h rschema. if a C O N N E C Tstatement is part of the DDL that was executed. (Note that there is no dump file generated because this is a network import. but not the password. and the target system remains unchanged. not the objects contained within users' schemas.112/e10701/dp_import. See "VERSION". STATUS Default: 0 Purpose Specifies the frequency at which the job status will be displayed. not into the Oracle ASM storage. Any existing file that has a name matching the one specified with this parameter is overwritten. To perform a Data Pump Import to a SQL file using Oracle Automatic Storage Management (Oracle ASM). Syntax and Description S T A T U S [ = i n t e g e r ] If you supply a value for i n t e g e r . or partition. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . The job version must be set to 11. -C O N N E C Th r Therefore. In the following example. Syntax and Description S Q L F I L E = [ d i r e c t o r y _ o b j e c t : ] f i l e _ n a m e The f i l e _ n a m especifies where the import job will write the DDL that would be executed during the job. For Streams and other Oracle database options. See "FULL".htm 23/38 . job status should be displayed in logging mode. in seconds. The file is written to the directory object specified in the D I R E C T O R Yparameter.

d m pdump file used in this example by running the example provided for the Export F U L Lparameter. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l .2) R E P L A C Edrops the existing table and C O N T E N Tparameter is set to D A T A _ O N L Y . A P P E N Dloads rows from the source and T R U N C A T Edeletes existing rows and then loads rows from the source. This Page 3 Data Pump Import What Is Data Pump Import? Invoking Data Pump Import Filtering During Import Operations Parameters Available in Import's CommandLine Mode Commands Available in Import's InteractiveCommand Mode Examples of Using Data Pump Import Syntax Diagrams for Data Pump Import The following considerations apply when you are using these options: When you use T R U N C A T Eor R E P L A C E . Syntax and Description T A B L E _ E X I S T S _ A C T I O N = { S K I P|A P P E N D|T R U N C A T E|R E P L A C E } Quick Lookup Advanced Search • Master Book List • Master Index • Master Glossary • Error Messages Main Categories Installation Getting Started Administration Application Development Grid Computing High Availability Data Warehousing Content Management and Unstructured Data Information Integration Security The possible values have the following effects: S K I Pleaves the table as is and moves on to the next object. checks are made to ensure that rows from the source are compatible with the existing table before performing any action. not S K I P . you may want to compress your data after the load. existing table-dependent objects in the source. For this reason. See "FULL". d m p In this example. or T R U N C A T E . grants. >i m p d ph rN O L O G F I L E = yS T A T U S = 1 2 0D I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . the load fails and no data is loaded. When you use A P P E N D . set to D A T A _ O N L Y . are not modified. then creates and loads it from the source. the status is shown every two minutes (120 seconds). the default is A P P E N D . the dependent objects are dropped and re-created from the source. the data is always loaded into new space. If any row violates an active constraint. Example The following is an example of using the S T A T U Sparameter. d m pS T R E A M S _ C O N F I G U R A T I O N = n See Also: Oracle Streams Replication Administrator's Guide TABLE_EXISTS_ACTION Search This book Entire library Default: S K I P(Note that if C O N T E N T = D A T A _ O N L Yis specified. When you use A P P E N Dor T R U N C A T E . When you use S K I P .) Purpose Tells Import what to do if the table it is trying to create already exists. consider disabling the constraints. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. such as indexes. You can create the e x p f u l l . If the existing table has active constraints and triggers. it compares column names oracle. but may cause constraint violations. Syntax and Description S T R E A M S _ C O N F I G U R A T I O N = { y|n } Example The following is an example of using the S T R E A M S _ C O N F I G U R A T I O Nparameter. Note: When Data Pump detects that the source table and target table do not match (the two tables do not have the same number of columns or the target table has a column name that is not present in the source table). This is not a valid option if the C O N T E N Tparameter is leaves existing rows unchanged.A P P E N D .112/e10701/dp_import. triggers. STREAMS_CONFIGURATION Default: y Purpose Specifies whether to import any Streams metadata that may be present in the export dump file.htm 24/38 . and constraints.8/9/13 Data Pump Import This status information is written only to your standard output device. not to the log file (if one is in effect).su/docs/11g/server. it is loaded using the external tables access method. and then deleting the problem rows before reenabling the constraints. is not reused. If you have data that must be loaded. even if available. ensure that rows in the affected tables are not targets of any referential constraints. You can create the e x p f u l l . You can override this behavior by specifying D A T A _ O P T I O N S = S K I P _ C O N S T R A I N T _ E R R O R Son the Import command line. For R E P L A C E . See "FULL". This is not a valid option if the This Book Oracle® Database Utilities 11g Release 2 (11. loading the data. if they were not explicitly or implicitly excluded (using E X C L U D E ) and they exist in the source dump file or system. existing space.

The following restrictions apply: This behavior is not supported for network imports.m y d a t a ) Note: Some operating systems require single quotation marks rather than double quotation marks. and ref columns based on a primary key. it defaults to that of the current user. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. table names in a database are stored as uppercase. if the parameter file contains the following line. Example The following is an example of using the T A B L E _ E X I S T S _ A C T I O Nparameter. If a p a r t i t i o n _ n a m eis specified. the UNIX C shell attaches a special meaning to a dollar sign ($) or pound sign (#) (or certain other oracle. The following types of columns cannot be dropped: column objects. you can filter the data that is imported from the source by specifying a comma-delimited list of tables and partitions or subpartitions. For example. the Import utility imports all three tables because e m p #is enclosed in quotation marks: T A B L E S = ( ' " e m p # " ' . it must be the name of a partition or subpartition in the associated table.d e p t . To specify a schema other than your own. Some operating systems require that quotation marks on the command line be preceded by an escape character.112/e10701/dp_import. You can create the e x p f u l l . unless the table name is enclosed in quotation marks. then the data for the common columns is imported into the table (assuming the datatypes are compatible).d e p t . unless the table name is enclosed in quotation marks.8/9/13 Data Pump Import between the two tables. In command-line mode: T A B L E S = ' \ " E m p \ " ' In interactive mode: T a b l e ( T )t ob ee x p o r t e d :" E x p " In parameter file mode: T A B L E S = ' " E m p " ' Table names specified on the command line cannot include a pound sign (#).htm 25/38 . The name must exactly match the table name stored in the database. The following restrictions apply to table names: By default. and you want to preserve case-sensitivity for the table name. object attributes. See "FULL". If the tables have at least one column in common. you must either have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole or remap the schema to the current user.su/docs/11g/server. d m p T A B L E _ E X I S T S _ A C T I O N = R E P L A C E TABLES Default: There is no default Purpose Specifies that you want to perform a table-mode import. For example. Similarly. nested table columns. Restrictions T R U N C A T Ecannot be used on clustered tables. See "Filtering During Import Operations". the Import utility interprets the rest of the line as a comment. The use of filtering can restrict what is imported using this import mode. >i m p d ph rT A B L E S = e m p l o y e e sD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l .m y d a t a ) However. ] t a b l e _ n a m e [ : p a r t i t i o n _ n a m e ] In a table-mode import. if a table name includes a pound sign (#). in the parameter file. The following are examples of how case-sensitivity can be preserved in the different Import modes. or the reverse. The use of wildcards to specify table names and partition names is supported. you must enclose the name in quotation marks. If you do not supply a s c h e m a _ n a m e . Import interprets everything on the line after e m p #as a comment and does not import the tables d e p tand m y d a t a : T A B L E S = ( e m p # . If you have a table name in mixed-case or lowercase. if the parameter file contains the following line. Syntax and Description T A B L E S = [ s c h e m a _ n a m e . see your Oracle operating system-specific documentation. Different operating systems also have other restrictions on table naming.

t b s _ 3 . Example The following example shows a simple use of the T A B L E Sparameter to import only the e m p l o y e e sand j o b stables from the e x p f u l l . the limit is 4 KB. An error would be returned. It assumes that the tablespaces already exist. Data Pump automatically creates the tablespaces into which the data will be imported: The import is being done in F U L Lor T R A N S P O R T _ T A B L E S P A C E Smode The import is being done in table mode with T R A N S P O R T A B L E = A L W A Y S In all other cases. tablespace. schema.su/docs/11g/server. During the following import situations. Restrictions The use of synonyms as values for the T A B L E Sparameter is not supported. the tablespaces for the selected objects must already exist on the import database. the limit is 4 KB. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . You could also use the Import R E M A P _ T A B L E S P A C Eparameter to map the tablespace name to an existing tablespace on the import database. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . You must use escape characters to get such characters in the name past the shell and into Import. j o b s The following example shows the use of the T A B L E Sparameter to import partitions: >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p d a t . ] Use T A B L E S P A C E Sto specify a list of tablespace names whose tables and dependent objects are to be imported from the source (full. In such cases. Example The following is an example of using the T A B L E S P A C E Sparameter.3 or earlier database or to a read-only database. You can only specify partitions from one table if P A R T I T I O N _ O P T I O N S = D E P A R T I T I O Nis also specified on the import. t b s _ 4 This example imports all tables that have data in tablespaces t b s _ 1 . See "FULL". The use of filtering can restrict what is imported using this import mode. d m pfile. it would not be valid to use T A B L E S = r e g n . See "FULL". d m pT A B L E S = e m p l o y e e s .2. When the N E T W O R K _ L I N Kparameter is used with the T A B L E Sparameter.2. TABLESPACES Default: There is no default Purpose Specifies that you want to perform a tablespace-mode import. unless you are using the N E T W O R K _ L I N Kparameter to an Oracle Database release 10. If you specify T R A N S P O R T A B L E = A L W A Y S . d m pT A B L E S P A C E S = t b s _ 1 . in which case single or multiple partitions of a specified table can be imported. The only exception to this is if T R A N S P O R T A B L E = A L W A Y Sis also specified.3 or earlier or to a read-only database.htm 26/38 . You can create the e x p f u l l .t b s _ 2 .0. Restrictions The length of the list of tablespace names specified for the T A B L E S P A C E Sparameter is limited to a maximum of 4 MB. . TARGET_EDITION Default: the default database edition on the system Purpose oracle. d m p T A B L E S = s h . or table-mode export dump file set or another database).. t b s _ 2 . You can create the e x p f u l l . s a l e s : s a l e s _ Q 1 _ 2 0 0 8 .8/9/13 Data Pump Import special characters). Syntax and Description T A B L E S P A C E S = t a b l e s p a c e _ n a m e[ . In such cases. The length of the table name list specified for the T A B L E Sparameter is limited to a maximum of 4 MB.112/e10701/dp_import. only whole tables can be imported (not partitions of tables).0. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. if the r e g i o n stable in the h rschema had a synonym of r e g n . For example. unless you are using the N E T W O R K _ L I N Kparameter to a 10. s h .t b s _ 3 . d m pdump file used in this example by running the example provided for the Export F U L Lparameter. See "Filtering During Import Operations". and t b s _ 4 . then all partitions specified on the T A B L E Sparameter must be in the same table. s a l e s : s a l e s _ Q 2 _ 2 0 0 8 This example imports the partitions s a l e s _ Q 1 _ 2 0 0 8and s a l e s _ Q 2 _ 2 0 0 8for the table s a l e sin the schema s h . .

but does not affect referenced objects. S T O R A G E- If the value is specified as y .8/9/13 Data Pump Import Specifies the database edition into which objects should be imported. even if an edition was specified in the export job. Syntax and Description T R A N S F O R M=t r a n s f o r m _ n a m e : v a l u e [ : o b j e c t _ t y p e ] The t r a n s f o r m _ n a m especifies the name of the transform. The possible options are as follows: S E G M E N T _ A T T R I B U T E S- If the value is specified as y . Integer values are required for the P C T S P A C Etransform. tables are not editionable. and all editions will see it. Table 3-1 Valid Object Types For the Data Pump Import TRANSFORM Parameter SEGMENT_ATTRIBUTES STORAGE C L U S T E R OID PCTSPACE X X X C O N S T R A I N T X X X I N C _ T Y P E X 27/38 oracle. with appropriate DDL. Objects that are not editionable are created in all editions. then the default edition on the target database is used. then segment attributes (physical attributes. and logging) are included. Syntax and Description T A R G E T _ E D I T I O N = n a m e If T A R G E T _ E D I T I O N = n a m eis specified. Objects in the dump file that are editionable. The valid object types for each transform are shown in Table 3-1. and O I Dtransforms. tablespaces. it designates the object type to which the transform will be applied. Because no import mode is specified. If supplied. P C T S P A C E- The v a l u esupplied for this transform must be a number greater than zero. the assignment of the exported OID during the creation of object tables and types is inhibited. Note that you can use the P C T S P A C Etransform with the Data Pump Export S A M P L Eparameter so that the size of storage allocations matches the sampled data subset. For example. If this parameter is not specified. (See "SAMPLE".su/docs/11g/server. the storage clauses are included.2 or higher. This parameter is ignored if S E G M E N T _ A T T R I B U T E S =n . it will be created.S T O R A G E . Instead. If the specified edition does not exist or is not usable. Data Pump Import creates all of the objects found in the dump file. O I D- If the value is specified as n . Boolean values (y/n) are required for the S E G M E N T _ A T T R I B U T E S . an error message is returned. a new OID is assigned. It represents the percentage multiplier used to alter extent allocations and the size of datafiles. See Also: Oracle Database SQL Language Reference for information about how editions are created Oracle Database Advanced Application Developer's Guide for more information about the editions feature Restrictions This parameter is only useful if there are two or more versions of the same versionable objects in the database. storage attributes. with appropriate DDL.htm . The default is y . This can be useful for cloning schemas. The job version must be 11. so if there is a table in the dump file. The default is y . such as procedures. The o b j e c t _ t y p eis optional. The default value is y .112/e10701/dp_import. are created only in the specified target edition. If no object type is specified then the transform applies to all valid object types. Example The following is an example of using the T A R G E T _ E D I T I O Nparameter: >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p _ d a t . TRANSFORM Default: There is no default Purpose Enables you to alter object creation DDL for objects being imported. d m pT A R G E T _ E D I T I O N = e x p _ e d i t i o n This example assumes the existence of an edition named e x p _ e d i t i o non the system to which objects are being imported. See "VERSION".) The type of v a l u especified depends on the transform used. the default of schema mode will be used.

" D E P A R T M E N T _ I D "N U M B E R ( 4 . 0 ) )P C T F R E E1 0P C T U S E D4 0I N I T R A N S1M A X T R A N S2 5 5N O C O M P R E S SL O G G I N G S T O R A G E ( I N I T I A L1 0 2 4 0N E X T1 6 3 8 4M I N E X T E N T S1M A X E X T E N T S1 2 1 P C T I N C R E A S E5 0F R E E L I S T S1F R E E L I S TG R O U P S1B U F F E R _ P O O LD E F A U L T ) T A B L E S P A C E" S Y S T E M ". oracle. " E M P L O Y E E S " (" E M P L O Y E E _ I D "N U M B E R ( 6 . assume that you have exported the e m p l o y e e stable in the h rschema. you can remove them from the C R E A T E S T A T E M E N Tby using the Import T R A N S F O R Mparameter. 0 ) . " D E P A R T M E N T _ I D "N U M B E R ( 4 . d m pS C H E M A S = h rT R A N S F O R M = S E G M E N T _ A T T R I B U T E S : n TRANSPORT_DATAFILES Default: There is no default Purpose Specifies a list of datafiles to be imported into the target database by a transportable-mode import. " M A N A G E R _ I D "N U M B E R ( 6 . the S E G M E N T _ A T T R I B U T E Stransform applies to both storage and tablespace attributes. " E M P L O Y E E S " (" E M P L O Y E E _ I D "N U M B E R ( 6 . " S A L A R Y "N U M B E R ( 8 . Syntax and Description Restrictions The T R A N S P O R T _ D A T A F I L E Sparameter cannot be used in conjunction with the Q U E R Yparameter. C R E A T ET A B L E" H R " . the attributes for the default tablespace for the H Rschema will be used instead. 2 ) . The datafiles must already exist on the target database system. 2 ) . 2 ) . " C O M M I S S I O N _ P C T "N U M B E R ( 2 . " P H O N E _ N U M B E R "V A R C H A R 2 ( 2 0 ) . " E M A I L "V A R C H A R 2 ( 2 5 )C O N S T R A I N T" E M P _ E M A I L _ N N "N O TN U L LE N A B L E . " H I R E _ D A T E "D A T EC O N S T R A I N T" E M P _ H I R E _ D A T E _ N N "N O TN U L LE N A B L E . This results in the exclusion of segment attributes (both storage and tablespace) from the table. " C O M M I S S I O N _ P C T "N U M B E R ( 2 . " P H O N E _ N U M B E R "V A R C H A R 2 ( 2 0 ) . d m p T R A N S F O R M = S E G M E N T _ A T T R I B U T E S : n : t a b l e The resulting C R E A T ET A B L Estatement for the e m p l o y e e stable would then look similar to the following. To omit only the S T O R A G Eclause and retain the T A B L E S P A C Eclause.8/9/13 I N D E X Data Pump Import X X X R O L L B A C K _ S E G M E N TX X X T A B L E X X X X T A B L E S P A C E X X T Y P E X Example For the following example.su/docs/11g/server. " L A S T _ N A M E "V A R C H A R 2 ( 2 5 )C O N S T R A I N T" E M P _ L A S T _ N A M E _ N N "N O TN U L LE N A B L E . as shown in the following command: >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = h r . >i m p d ph rT A B L E S = h r . or by a table-mode import if T R A N S P O R T A B L E = A L W A Y Swas set during the export. " S A L A R Y "N U M B E R ( 8 . " J O B _ I D "V A R C H A R 2 ( 1 0 )C O N S T R A I N T" E M P _ J O B _ N N "N O TN U L LE N A B L E . " E M A I L "V A R C H A R 2 ( 2 5 )C O N S T R A I N T" E M P _ E M A I L _ N N "N O TN U L LE N A B L E . 0 ) ) . d m p T R A N S F O R M = S T O R A G E : n : t a b l e The S E G M E N T _ A T T R I B U T E Sand S T O R A G Etransforms can be applied to all applicable table and index objects by not specifying the object type on the T R A N S F O R Mparameter. " M A N A G E R _ I D "N U M B E R ( 6 . It does not contain a S T O R A G Eor T A B L E S P A C Eclause. you can use the S T O R A G Etransform. e m p l o y e e sD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = h r _ e m p . " J O B _ I D "V A R C H A R 2 ( 1 0 )C O N S T R A I N T" E M P _ J O B _ N N "N O TN U L LE N A B L E . 0 ) . as follows: >i m p d ph rT A B L E S = h r . " H I R E _ D A T E "D A T EC O N S T R A I N T" E M P _ H I R E _ D A T E _ N N "N O TN U L LE N A B L E . As shown in the previous example. The SQL C R E A T E T A B L Estatement that results when you then import the table is similar to the following: C R E A T ET A B L E" H R " .htm 28/38 . Specify the value of S E G M E N T _ A T T R I B U T E Sas n . " F I R S T _ N A M E "V A R C H A R 2 ( 2 0 ) . If you do not want to retain the S T O R A G Eclause or T A B L E S P A C Eclause. 0 ) . e m p l o y e e sD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = h r _ e m p . 2 ) . 0 ) . " L A S T _ N A M E "V A R C H A R 2 ( 2 5 )C O N S T R A I N T" E M P _ L A S T _ N A M E _ N N "N O TN U L LE N A B L E . " F I R S T _ N A M E "V A R C H A R 2 ( 2 0 ) .112/e10701/dp_import.

Perform a transportable tablespace export of tablespace t b s _ 1 . rename it to w o r k e r s . d m pT R A N S P O R T _ T A B L E S P A C E S = t b s _ 1 The metadata only (no data) for t b s _ 1is exported to a dump file named t t s . d m p . You can do this using any copy method supported by your operating stem. Using a method supported by your operating system. TRANSPORT_FULL_CHECK Default: n Purpose Specifies whether to verify that the specified transportable tablespace set is being referenced by objects in other tablespaces. See Also: "Use of Quotation Marks On the Data Pump Command Line" Example 1 The following is an example of using the T R A N S P O R T _ D A T A F I L E Sparameter. Therefore. you must copy the datafiles from the source system to the target system. 2. the use of quotation marks when you specify a value for this parameter may also require that you use escape characters. 3. specifying an absolute directory path for the data file named w o r k e r s . Oracle recommends that you place this parameter in a parameter file. then this check succeeds. Syntax and Description T R A N S P O R T _ F U L L _ C H E C K = { y|n } If T R A N S P O R T _ F U L L _ C H E C K = y . Assume you have a parameter file. d a t : >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = t t s . d m p T R A N S P O R T _ D A T A F I L E S = ' / u s e r 0 1 / d a t a / w o r k e r s . Similarly. but not its index. if the transportable set contains a table. a failure is also returned if an index is in the transportable set but the table is not. if the transportable set contains an index. you can rename the files when you copy them to the target system (see Example 2). which can reduce the number of escape characters that might otherwise be needed on the command line.112/e10701/dp_import. Restrictions This parameter is valid for transportable mode (or table mode when T R A N S P O R T A B L E = A L W A Y Swas specified on the oracle. p a r Example 2 This example illustrates the renaming of data files as part of a transportable tablespace export and import operation. the import operation is terminated. As part of the copy operation. d a ton your source system.htm 29/38 . Assume that you have a datafile named e m p l o y e e s . but an index is dependent on a table. d a t file to the correct place in the database. At some point before the import operation. If T R A N S P O R T _ F U L L _ C H E C K = n . manually copy the data file named e m p l o y e e s . If desired. Perform a transportable tablespace import. d b f ' You can then issue the following command: >i m p d ph rP A R F I L E = t r a n s _ d a t a f i l e s . then Import verifies that there are no dependencies between those objects inside the transportable set and those outside the transportable set. For example. d m pis imported and Data Pump then assigns the information in the w o r k e r s . The actual data was copied over to the target database in step 1. but not the table. p a r . Import always verifies that all storage segments of all tables (and their indexes) defined within the tablespace set specified by T R A N S P O R T _ T A B L E S P A C E Sare actually contained within the tablespace set. d a t ' The metadata contained in t t s .su/docs/11g/server. In addition to this check. if a table is inside the transportable set but its index is not. >e x p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = t t s . However. t r a n s _ d a t a f i l e s . d a t . d a tfrom your source system to the system where your target database resides. because an index without a table has no meaning. a table is not dependent on an index.with the following content: D I R E C T O R Y = d p u m p _ d i r 1 D U M P F I L E = t t s .8/9/13 Data Pump Import T R A N S P O R T _ D A T A F I L E S = d a t a f i l e _ n a m e The d a t a f i l e _ n a m emust include an absolute directory path specification (not a directory object name) that is valid on the system where the target database resides. Depending on your operating system. This check addresses a one-way dependency.then Import verifies only that there are no objects within the transportable set that are dependent on objects outside the transportable set. For example. a failure is returned and the import operation is terminated. d m p T R A N S P O R T _ D A T A F I L E S = ' / u s e r 0 1 / d a t a / t b s 1 . 1. The check addresses two-way dependencies.

Assume you have a parameter file. with the following content: D I R E C T O R Y = d p u m p _ d i r 1 T R A N S P O R T _ T A B L E S P A C E S = t b s _ 6 N E T W O R K _ L I N K = s o u r c e _ d a t a b a s e _ l i n k T R A N S P O R T _ F U L L _ C H E C K = y T R A N S P O R T _ D A T A F I L E S = ' / w k d i r / d a t a / t b s 6 . d b f ' You can then issue the following command: >i m p d ph rP A R F I L E = t a b l e s p a c e s . However. the job will fail. which can reduce the number of escape characters that might otherwise be needed on the command line. Depending on your operating system. . the tablespaces into which the data is imported are automatically created by Data Pump. f u l l _ c h e c k . p a r TRANSPORTABLE Default: N E V E R Purpose Specifies whether the transportable option should be used during a table mode import (specified with the T A B L E S parameter) to import only metadata for specific tables. d b f ' You can then issue the following command: >i m p d ph rP A R F I L E = f u l l _ c h e c k . The T R A N S P O R T _ T A B L E S P A C E Sparameter is valid only when the N E T W O R K _ L I N Kparameter is also specified. Suppose you have a parameter file. t a b l e s p a c e s .htm . ] Use the T R A N S P O R T _ T A B L E S P A C E Sparameter to specify a list of tablespace names for which object metadata will be imported from the source database into the target database. Because this is a transportable-mode import. Oracle recommends that you place this parameter in a parameter file.8/9/13 Data Pump Import export) only when the N E T W O R K _ L I N Kparameter is specified.. the data files should be copied to the target database before starting the import. Example In the following example. p a r . and subpartitions. d b fhas already been copied from the source database to the local system. s o u r c e _ d a t a b a s e _ l i n kwould be replaced with the name of a valid database link. Transportable mode does not support encrypted columns. Syntax and Description T R A N S P O R T A B L E={ A L W A Y S|N E V E R } The definitions of the allowed values are as follows: A L W A Y S- Instructs the import job to use the transportable option. p a r TRANSPORT_TABLESPACES Default: There is no default Purpose Specifies that you want to perform a transportable-tablespace-mode import over a network link. If transportable is not possible. partitions.112/e10701/dp_import.You do not need to pre-create them. The target database into which you are importing must be at the same or higher release level as the source database. the use of quotation marks when you specify a value for this parameter may also require that you use escape characters.with the following content: D I R E C T O R Y = d p u m p _ d i r 1 N E T W O R K _ L I N K = s o u r c e _ d a t a b a s e _ l i n k T R A N S P O R T _ T A B L E S P A C E S = t b s _ 6 T R A N S P O R T _ F U L L _ C H E C K = n T R A N S P O R T _ D A T A F I L E S = ' u s e r 0 1 / d a t a / t b s 6 . The 30/38 oracle. The example also assumes that a datafile named t b s 6 . Syntax and Description T R A N S P O R T _ T A B L E S P A C E S = t a b l e s p a c e _ n a m e[ .su/docs/11g/server. . The example also assumes that a datafile named t b s 6 . p a r . d b falready exists. See Also: "Use of Quotation Marks On the Data Pump Command Line" Restrictions You cannot export transportable tablespaces and then import them into a database at a lower release level. the s o u r c e _ d a t a b a s e _ l i n kwould be replaced with the name of a valid database link. Example In the following example.

1. 11. Syntax and Description V E R S I O N = { C O M P A T I B L E|L A T E S T|v e r s i o n _ s t r i n g } This parameter can be used to load a target system whose Oracle database is at an earlier compatibility version than that of the source system. the complete table is created.2. Database objects or attributes on the source system that are incompatible with the specified version will not be moved to the target. oracle. N E V E R- Instructs the import job to use either the direct path or external table method to load data rather than the transportable option. The T R A N S P O R T A B L Eparameter is only valid in table mode imports (the tables do not have to be partitioned or subpartitioned). But only the data for the specified partitions is inserted into the table. only database objects and attributes that are compatible with the specified version will be imported). all the metadata for the complete table is present so that the table definition looks the same on the target system as it did on the source. L A T E S T- The version of the metadata corresponds to the database version. d m pT A B L E S = e m p l o y e e s V E R S I O N = L A T E S T Commands Available in Import's Interactive-Command Mode In interactive-command mode. This is the default. s a l e sT R A N S P O R T A B L E = a l w a y s D I R E C T O R Y = d p u m p _ d i r 1N E T W O R K _ L I N K = d b s 1P A R T I T I O N _ O P T I O N S = d e p a r t i t i o n T R A N S P O R T _ D A T A F I L E S = d a t a f i l e _ n a m e VERSION Default: C O M P A T I B L E Purpose Specifies the version of database objects to be imported (that is. Note that this does not mean that Data Pump Import can be used with versions of Oracle Database earlier than 10. The version of the metadata corresponds to the database compatibility level. A specific database version (for example.1) or later. You can create the e x p f u l l . If P A R T I T I O N _ O P T I O N Sis not used. Database compatibility must be set to 9.0. d m pdump file used in this example by running the example provided for the Export F U L Lparameter. >i m p d ps y s t e mT A B L E S = h r . Example The following example shows the use of the T R A N S P O R T A B L Eparameter during a network link import.su/docs/11g/server. If only a subset of a table's partitions are imported and the T R A N S P O R T A B L Eparameter is not used or is set to N E V E R(the default).0 or higher. See "FULL".htm 31/38 . the C O M P A T I B L Einitialization parameter must be set to at least 11. Data Pump Import only works with Oracle Database 10g release 1 (10. To make full use of the T R A N S P O R T A B L Eparameter.0). See "Using Data File Copying to Move Data". For example. The schema performing a transportable import requires the D A T A P U M P _ E X P _ F U L L _ D A T A B A S Erole on the source database and the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole on the target database. tables containing new datatypes that are not supported in the specified version will not be imported. See Also: "Moving Data Between Different Database Versions" Example The following is an example of using the V E R S I O Nparameter. If only a subset of a table's partitions are imported and the T R A N S P O R T A B L E = A L W A Y Sparameter is used. then: If P A R T I T I O N _ O P T I O N S = D E P A R T I T I O Nis used. partitions.8/9/13 Data Pump Import transportable option imports only metadata for the specified tables. the current job continues running. In Oracle Database 11g. each partition is created as a non-partitioned table.2.0. Legal values for this parameter are as follows: C O M P A T I B L E- This is the default value. this value must be v e r s i o n _ s t r i n g- 9.2.112/e10701/dp_import. Restrictions The Import T R A N S P O R T A B L Eparameter is valid only if the N E T W O R K _ L I N Kparameter is also specified. You must copy the actual data files to the target database.0 or higher. or subpartitions specified by the T A B L E S parameter. The V E R S I O Nparameter simply allows you to identify the version of the objects being imported. >i m p d ph rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p f u l l . then each partition becomes a non-partitioned table. That is. but logging to the terminal is suspended and the Import prompt (I m p o r t > ) is displayed.

htm 32/38 .su/docs/11g/server. PARALLEL This command is valid only in Oracle Database Enterprise Edition. but leaves the current job running. Restart a stopped job to which you are attached.8/9/13 Data Pump Import To start interactive-command mode. START_JOB Display detailed status for the current job. Command Used CONTINUE_CLIENT Stop the import client session. you can attach to the job at a later time if it is still executing or in a stopped state. use the A T T A C Hparameter to attach to the job. KILL_JOB Increase or decrease the number of active worker processes for the current job. HELP Detach all currently attached client sessions and kill the current job. EXIT_CLIENT Display a summary of available commands. then C O N T I N U E _ C L I E N T will also cause the client to attempt to start the job. From a terminal other than the one on which the job is running. oracle. If the job is currently stopped. the job status is continually output to the terminal. exits Import. press Ctrl+C. and discontinues logging to the terminal. CONTINUE_CLIENT Purpose Changes the mode from interactive-command mode to logging mode. STOP_JOB The following are descriptions of the commands available in the interactive-command mode of Data Pump Import. Syntax and Description C O N T I N U E _ C L I E N T In logging mode. Table 3-2 lists the activities you can perform for the current job from the Data Pump Import prompt in interactivecommand mode. do one of the following: From an attached client. To see the status of the job. but leave the current job running. STATUS Stop the current job. Example I m p o r t >E X I T _ C L I E N T HELP Purpose Provides information about Data Pump Import commands available in interactive-command mode. Syntax and Description E X I T _ C L I E N T Because E X I T _ C L I E N Tleaves the job running. you can monitor the log file for the job or you can query the U S E R _ D A T A P U M P _ J O B S view or the V $ S E S S I O N _ L O N G O P Sview. Example I m p o r t >C O N T I N U E _ C L I E N T EXIT_CLIENT Purpose Stops the import client session.112/e10701/dp_import. Table 3-2 Supported Activities in Data Pump Import's Interactive-Command Mode Activity Exit interactive-command mode. This is a useful feature in situations in which you start a job at one location and need to check on it at a later time from a different location.

112/e10701/dp_import. Syntax and Description P A R A L L E L = i n t e g e r P A R A L L E Lis available as both a command-line parameter and an interactive-mode parameter. Example I m p o r t >P A R A L L E L = 1 0 START_JOB Purpose Starts the current job to which you are attached. workers are idled but not deleted until the job exits. The failing statement is skipped and the job is restarted from the next work item. The S K I P _ C U R R E N Toption allows you to restart a job that previously failed to restart because execution of some DDL statement failed. You set it to the desired number of parallel processes. The job is restarted with no data loss or corruption after an unexpected failure or after you issue a S T O P _ J O Bcommand.htm 33/38 . If the integer value is decreased. See Also: "PARALLEL" for more information about parallelism Restrictions P A R A L L E Lis available only in Enterprise Edition. After all clients are detached. Example I m p o r t >H E L P KILL_JOB Purpose Detaches all currently attached client sessions and then kills the current job. A decrease does not take effect until an existing process finishes its current task. Example I m p o r t >S T A R T _ J O B STATUS Purpose Displays the cumulative status of the job. Syntax and Description S T A R T _ J O B [ = s k i p _ c u r r e n t = y ] The S T A R T _ J O Bcommand restarts the job to which you are currently attached (the job cannot be currently executing). An increase takes effect immediately if there are enough resources and if there is enough work requiring parallelization. along with a description of the current operation. receive a warning that the job is being killed by the current user and are then detached.su/docs/11g/server. including the one issuing the K I L L _ J O B command. It exits Import and returns to the terminal prompt. All attached clients. Syntax and Description K I L L _ J O B A job that is killed using K I L L _ J O Bcannot be restarted. Neither SQLFILE jobs nor transportable-tablespace-mode imports are restartable. A completion percentage for the oracle. Example I m p o r t >K I L L _ J O B PARALLEL Purpose Enables you to increase or decrease the number of active worker processes and/or PQ slaves for the current job. the job's process structure is immediately run down and the master table and dump files are deleted.8/9/13 Data Pump Import Syntax and Description H E L P Displays information about the commands available in interactive-command mode. provided the dump file set and master table remain undisturbed. Log files are not deleted.

All attached clients. in seconds. all the objects contained within the source. Performing a Schema-Mode Import Example 3-2 shows a schema-mode import of the dump file set created in Example 2-4. To perform an orderly shutdown. are included except those specified in an E X C L U D Estatement. all of its dependent objects are also excluded. If an object is excluded. I N D E XT A B L E _ E X I S T S _ A C T I O N = R E P L A C E The E X C L U D Eparameter filters the metadata that is imported. see "Using the Import Parameter Examples". A warning requiring confirmation will be issued. Example 3-2 Performing a Schema-Mode Import >i m p d ph rS C H E M A S = h rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p s c h e m a . specify S T O P _ J O B =I M M E D I A T E . It uses the dump file created in Example 2-1. d m p E X C L U D E = C O N S T R A I N T . not to the log file (even if one is in effect). the periodic status display is turned off and status is displayed only once. After all clients are detached. An orderly shutdown stops the job after worker processes have finished their current tasks.The T A B L E _ E X I S T S _ A C T I O N = R E P L A C Eparameter tells Import to drop the table if it already exists and to then re-create and load it using the dump file contents. some tasks that were incomplete at the time of shutdown may have to be redone at restart time. d m p N O L O G F I L E = y The C O N T E N T = D A T A _ O N L Yparameter filters out any database object definitions (metadata).112/e10701/dp_import. the job can be attached to and restarted at a later time with the S T A R T _ J O Bcommand. use S T O P _ J O B(without any associated value). R E F _ C O N S T R A I N T . However. receive a warning that the job is being stopped by the current user and they will be detached. Example I m p o r t >S T O P _ J O B = I M M E D I A T E Examples of Using Data Pump Import This section provides examples of the following ways in which you might use Data Pump Import: Performing a Data-Only Table-Mode Import Performing a Schema-Mode Import Performing a Network-Mode Import For information that will help you to successfully use these examples. the master process will not wait for the worker processes to finish their current tasks. This status information is written only to your standard output device. Performing a Network-Mode Import oracle. Only table row data is loaded. this status should be displayed in logging mode. Syntax and Description S T O P _ J O B [ = I M M E D I A T E ] If the master table and dump file set are not disturbed when or after the S T O P _ J O Bcommand is issued. For the given mode of import. That is. Performing a Data-Only Table-Mode Import Example 3-1 shows how to perform a data-only table-mode import of the table named e m p l o y e e s . A warning requiring confirmation will be issued. To perform an immediate shutdown. If no value is entered or if the default value of 0is used. There is no risk of corruption or data loss when you specify S T O P _ J O B = I M M E D I A T E . including the one issuing the S T O P _ J O Bcommand. and all their dependent objects. I m p o r t >S T A T U S = 1 2 0 STOP_JOB Purpose Stops the current job either immediately or after an orderly shutdown. Example The following example will display the current job status and change the logging mode display interval to two minutes (120 seconds). and exits Import.htm 34/38 . Example 3-1 Performing a Data-Only Table-Mode Import >i m p d ph rT A B L E S = e m p l o y e e sC O N T E N T = D A T A _ O N L YD U M P F I L E = d p u m p _ d i r 1 : t a b l e .su/docs/11g/server.8/9/13 Data Pump Import job is also returned. Syntax and Description S T A T U S [ = i n t e g e r ] You have the option of specifying how frequently. the process structure of the job is immediately run down.

Example 3-3 Network-Mode Import of Schemas >i m p d ph rT A B L E S = e m p l o y e e sR E M A P _ S C H E M A = h r : s c o t tD I R E C T O R Y = d p u m p _ d i r 1 N E T W O R K _ L I N K = d b l i n k This example imports the e m p l o y e e stable from the h rschema into the s c o t tschema.gif ImpModes Description of the illustration impmodes. The d b l i n kreferences a source database that is different than the target database. For more information about SQL syntax notation. R E M A P _ S C H E M Aloads all the objects from the source schema into the target schema. user h rmust have the D A T A P U M P _ I M P _ F U L L _ D A T A B A S Erole on the local database and the D A T A P U M P _ E X P _ F U L L _ D A T A B A S Erole on the source database. See Also: "NETWORK_LINK" for more information about database links Syntax Diagrams for Data Pump Import This section provides syntax diagrams for Data Pump Import.112/e10701/dp_import. ImpInit Description of the illustration impinit.gif ImpStart Description of the illustration impstart. To remap the schema.gif ImpOpts oracle. These diagrams use standard SQL syntax notation.su/docs/11g/server.8/9/13 Data Pump Import Example 3-3 performs a network-mode import where the source is the database specified by the N E T W O R K _ L I N K parameter. see Oracle Database SQL Language Reference.htm 35/38 .

gif ImpFilter Description of the illustration impfilter.112/e10701/dp_import.htm 36/38 .8/9/13 Data Pump Import Description of the illustration impopts.su/docs/11g/server.gif ImpRacOpt oracle.

gif ImpDynOpts oracle.gif ImpNetworkOpts Description of the illustration impnetopts.htm 37/38 .8/9/13 Data Pump Import Description of the illustration impracopt.112/e10701/dp_import.gif ImpFileOpts Description of the illustration impfileopts.gif ImpRemap Description of the illustration impremap.su/docs/11g/server.

su/docs/11g/server. Oracle and/or its affiliates.8/9/13 Data Pump Import Description of the illustration impdynopts. 2009.htm 38/38 .112/e10701/dp_import.gif Previous Next Copyright © 1996. All rights reserved. Home Book ContentsIndex Master Contact List Index Us Legal Notices oracle.