Example export9.par content is as follows: userid = ctgpc / xuyunsheng @ ctgpcWeb Owner = ctgpc rows = y indexes = y GRANTS = y constraints = y CONSISTENT = y (Note: consistent is the meaning of consistency. Conistent = y indicates how many of the exported database When a table, the timing of these tables is the same. EXP command first puts all the tables involved in the table, then export, if the table is large, will take up a lot of returns. No Recommended, if you want to use the best table to operate only on a small table) compress = y (Note: do not use compress = yiff there is not used) Direct = y buffer = 20000 file = / backup/ctGPC_20030623.dmp log = / backup / ctgpc_20030623.log
When using the command as follows: Exp Parfile = / filepath / export9.par Note: If you need to export all databases, please replace the first and second lines into full = Y example import9.par content as follows: fromuser = TGPMS (Oracle is not allowed Directly change the owner of the table, using Export / Import to achieve this.) Touser = TGPMS2 (Note: Use the owner of the table by fromuser to Touser, fromuser, and Touser users can be different) Rows = y indexes = Y GRANTS = Y constraints = y buffer = 409600 file == / backup / cTGPC_20030623.dmp log == / backup / import_20030623.log Used commands as follows: IMP PARFILE = / filepath / import9.par ---------- -------------------------------------------------- --------------------- Here's how to use some export / import skills
- Move the database object from one user to another
Oracle does not allow direct changes to the owners of the table, and uses Export / Import to achieve this.
Suppose you want to change the owner USER1 of Table T to User2, the specific steps are:
- Exp System / Manager Tables = User1.t
- IMP System / Manager fromuser = User1 Touser = USER2 TABLES = T
- DROP TABLE User1.t
- Move the database object from a table space to another table space
When you build a table, you can specify a table space, and the table space can be changed at will. To move from the tablespace TBS1 to the table space TBS2, the following method is used:
- Exp
- DROP TABLE T
- Edit Temp.sql only retain the desired meter command and specify table space to TBS2
- Execute Temp.sql with the owner of the table
- IMP
- Export / Import uses different character sets
The export file contains character information. Both the input / output use the taxbed character set, such as EBCDIC or US7ASCII, will automatically perform character set conversion, during the conversion process, if the target character set in the output file cannot match The characters are automatically set to default characters.
For multi-byte character sets, such as zHS16CGB231280, usually cannot be automatically converted, and can only be automatically converted without changing the length of the string.
- Space is not enough - Debris problem
Sometimes, even if the database still has enough space, it is not enough to use IMPORT. This phenomenon is usually due to debris in the database, that is, there are many small discontinuous free space. Solution is to first put the database first The full warehouse export (full = y), shutdown database, re-establish database (CREATE DATABASE) After using import full = y to recover data.
- There is not enough ROLLBACK paragraph
During the use of Export / Import, if the amount of data appears in the volume of the 'rollback segment, it is incorrect. At this time, it is necessary to build a large enough Rollback section, so that Other Rollback segment offline. This way, export / import use this big Rollback Segment, thereby avoiding the above phenomenon.