import_subset_dump
Imports the dump file into the specified target database.
Format
emcli import_subset_dump -target_name=<Target Database> -target_type=<Target Database type> [-db_cred_name=<Database Credential Name>] [-db_pref_cred_name=<DBCredsNormal | DBCredsSYSDBA> ] [-host_cred_name=<Host Credential Name>] [-subset_directory=<Database Directory Object Name> ] [-custom_directory_path=<Custom Directory Path>] [-use_external_directory] [-external_directory=<External Directory Object Name>] [-export_file_name=<Exported Dump File Name>] [-max_imp_threads=< Maximum Number of Import Threads>] [-encrypted_dump_file] [-encryption_password=<Encryption Password>] [-import_type=<ALL | DATA_T_L| DATA_A_L> ] [-tablespace_map=<Tablespace Map>] [-schema_map=<Schema Map>] [-log_file_name=<Log file name>] [-job_name=<Job Name>] [-job_description=<Job Description>] [-oid_transform] [ ] indicates that the parameter is optional
Options
-
target_name
Name of the existing target database.
-
target_type
Type of target. Possible values target type are 'oracle_database', 'rac_database', and 'oracle_pdb'.
-
db_cred_name
Name of existing credentials stored in the Enterprise Manager repository to connect selected target database. You must provide a value for either db_pref_cred_name_or db_cred_name.
-
db_pref_cred_name
Name of preferred credentials stored in the Enterprise Manager repository.
Valid values are:
-
DBCredsNormal — Default normal credential set for an oracle_database target.
-
DBCredsSYSDBA — SYSDBA credential set for an oracle_database target.
You must provide a value for either db_pref_cred_name_or db_cred_name.
-
-
host_cred_name
Name of existing host credentials stored in the Enterprise Manager repository to access the target host.
-
subset_directory
Database Directory where the dump file is stored. For example: DATA_PUMP_DIR
You must provide a value for either subset_directory or custom_directory_path.
-
custom_directory_path
User-specified directory location on the target host where the dump file is present. For example: /scratch/user/subset_dir
You must provide a value for either subset_directory or custom_directory_path.
-
use_external_directory
Flag to enable using an external directory (clustered/shared file system or ASM) for faster import processing. If you do not set this option, you must provide a value for external_directory.
-
external_directory
External directory location (clustered/shared file system or ASM) object for faster host access. For example: DATA_PUMP_DIR
-
export_file_name
Name of the dump file to import. If not specified, the default value is EXPDAT%U.DMP.
-
max_imp_threads
Maximum number of import threads. If not specified, the default value is 1.
-
encrypted_dump_file
Set this option if an encryption password was specified during the export operation. If you use this option, you must also provide a value for encryption_password.
-
encryption_password
Password to decrypt encrypted data during an import operation. The specified password should be same as that specified during the export operation. If the encrypted_dump_file option is set and a value for this option is not specified, you are prompted for the encryption password.For a secure operation, it is recommended that passwords not be stored in the scripts, but instead specified when prompted for them.
-
import_type
Drives an import operation. Valid values are:
-
ALL: Import both metadata and data.
-
DATA_T_L: Data within the preexisting table will be removed. Data in the import source will replace it.
-
DATA_A_L: Data contained within the table to be imported will be appended to the end of the preexisting table.
The default value is ALL.
-
-
tablespace_map
This password is required to re-map data from one tablespace to another. For example:
-tablespace_map="source_tbsp1:target_tbsp1;source_tbsp2:target_tbsp2"
-
schema_map
This password is required to re-map data from one schema to another.
-schema_map="source_schema1:target_schema1;source_schema2:target_schema2"
-
log_file_name
If not specified, the default value is IMPORT.LOG.
-
oid_transform
By default, the exported OID is imported during table or type creation. Set this option to create a new OID. This is useful when some of the objects already exist in the database and a cloned copy is required. However, selecting this option will cause breakage in REF columns that point to the table.
-
job_name
Import subset dump operation job name.
-
job_description
Job description.
Output
Success or error message along with the job name if applicable.
Examples
Example 1
This example imports dump(E.dmp) located at the DATA_PUMP_DIR directory into the target sample_database.
emcli import_subset_dump -db_cred_name=db_cred -export_file_name=E.dmp -host_cred_name=host_cred -subset_directory=DATA_PUMP_DIR -target_type=oracle_database -target_name=sample_database -import_type=All
Example 2
This example imports dump(E.dmp) located at the DATA_PUMP_DIR directory into the target sample_database using preferred database and host credentials.
emcli import_subset_dump -export_file_name=E.dmp -db_pref_cred_name=DBCredsNormal -subset_directory=DATA_PUMP_DIR -target_type=oracle_database -target_name=sample_database -import_type=All