Import (Restore) Oracle dmp files to different tablespaces and different users

Source: Internet
Author: User

Import (Restore) Oracle dmp files to different tablespaces and different users

Copy A dmp backup file from the production environment, build a test environment on another computer, and run the imp command to import the dmp file with the following error:

Problem description:

IMP-00038: cannot be converted to Environment Character Set handle

IMP-00000: Import failed

Solution:

Use the impdp command to import data.

Reference import command

Impdp onlinecolzs/onlinecozs dumpfile = XXX. dmp directory = dpdata1 remap_schema = onlinecol: onlinecolzs remap_tablespace = ts_onlinecol_prod: zaixianzs_data

Parameter description

Dumpfile: name of the dmp file to be imported

Directory: directory folder where the dmp file is located

REMAP_SCHEMA: This option is used to load all objects in the source scheme to the Target Scheme. REMAP_SCHEMA = source_schema: target_schema

REMAP_TABLESPACE: import all objects in the source tablespace to the target tablespace. REMAP_TABLESPACE = source_tablespace: target: tablespace

-----------------------------------------

Procedure:

1. Create a tablespace and a user.

2. Create a directory

Create directory dpdata1 as 'd: \ tempdmp'

Copy the dmp file to the Created directory folder (D: \ tempdmp). You must manually create this folder.

3. Execute the impdp import command:

Impdp onlinecolzs/onlinecozs dumpfile = XXX. dmp directory = dpdata1 remap_schema = onlinecol: onlinecolzs remap_tablespace = ts_onlinecol_prod: zaixianzs_data

Ts_onlinecol_prod: name of the tablespace in the old dmp file. If you do not know the name of the original tablespace, write it first. When importing the table, the system will prompt that the tablespace does not exist, write the name of the tablespace that does not exist.

Zaixianzs_data: name of the tablespace to be imported (name of the tablespace created in step 1)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.