October 14 to the electronic deployment of the system, with exp, IMP Guide Library command to achieve the successful implementation of the Oracle database export, import, in this, but also published an article Oracle database Export Import, explain the export, import process.
yesterday again on the server newly installed Oracle database with EXP, IMP Guide library, has been reported "EXP-0006: there is internal inconsistency error", so in the online Baidu, try other Guide library way, found using EXPDP, IMPDP The data pump can also complete the export and import of the database, and the data pump and the traditional export import have the following differences:
1.EXP and Imp are customer segment tool programs, EXPDP and IMPDP are service-side tool programs;
2.EXP and Imp are less efficient. High efficiency of EXPDP and IMPDP;
3. Data pump powerful parallel, filtering, conversion, compression, encryption, interaction and so on;
4. Data pump does not support the previous version of 9i, exp/imp in the short term or relatively applicable;
5. With EXP/IMP data pump export includes export table, export scheme, export table space, export database 4 ways.
With theoretical support, the following starts the actual combat.
EXPDP Exporting an Oracle database
1. The advantage of creating a directory under Sqlplus is that it allows us to read and write files flexibly in the Oracle database, greatly improving the Oracle Ease of use and scalability.
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 EXPDP Export command in DOS window
Command:EXPDP radpcs/[email protected] directory=oracledb dumpfile =20150226.dmp logfile=20150226.log full=y ;
To complete this export work, here's how to import an Oracle database with IMPDP.
IMPDP Importing an Oracle database
1. Log in to the Oracle database at SYSDBA level
command:-- Sqlplus/nolog
--conn System/[email protected] 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 200M reuse autoextend
On NEXT 10M MAXSIZE 16383M EXTENT MANAGEMENT LOCAL UNIFORM
SIZE 1024K;
--Create INDEX Table space
CREATE tablespace radpcs_indx
LOGGING
datafile ' D:\OracleDB \radpcs_indx. DBF ' SIZE 200M reuse autoextend
On NEXT 10M MAXSIZE 16383M EXTENT MANAGEMENT LOCAL UNIFORM
SIZE 1024K;
This step is critical, creating a table space that needs to be the same as the original Oracle tablespace name and number, or the import fails. If you do not know the original table space name, the number of the first create a temporary tablespace for import, the import process based on error prompts, such as "radpcs1_data table space does not exist" hint, which one is missing.
3. Create the user, authorize the user
--Create user radpcs identified by Ictradpcsdefault tablespace Radpcs_dataquota Unlimited on Radpcs_dataquota unlimit Ed on radpcs_indx;--authorized Grant Aq_administrator_role to radpcs;grant Aq_user_role to radpcs;grant Authenticateduser to RADPC S;grant Connect to Radpcs;grant Ctxapp to Radpcs;grant dba to Radpcs;grant delete_catalog_role to radpcs;grant ejbclient t o 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 Javasyspriv to Radpcs;grant Javauserpriv to Radpcs;grant java_admin to radpcs;grant Java_deploy to radpcs;grant logs Tdby_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 GR Ant Administer database TriggER to radpcs;grant alter any cluster to radpcs;grant alter any dimension to radpcs;grant alter any index to radpcs;grant a Lter any indextype to radpcs;grant alter all 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 alte R any table to radpcs;grant alter all trigger to radpcs;grant alter all type to radpcs;grant ALTER DATABASE to Radpcs;gran T alter profile to radpcs;grant alter resource cost to radpcs;grant alter ROLLBACK segment to radpcs;grant alter session T o radpcs;grant alter system to radpcs;grant ALTER TABLESPACE to radpcs;grant ALTER user to radpcs;grant analyze any to Rad Pcs;grant Audit any to radpcs;grant audit system to radpcs;grant Backup no table to radpcs;grant become user to Radpcs;gr Ant Comment Any table to radpcs;grant create any cluster to radpcs;grant create any context to radpcs;grant create any Dim Ension to Radpcs;grant Create any directory to radpcs;grant create any, radpcs;grant create any indextype to radpcs;grant create any Libra Ry to radpcs;grant create any operator to radpcs;grant create any outline to radpcs;grant create any procedure to Radpcs;g Rant 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 R Adpcs;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;g Rant Create rollback segment to radpcs;grant create sequence to radpcs;grant create session to Radpcs;grant create Snapsho T to radpcs;grant Create Synonym to radpcs;grant create table to radpcs;grant create tablespace to radpcs;grant create trigger to Radpcs;grant CRE Ate type to radpcs;grant create user to radpcs;grant create view to radpcs;grant Debug all 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 Rad Pcs;grant drop any dimension to radpcs;grant drop all directory to Radpcs;grant drop any index to radpcs;grant drop any in Dextype to radpcs;grant drop any library to radpcs;grant drop any operator to radpcs;grant drop any outline to Radpcs;gran T 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 Typ E to Radpcs;grant drop no view to radpcs;grant drop profiles to radpcs;grant drop public database link to radpcs;grant DRO P public synonym to RADPCs;grant drop rollback segment to Radpcs;grant drop tablespace to radpcs;grant drop user to Radpcs;grant execute any index Type to radpcs;grant execute any library to radpcs;grant execute any operator to radpcs;grant execute any procedure to RAD Pcs;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 grant no object privilege to radpcs;grant grant any PRI Vilege to Radpcs;grant grant no role to radpcs;grant insert any table to radpcs;grant lock any table to Radpcs;grant Mana GE 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 r Adpcs;grant under any type to radpcs;grant under no 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 a directory under Sqlplus
Command: CreateDirectory oracledb as ' D:\OracleDB ';
5. Grant Read and Write permissions to specific users
Command: Grantread,write on directory oracledb to Radpcs;
6. Execute IMPDP Import command in DOS window
command: IMPDP Radpcs/[email protected] directory=oracledb dumpfile=20150226.dmp logfile=20150226.log;
After a long wait, the DOS window will prompt for the export to complete. If there is an error in the import process, an error message is prompted (as long as the data is complete, some errors can be ignored).
Reference article: http://blog.csdn.net/indexman/article/details/7849401
Oracle guided library that stuff.