Oracle Import Export prompt EXP-0006: internal inconsistency error Solution

Source: Internet
Author: User

Oracle Import Export prompt EXP-0006: internal inconsistency error Solution

Exp and imp are two of the oldest operating system command line tools survived by ORACLE, import (IMP)/Export (EXP), yesterday in Oracle with exp, imp Import Export report EXP-0006: internal inconsistency error.

In the past, exp and imp commands were used to export and import Oracle databases. In this case, exp and imp export libraries were used for the newly installed Oracle databases on the server yesterday, always reported "EXP-0006: internal inconsistency error", so on the Internet Baidu, try other Database Export method, found that using expdp, impdp data pump can also complete the Database Export, Import, in addition, the data pump has the following differences with the traditional export import:

1. EXP and IMP are client-segment tool programs, and EXPDP and IMPDP are server-side tool programs;

2. EXP and IMP are less efficient. EXPDP and IMPDP are more efficient;

3. Powerful Data Pump functions in parallel, filtering, conversion, compression, encryption, and interaction;

4. Data Pump versions earlier than 9i are not supported. EXP/IMP is applicable in a short term;

5. The same exp/imp data pump export includes four modes: export table, export scheme, export tablespace, and export database.

With the theoretical support, we will start the actual practice below.

  Expdp export Oracle Database

  1. create Directory under sqlplus,The advantage is that we can flexibly read and write files in Oracle databases, which greatly improves the ease of use and scalability of Oracle.

Command: createdirectory oracleDB as 'd: \ oracledb ';

  2. Grant read and write permissions to specific users

Command: Grantread, write on directory oracleDB to radpcs;

  3. Execute the expdp Export command in the dos window

Command: expdp radpcs/ictradpcs @ rdpcs directory = oracleDB dumpfile = 20150226.dmp logfile = 20150226. logFULL = y;

After the export is completed, the following describes how to import data to the Oracle database using impdp.

  Import impdp to Oracle Database

  
1. log on to the Oracle database at the sysdba level

Command: -- sqlplus/nolog

-- Conn system/system @ radpcs as sysdba

  2. Create a data table space

Command:

-- Create a data table space

Create tablespace RADPCS_DATA

LOGGING

DATAFILE 'd: \ OracleDB \ radpcs_data.dbf' SIZE 200 M REUSE AUTOEXTEND

On next 10 m maxsize 16383 M EXTENT MANAGEMENT LOCAL UNIFORM

SIZE 1024 K;

-- Create index tablespace

Create tablespace RADPCS_INDX

LOGGING

DATAFILE 'd: \ OracleDB \ radpcs_indx.dbf' SIZE 200 M REUSE AUTOEXTEND

On next 10 m maxsize 16383 M EXTENT MANAGEMENT LOCAL UNIFORM

SIZE 1024 K;

This step is critical. The created tablespace must have the same name and number as the original Oracle tablespace. Otherwise, the import will fail. If you do not know the name and number of the original tablespace, create a temporary tablespace for import. During the import process, follow the error message, for example, "RADPCS1_DATA tablespace does not exist.

  3. Create a user and authorize the user

-- Create a user

Create user radpcs identified by ictradpcs

Default tablespace radpcs_data

Quota unlimited on radpcs_data

Quota unlimited on radpcs_indx;

-- Authorization

Grant aq_administrator_role to radpcs;

Grant aq_user_role to radpcs;

Grant authenticateduser to radpcs;

Grant connect to radpcs;

Grant ctxapp to radpcs;

Grant dba to radpcs;

Grant delete_catalog_role to radpcs;

Grant ejbclient to radpcs;

Grant execute_catalog_role to radpcs;

Grant exp_full_database to radpcs;

Grant gather_system_statistics to radpcs;

Grant hs_admin_role to radpcs;

Grant imp_full_database to radpcs;

Grant javadebugpriv to radpcs;

Grant javaidpriv to radpcs;

Grant policyspriv to radpcs;

Grant javauserpriv to radpcs;

Grant java_admin to radpcs;

Grant java_deploy to radpcs;

Grant logstdby_administrator to radpcs;

Grant oem_monitor to radpcs;

Grant olap_dba to radpcs;

Grant recovery_catalog_owner to radpcs;

Grant resource to radpcs;

Grant select_catalog_role to radpcs;

Grant xdbadmin to radpcs;

-- Grant/Revoke system privileges

Grant administer database trigger to radpcs;

Grant alter any cluster to radpcs;

Grant alter any dimension to radpcs;

Grant alter any index to radpcs;

Grant alter any indextype to radpcs;

Grant alter any library to radpcs;

Grant alter any outline to radpcs;

Grant alter any procedure to radpcs;

