---restore content starts---
Now large enterprises generally use Oracle database, Oracle database in the general use of EXPDP,IMPDP Export import data, but in the operation often encountered some problems. The following is an analysis of these problems.
1. Exporting data
Typically, you need to create a directory address when exporting data
SELECT * from Dba_directories; --Query All directory addresses
Create or replace directory Winqt_dump as '/home/front/dmpfile '; --Create Directory address
Grant Read,write on directory winqt_dump to Qtdb; --Assigning read and Write permissions to directory addresses
Drop directory DUMPWINQT; --Delete directory address
Select Username,default_tablespace from Dba_users; --Query the table space below the user
SELECT * from User_indexes; --Query the user for all indexes
Select table_name from user_tables where num_rows > 0; --Querying tables with data
Note that you need to log in with an Oracle user when assigning permissions to the database.
EXPDP qtdb/qtdb dumpfile=20150907test.dmp directory=dumpwinqt schemas=qtdb logfile=export.log; --Export Database
Touch Export.log; --Export log path
CHOMD 777 Export.log; --Assigning permissions to the log
such as all
Question 1:
2. Import data
IMPDP hsqtdb/hsqtdb dumpfile=20150217qtdb.dmp directory=dumpwinqt remap_schema=hnqtdb:hsqtdb nologfile=true;--Import data
Export with EXPDP corresponding import is used IMPDP otherwise will be reported the following error:
If the empty table exists best with EXPDP export because there is a new feature in oracle11g, when the table has no data, the segment is not allocated to save space, so exp does not lead to empty table. The solution is to use EXPDP
3. Create a DB instance
Sqlplus/as SYSDBA
Drop user C3front cascade;
Create user C1ECIFGP identified by C1ECIFGP default tablespace USERS temporary tablespace TEMP;
Grant Connect, resource, dba to C1ECIFGP;
Oracle Database Operations