1. Detailed description of export tool parameters
- [Oracle @ linux exp] $ exp help = y
- Export: Release 10.2.0.4.0-ProductionOnWednesday, September 16, October 5 15:08:57, 2011
- Copyright (c) 1982,200 7, Oracle.AllRights reserved.
- Enter the EXP command and your username/password to export
- You are prompted to enter the following parameters:
- Example: exp scott/TIGER
- Alternatively, you can control the export by entering the EXP command with various parameters
- . To specify parameters, you can use the Keyword:
- Format: exp keyword = value or KEYWORD = (value1, value2,..., valueN)
- Example: exp scott/tiger grants = y tables = (EMP, DEPT, MGR)
- Or TABLES = (T1: P1, T1: P2). If T1 is a partitioned table
- USERID must be the first parameter in the command line.
- Keyword description (default) keyword description (default)
- --------------------------------------------------------------------------
- USERID username/passwordFULLExport the entire file (N)
- BUFFER data BUFFER size OWNER User Name List
- FILE output FILE (EXPDAT. DMP) TABLES Table Name List
- Length of the IO record that COMPRESS imports to a partition (Y) RECORDLENGTH
- GRANTS export permission (Y) INCTYPE incremental export type
- INDEXES export index (Y) RECORD trace incremental Export (Y)
- DIRECT path (N) TRIGGERS export trigger (Y)
- LOG File output by LOG ScreenSTATISTICSAnalysis object (ESTIMATE)
- ROWSExport data row (Y) PARFILE parameter file name
- CONSISTENT cross tabulation consistency (N) CONSTRAINTS exported by CONSTRAINTS (Y)
- OBJECT_CONSISTENT is set to read-only transaction processing only during object Export (N)
- The progress of FEEDBACK is displayed on every x rows (0)
- FILESIZE: maximum size of each dump.
- FLASHBACK_SCN is used to set the session snapshot back to the previous state SCN
- FLASHBACK_TIME is used to obtain the SCN time closest to the specified time.
- QUERY is used to export the subset of a tableSelectClause
- When the RESUMABLE encounters a space-related error, it suspends (N)
- RESUMABLE_NAME is a text string used to identify a recoverable statement.
- The waiting time of RESUMABLE_TIMEOUT RESUMABLE.
- TTS_FULL_CHECK performs a full or partial correlation check on TTS.
- VOLSIZE number of bytes written to each Tape Volume
- Table space list of TABLESPACES to Be Exported
- TRANSPORT_TABLESPACE export the table space metadata that can be transferred (N)
- TEMPLATE: name of the TEMPLATE to be exported in iAS mode.
- The export is successfully terminated without a warning.
2. Common export commands
Full mode Export (entire database)
- Exp system/oracle @ orclFull= Y file = demo1.dmp log = demo1.log
Export in user mode (export all objects under user ing)
- Exp system/oracle owner = ing file = demo2.dmp log = demo2.log
Export in Table mode (export the dept table under user ing)
- Exp system/oracle tables = ing. dept file = demo3.dmp log = demo3.log
Export with the where condition (export the first two rows of the dept table under the user ing)
- Exp system/oracle tables = ing. dept query = \"Where rownum \ <3 \"File = demo4.dmp log = demo4.log
Fuzzy Export (export tables starting with de under user ing)
- Exp system/oracle @ orcl tables = ing.de % file = demo5.dmp log = demo5.log
3. view the Oracle character set through the dmp File
First, open the dmp file through the editing software such as UE or execute the following in Linux and then check the second and third bytes. If the dmp file is large, for example, 2 GB or above (this is also the most common case), you can use the following command (on a linux host) to open it slowly or completely without using a text editor ):
- [Oracle @ linux exp] $ cat demo5.dmp | od-x | head-1 | awk'{Print $2 $3 }'| Cut-c 3-6
- 0345
- SQL>SelectNls_charset_name (to_number ('123','Xxxx'))FromDual;
- NLS_CHARSET_NAME (TO_NUMBER ('123','Xxxx'
- ----------------------------------------
- ZHS16GBK
4. Export Permission Problems
For normal users to export and import data, you must grant permissions.
- SQL>GrantExp_full_database, imp_full_databaseToIng;
- Authorization successful.
5. Character Set Problems
The character set of the client is the same as that of the database during export.
- [Oracle @ linux exp] $ echo $ NLS_LANG
- SIMPLIFIED CHINESE_CHINA.ZHS16GBK