Oracle expdp filtering and parallelism we know there are three ways to call the Data Pump. Here I will never use the command line, but the reasons for giving up the command line in the first script mode are probably as follows: ① restrictions on the number of CLI characters in the operating system ② hateful escape characters ③ cross-platform reuse impossible ④ official documentation advocates script-based approach (I) filtering objects/Data articles (1) filtering objects INCLUDE EXCLUDE and INCLUDE same usage, the INCLUDE syntax INCLUDE = object_type [: name_clause] [,...] object_type: TABLE, INDEX, CONSTRAINT, and GRANT are commonly used. For more information, see database_export_objects, schema_export_objects, table_export_objects name_clause: the indexes and constraints related to SQL statements are exported with examples. The following describes how to export all table parameter files starting with emp:
[plain] [oracle@bogon ~]$ cat hr.par SCHEMAS=HR DUMPFILE=hr.dmp DIRECTORY=dmpdir LOGFILE=hr.log INCLUDE=TABLE:"like 'EMP%'"
In this file, INCLUDE can also be written like this
[plain] INCLUDE=TABLE:"IN (select table_name from user_tables where table_name like 'EMP%')"
(2) filter data QUERY syntax QUERY = [schema.] [table_name:] query_clause this parameter is mutually exclusive with the following CONTENT = METADATA_ONLY ESTIMATE_ONLY TRANSPORT_TABLESPACES. Example: export the parameter file of all employees whose department number is 50 and employee number is greater than 128 is as follows:
[plain] [oracle@bogon ~]$ cat hr.par SCHEMAS=HR DUMPFILE=hr02.dmp DIRECTORY=dmpdir LOGFILE=hr02.log INCLUDE=TABLE:"IN ('EMPLOYEES','DEPARTMENTS')" QUERY=EMPLOYEES:"where employee_id>=128",DEPARTMENTS:"where department_id=20"
(Ii) there are only three types of parallel settings to export in parallel: whether or not the results are improved to be better, unchanged, or even worse depends on the parameter of Multi-bunker, whether parameters and parameter values are suitable for fundamental parallelism requires costs, because before parallelism, server resources need to be comprehensively weighed, computing is parallel, and concurrent allocation of tasks is an art, because PARALLEL is often used with FILESIZE and DUMPFILE, the following is an example of PARALLEL Optimization given by the official documentation:
[plain] expdp hr/hr FULL=y DUMPFILE=dpump_dir1:full1%U.dmp, dpump_dir2:full2%U.dmp FILESIZE=2G PARALLEL=3 LOGFILE=dpump_dir1:expfull.log JOB_NAME=expfull
In addition, the concurrency setting should not exceed 2 times the number of CPUs
[plain] sys@ORCL> show parameter cpu NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cpu_count integer 1