October 14 to the electronic deployment system, with EXP, IMP Guide Library command successfully implemented the Oracle database export, import, in this case, also published a special article Oracle Database Export Import, explain the export, import process.
Yesterday, the new server installed Oracle database with EXP, IMP Guide library, has been reported "EXP-0006: The internal inconsistency of the error," and then in the online Baidu, try other Guide library methods, found that the use of EXPDP, IMPDP data pump can also complete the export of the database, import, and the data pump and the traditional export import has 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 features 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 more applicable;
5. The same EXP/IMP data pump export includes export table, export scheme, export table space, export database 4 ways.
With the theoretical support, the following start combat.
EXPDP Export Oracle Database
1. The advantage of creating a directory under Sqlplus is that it allows us to flexibly read and write files in the Oracle database, greatly improving the ease of use and scalability of Oracle.
Command: CreateDirectory oracledb as ' D:\OracleDB ';
2. Grant Read and write access to specific users
Command: Grantread,write on directory oracledb to Radpcs;
3. Execute EXPDP Export command in DOS window
Command: EXPDP radpcs/ictradpcs@rdpcs directory=oracledb dumpfile =20150226.dmp logfile=20150226.logfull=y;
To complete this export, let's explain how to import an Oracle database with IMPDP.
IMPDP Import Oracle Database
1. Login to Oracle database at SYSDBA level
Command:--sqlplus/nolog
--conn System/system@radpcs as Sysdba
2. Create a datasheet space
Command:
--Create a datasheet 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 an 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 table space name or number, otherwise importing fails. If you do not know the original table space name, number, first create a temporary table space for import, in the import process according to the error prompts, such as "Radpcs1_data tablespace does not exist" hint, the lack of which to create which.
3. Create the user, authorize the user
--Create user create radpcs identified by ictradpcs default Tablespace radpcs_data quota Unlimited on radpcs_data quota Unli
mited on Radpcs_indx;
-Authorized 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 Javasyspriv 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 is 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 of 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 grant any object privilege to radpcs;
Grant Grant any privilege to radpcs;
Grant 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 your directory under Sqlplus
Command: CreateDirectory oracledb as ' D:\OracleDB ';
5. Grant Read and write access to specific users
Command: Grantread,write on directory oracledb to Radpcs;
6. Execute IMPDP Import command in DOS window
Command: IMPDP radpcs/ictradpcs@rdpcs directory=oracledb dumpfile=20150226.dmp logfile=20150226.log;
After a long wait, the DOS window prompts the export to complete. If an error occurs 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