Oracle dmp File Import Guide

Source: Internet
Author: User

I have been in the blog Park for more than two years. Every time I want to write something, I will give myself a variety of excuses ~ Let's start with the longest-used Oracle Database Import today!

1. exp/imp of earlier versions can be connected to database servers of later versions (or the same version), such as ExtDat files backed up by a 10G server. dmp, which can be imported through the 11G client at will;

2. exp/imp of a higher version cannot be connected to a database server of a lower version. For example, ExtData. dmp backed up by an 11G server cannot be imported below 10G;

A. import data from a later version of Oracle to a later version. You can use a later version of the client to connect to a later version of the database for backup and import. For example, connect a 10G client to an 11G server to back up ExtData. dmp, then the 10G client connects to the 10G server to import ExtData. dmp.

B. If the ExtData. dmp file is only backed up by the 11G server, you can use the UEEdite tool to find the backup server Oracle version and change it to the current earlier version of the Oracle Server version.

The IMP and EXP commands are used for cold backup and data recovery. I think the Data Pump method is safer. The specific format is as follows:

Expdp logon username/password @ local service name (this can be omitted if the operation is performed on the machine where the oracle service is located) directory = oracle directory object name (defined in Oracle, generally, use the predefined "data_pump_dir" in Oracle. The corresponding Server File System folder is the installation directory \ admin \ orcl \ dpdump) dumpfile = Name of the backup file (this file will be saved in the folder corresponding to the "oracle directory object name") schemas = architecture to be exported (specify the user name to be exported)

Impdp login username/password @ local service name (this can be omitted if the operation is performed on the machine where the oracle service is located) directory = oracle directory object name (defined in Oracle, generally, use the predefined "data_pump_dir" in Oracle. The corresponding Server File System folder is the installation directory \ admin \ orcl \ dpdump) dumpfile = Name of the backup file (this file must be in the folder corresponding to the "oracle directory object name") schemas = architecture to be imported (username in the backup file) remap_schema = source architecture ("schema to be imported" specified by schemas): Destination architecture (the target user name, which will be automatically created) remap_tablespace = source tablespace (the tablespace in the backup file): Destination tablespace (an existing tablespace in an oracle instance can be created first)

For example: impdp system/123 @ orac directory = data_pump_dir dumpfile = ExtData. DMP schemas = sourceName remap_schema = sourceName: target remap_tablespace = sourceTablespace: targetTablespace; in the source database, the username is sourceName, The tablespace is sourceTablespace, the username is target, and the tablespace is targetspace. The target user in the new database is automatically created, and the user password is target. You must manually create the targetTablespace tablespace before executing the command.

When you do not know the schema of the current DMP file, directly put the ExtData. DMP file ~ \ Administrator \ admin \ orcl \ dpdump (default directory when impdp is used to import files), run the impdp command on the terminal, and enter the database user name and password to import the files, sort the imported tables and grant permissions. Basically, the following error will not occur. Of course, an exception occurs in the import of files everywhere. You can use the above method to solve this problem. The most common error is as follows:

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.