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.
Author: "mgewu"