Grant alter any role to radpcs;

Grant alter any sequence to radpcs;

Grant alter any snapshot to radpcs;

Grant alter any table to radpcs;

Grant alter any trigger to radpcs;

Grant alter any type to radpcs;

Grant alter database to radpcs;

Grant alter profile to radpcs;

Grant alter resource cost to radpcs;

Grant alter rollback segment to radpcs;

Grant alter session to radpcs;

Grant alter system to radpcs;

Grant alter tablespace to radpcs;

Grant alter user to radpcs;

Grant analyze any to radpcs;

Grant audit any to radpcs;

Grant audit system to radpcs;

Grant backup any table to radpcs;

Grant become user to radpcs;

Grant comment any table to radpcs;

Grant create any cluster to radpcs;

Grant create any context to radpcs;

Grant create any dimension to radpcs;

Grant create any directory to radpcs;

Grant create any index to radpcs;

Grant create any indextype to radpcs;

Grant create any library to radpcs;

Grant create any operator to radpcs;

Grant create any outline to radpcs;

Grant create any procedure to radpcs;

Grant create any sequence to radpcs;

Grant create any snapshot to radpcs;

Grant create any synonym to radpcs;

Grant create any table to radpcs;

Grant create any trigger to radpcs;

Grant create any type to radpcs;

Grant create any view to radpcs;

Grant create cluster to radpcs;

Grant create database link to radpcs;

Grant create dimension to radpcs;

Grant create indextype to radpcs;

Grant create library to radpcs;

Grant create operator to radpcs;

Grant create procedure to radpcs;

Grant create profile to radpcs;

Grant create public database link to radpcs;

Grant create public synonym to radpcs;

Grant create role to radpcs;

Grant create rollback segment to radpcs;

Grant create sequence to radpcs;

Grant create session to radpcs;

Grant create snapshot to radpcs;

Grant create synonym to radpcs;

Grant create table to radpcs;

Grant create tablespace to radpcs;

Grant create trigger to radpcs;

Grant create type to radpcs;

Grant create user to radpcs;

Grant create view to radpcs;

Grant debug any procedure to radpcs;

Grant debug connect session to radpcs;

Grant delete any table to radpcs;

Grant drop any cluster to radpcs;

Grant drop any context to radpcs;

Grant drop any dimension to radpcs;

Grant drop any directory to radpcs;

Grant drop any index to radpcs;

Grant drop any indextype to radpcs;

Grant drop any library to radpcs;

Grant drop any operator to radpcs;

Grant drop any outline to radpcs;

Grant drop any procedure to radpcs;

Grant drop any role to radpcs;

Grant drop any sequence to radpcs;

Grant drop any snapshot to radpcs;

Grant drop any synonym to radpcs;

Grant drop any table to radpcs;

Grant drop any trigger to radpcs;

Grant drop any type to radpcs;

Grant drop any view to radpcs;

Grant drop profile to radpcs;

Grant drop public database link to radpcs;

Grant drop public synonym to radpcs;

Grant drop rollback segment to radpcs;

Grant drop tablespace to radpcs;

Grant drop user to radpcs;

Grant execute any indextype to radpcs;

Grant execute any library to radpcs;

Grant execute any operator to radpcs;

Grant execute any procedure to radpcs;

Grant execute any type to radpcs;

Grant flashback any table to radpcs;

Grant force any transaction to radpcs;

Grant force transaction to radpcs;

Grant global query rewrite to radpcs;

Grant any object privilege to radpcs;

Grant any privilege to radpcs;

Grant any role to radpcs;

Grant insert any table to radpcs;

Grant lock any table to radpcs;

Grant manage tablespace to radpcs;

Grant on commit refresh to radpcs;

Grant query rewrite to radpcs;

Grant restricted session to radpcs;

Grant resumable to radpcs;

Grant select any sequence to radpcs;

Grant select any table to radpcs;

Grant under any table to radpcs;

Grant under any type to radpcs;

Grant under any view to radpcs;

Grant unlimited tablespace to radpcs;

Grant update any table to radpcs;

Grant select on dba_free_space to radpcs;

Grant select on dba_data_files to radpcs;

  4. create Directory under sqlplus

Command: createdirectory oracleDB as 'd: \ oracledb ';

  
5. Grant the read/write permission to a specific user

Command: Grantread, write on directory oracleDB to radpcs;

  6. Execute the impdp import command in the dos window.

Command: impdp radpcs/ictradpcs @ rdpcs directory = oracleDB dumpfile = 20150226.dmp logfile = 20150226.log;

After a long wait, the dos window prompts that the export is complete. If an error occurs during the import process, an error message is displayed. (if the data is complete, some errors can be ignored ).

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.