Today, due to business needs, we ran exp conditional export and found some differences between Windows and Linux. The main difference lies in sensitive characters. The example is as follows:
Linux:
Exp US/pass tables = \ (t_ec_event \) file =/tmp/test. dmp query = \ "where eventid = \ '40288a2627f4910801_fab7f17232b4 \'\"
Windows:
Exp US/pass @ test tables = (t_ec_event) file = test. dmp query = 'where eventid = "40288a2627f491080108fab7f17232b4 "'
More information is as follows:
The Oracle exp tool has a query parameter that can specify a where condition to export records conditionally. For those who do not frequently use this option, this error is often encountered:
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'exp help = y' for help
EXP-00000: Export terminated unsuccessfully
This is because there are usually spaces in the where condition, and the command line will be interpreted as several command line parameters. You need to enclose the entire where condition with single quotation marks or double quotation marks, you can. in Windows, how do I specify the query parameter:
Exp... query = 'where deptno = 10'
Exp... query = 'where deptno = ''10 '''
Exp... query = 'where deptno "<" 10'
In Solaris (C shell), how to specify the query parameter:
Exp ...... query = \ "where col1 \ <1000 \"
Exp ...... query = \ "where col1 \ <'20140901 '\"
Other UNIX platforms should be the same as those under Solaris, and I often make mistakes myself. the above example shows how to use single quotes in the query value. Therefore, after reading this article, you should be able to write the correct where condition. it is best to write it in a parameter file, so you don't need to pay attention to this.
E: \> exp help = y
By entering the exp command and user name/password, you can
Command after user/password:
Example: EXP Scott/Tiger
Alternatively, you can control the running mode of "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)
Instance: 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)
---------------------------------------------------
Userid username/password
Full export the entire file (N)
Buffer data buffer size
Owner owner username list
File output file (expdat. dmp)
Tables Table Name List
Compress imports a range (y)
Recordlength Io record length
Grants export permission (y)
Inctype incremental export type
Indexes export index (y)
Incremental export of record tracking (y)
Rows export data rows (y)
Parfile parameter file name
Constraints export limit (y)
Consistent cross tabulation consistency
Log File output by log Screen
Statistics Analysis object (estimate)
Direct direct path (N)
Triggers export trigger (y)
Feedback displays the progress of each X row (0)
Filesize maximum size of each dump file
Query the clause of the selected export table subset
The following keywords are only used for table spaces that can be transferred.
Transport_tablespace export the table space metadata that can be transferred (N)
Table space list of tablespaces to be transmitted
E: \> imp help = y
You can enter the IMP command and your username/password.
Command with your username/password:
Instance: IMP Scott/Tiger
Alternatively, you can control "import" by entering the IMP command and various independent variables according to different parameters.
To specify parameters, you can use the Keyword:
Format: IMP keyword = value or keyword = (value1, value2,..., vlauen)
Instance: IMP Scott/tiger ignore = y tables = (EMP, Dept) Full = N
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)
----------------------------------------------
Userid username/password
Full import of the entire file (N)
Buffer data buffer size
Fromuser User Name List
File input file (expdat. dmp)
Touser User Name List
Show only lists file content (N)
Tables Table Name List
Ignore ignore creation error (N)
Recordlength Io record length
Grants import permission (y)
Inctype incremental Import Type
Indexes import index (y)
Commit submits array insert (N)
Rows import data rows (y)
Parfile parameter file name
Log File output by log Screen
Constraints import restrictions (y)
Destroy overwrite the tablespace data file (N)
Indexfile writes table/index information to the specified file
Skip_unusable_indexes skips maintenance of unavailable indexes (N)
Analyze executes the analyze Statement (y) in the dump file)
Feedback displays the progress of each X row (0)
Toid_novalidate skips the verification of the specified type ID
Filesize maximum size of each dump file
Recalculate_statistics recalculates the statistical value (N)
The following keywords are only used for table spaces that can be transferred.
Transport_tablespace import the deletable tablespace metadata (N)
Tablespaces tablespace to be transmitted to the database
Data files to be transmitted to the database
Tts_owners has users who can transmit table space centralized data.
Reference: http://topic.csdn.net/u/20090828/12/bd99e46b-d024-4073-a32f-c7116f1dea35.html? 55665
Author: "mgewu"