1,部分的exp中的参数仍然可用,有的不能使用,如index。
2,directory:供转储文件和日志文件使用的目录对象。
3,job_name:指定的任务的名称。
4,content:指定要导出的数据, 其中有效关键字值为: (ALL), DATA_ONLY 和 METADATA_ONLY,当设置content为ALL 时,将导出对象定义及其所有数据;
DATA_ONLY时,只导出对象数据;为METADATA_ONLY时,只导出对象定义 。
5,reuse_dumpfiles:如果导出文件已经存在,是否覆盖。
6,compression:压缩导出文件。
7,estimate:指定估算被导出表所占用磁盘空间分方法.默认值是BLOCKS
8, estimate_only:是否只估算导出占用的磁盘空间,而不进行真正的导出,默认是N。
9,exclude:用于指定执行操作时要排除对象类型或相关对象,用法:EXCLUDE=object_type[:name_clause] [,….]
10,include:用于指定执行操作时要包含的对象类型或相关对象,用法:INCLUDE=object_type[:name_clause] [,….]
11,query:导出符合条件的行。
12,attch:连接到现有的作业,可以用在中断导出任务后重新启动导出任务。
----------------------------------------------------------------
[[email protected] oracle]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 21 20:50:29 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create directory test_impdp_expdp as ‘/u01/app/oracle/test_impdp_expdp‘;
Directory created.--创建目录
SQL> grant write,read on directory test_impdp_expdp to hr;
Grant succeeded.--给用户赋予权限
SQL> grant write,read on directory test_impdp_expdp to test1;
Grant succeeded.--给用户赋予权限
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Productio
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[[email protected] oracle]$ cd test_impdp_expdp/
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] directory=TEST_IMPDP_EXPDP dumpfile
--默认是多出用户的所有的对象
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 22:14:04 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."SYS_EXPORT_SCHEMA_01": hr/********@jiagulun directory=TEST_IMPDP_EXPDP dumpfi
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 768 KB
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/CLUSTER/CLUSTER
Processing object type SCHEMA_EXPORT/CLUSTER/INDEX
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/EVENT/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/JOB
. . exported "HR"."ADDRESS" 5.476 KB 2 rows
. . exported "HR"."COUNTRIES" 6.367 KB 25 rows
. . exported "HR"."DEPARTMENTS" 7.007 KB 27 rows
. . exported "HR"."DEPT" 5.492 KB 3 rows
. . exported "HR"."DROPPED_OBJ" 6.367 KB 21 rows
. . exported "HR"."EMPLOYEES" 16.81 KB 107 rows
. . exported "HR"."JOBS" 6.992 KB 19 rows
. . exported "HR"."JOB_HISTORY" 7.054 KB 10 rows
. . exported "HR"."LOCATIONS" 8.273 KB 23 rows
. . exported "HR"."REGIONS" 5.476 KB 4 rows
. . exported "HR"."STUDENT" 5.937 KB 3 rows
. . exported "HR"."TEST_JOB" 24.74 KB 1684 rows
Master table "HR"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_SCHEMA_01 is:
/u01/app/oracle/test_impdp_expdp/test_exp_01.dmp
Job "HR"."SYS_EXPORT_SCHEMA_01" successfully completed at 22:16:07
[[email protected] test_impdp_expdp]$ ls
export.log test_exp_01.dmp
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] directory=TEST_IMPDP_EXPDP TABLES=Sexp_02.dmp EXCLUDE=INDEX:"=\‘INDEX_ADDRESS_NAME\‘"
LRM-00116: syntax error at ‘INDEX:‘ following ‘=‘
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] directory=TEST_IMPDP_EXPDP TABLES=Sexp_02.dmp EXCLUDE=INDEX:"IN\‘INDEX_ADDRESS_NAME\‘"
.--通过上面的导出你会发现需要对‘进行转义,而且是IN关键字
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 22:25:09 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."SYS_EXPORT_TABLE_01": hr/********@jiagulun directory=TEST_IMPDP_EXPDP TABLES=_exp_02.dmp EXCLUDE=INDEX:IN\‘INDEX_ADDRESS_NAME\‘
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 128 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HR"."ADDRESS" 5.476 KB 2 rows
. . exported "HR"."STUDENT" 5.937 KB 3 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/test_impdp_expdp/test_exp_02.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 22:25:20
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student,address encryption=dmpfiles=test_exp_encrytion_reuse_01.dmp
LRM-00101: unknown parameter name ‘dumpfiles‘
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student,address encryption=dmpfile=test_exp_encrytion_reuse_01.dmp
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 22:32:31 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39145: directory object parameter must be specified and non-null
--对于上面的错误是因为没有打开或者不存在encryption wallet所以需要进行下面操作:
oracle Wallet的使用(即内部加密技术TDE(Transparent Data Encryption ))
1. TDE是Oracle10gR2中推出的一个新功能,使用时要保证Oracle版本是在10gR2或者以上
--查看oracle版本:
select * from v$version;
2、创建一个新目录,并指定为Wallet目录
D:\oracle\product\10.2.0\admin\ora10\ora_wallet
3. 设置wallet目录,在参数文件sqlnet.ora中(window+f,在你安装盘区查找sqlnet.ora),按照下面的格式加入信息:
ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD=FILE)
(METHOD_DATA=(DIRECTORY=D:\oracle\product\10.2.0\admin\ora10\ora_wallet)))
4. 创建master key文件,指定wallet密码,使用SYS用户登入系统,建立加密文件
SQL> alter system set encryption key identified by "wallet";
System altered
-- 密码"wallet"不加引号时,后面使用时也不需要用引号
此时在设置的目录下,多出一个Personal Information Exchange类型的文件,相当于我们生成的master key文件。D:\oracle\product\10.2.0\admin\ora10\ora_wallet\ewallet.p12
5、启动、关闭Wallet
SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "wallet";
ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "wallet"
ORA-28354: wallet 已经打开
SQL> ALTER SYSTEM SET ENCRYPTION WALLET CLOSE; --关闭
System altered
SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "wallet"; --打开
System altered
到此,已经成功配置了Wallet,创建了master key。
--通过上面的创建并且开启encryption wallet后才可以进行如下
[[email protected] wallet]$ expdp hr/[email protected] tables=student directory=TEST_IMPDP_EXPDP dumpfile=test_exp_encryption_1.dmp encryption=data_only
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:57:01 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."SYS_EXPORT_TABLE_01": hr/********@jiagulun tables=student directory=TEST_IMPDP_EXPDP dumpfile=test_exp_encryption_1.dmp encryption=data_only
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HR"."STUDENT" 5.945 KB 3 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/test_impdp_expdp/test_exp_encryption_1.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 23:57:08
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student compression=data_onl reuse_dumpfiles=y dumpfile=test_exp_01.dmp--reuse_dumpfiles表示可以覆盖原文件
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 22:41:57 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."SYS_EXPORT_TABLE_01": hr/********@jiagulun tables=student compression=data_on reuse_dumpfiles=y dumpfile=test_exp_01.dmp
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HR"."STUDENT" 4.914 KB 3 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/test_impdp_expdp/test_exp_01.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 22:42:02
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMPDP_EXPDP
EXCLUDE=CONSTRAINT:IN\‘PK_PRIMARY\‘" dumpfile=test_exp_jobname.dmp job_name=test_exp_jobname
--需要转义和大写
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 22:56:23 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."TEST_EXP_JOBNAME": hr/********@jiagulun tables=student directory=TEST_IMPDP_EK_PRIMARY\‘ dumpfile=test_exp_jobname.dmp job_name=test_exp_jobname
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HR"."STUDENT" 5.937 KB 3 rows
Master table "HR"."TEST_EXP_JOBNAME" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.TEST_EXP_JOBNAME is:
/u01/app/oracle/test_impdp_expdp/test_exp_jobname.dmp
Job "HR"."TEST_EXP_JOBNAME" successfully completed at 22:56:28
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMPIN\‘PK_PRIMARY\‘" dumpfile=test_exp_jobname.dmp job_name=test_exp_jobname
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 22:57:02 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/u01/app/oracle/test_impdp_expdp/test_exp_jobname.dmp"
ORA-27038: created file already exists
Additional information: 1
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMPIN\‘PK_PRIMARY\‘" dumpfile=test_exp_jobname.dmp job_name=test_exp_jobname REUSE_DUMPFILES=Y
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:16:05 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."TEST_EXP_JOBNAME": hr/********@jiagulun tables=student directory=TEST_IMPDP_EK_PRIMARY\‘ dumpfile=test_exp_jobname.dmp job_name=test_exp_jobname REUSE_DUMPFILES=Y
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HR"."STUDENT" 5.937 KB 3 rows
Master table "HR"."TEST_EXP_JOBNAME" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.TEST_EXP_JOBNAME is:
/u01/app/oracle/test_impdp_expdp/test_exp_jobname.dmp
Job "HR"."TEST_EXP_JOBNAME" successfully completed at 23:16:19
[[email protected] test_impdp_expdp]$ exp hr/[email protected] TABLES=STUDENT DIRECTORY=test_impdp_etion.dmp
LRM-00101: unknown parameter name ‘DIRECTORY‘
EXP-00019: failed to process parameters, type ‘EXP HELP=Y‘ for help
EXP-00000: Export terminated unsuccessfully
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMP id <2" dumpfile=test_exp_query.dmp
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:17:57 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMP id <2" dumpfile=test_exp_query.dmp reuse_dumpfile=y
LRM-00101: unknown parameter name ‘reuse_dumpfile‘
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMP id <2" dumpfile=test_exp_query.dmp reuse_dumpfiles=y
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:18:28 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMP id <2" dumpfile=test_exp_query_1.dmp
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:18:56 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] directory=TEST_IMPDP_EXPDP query=s=test_exp_query_1.dmp
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:19:11 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] directory=TEST_IMPDP_EXPDP query=s=test_exp_query_1.dmp
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:19:37 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] directory=TEST_IMPDP_EXPDP query=se=test_exp_query_1.dmp
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:21:12 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMP id \<2" dumpfile=test_exp_query_1.dmp
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:21:41 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMP dumpfile=test_exp_query_1.dmp
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:26:04 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMPery_1.dmp query=STUDENT:"WHERE ID < 2"
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:28:16 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMPery_1.dmp query=STUDENT:"WHERE ID \< 2"
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:28:23 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39035: Data filter SUBQUERY has already been specified.
[[email protected] test_impdp_expdp]$ expdp hr/[email protected] tables=student directory=TEST_IMPery_1.dmp query=STUDENT:\"WHERE ID \< 2\"
--通过上面的错误可以知道符号需要被转义和query的使用方式
Export: Release 11.2.0.1.0 - Production on Wed Jan 21 23:28:30 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."SYS_EXPORT_TABLE_01": hr/********@jiagulun tables=student directory=TEST_IMPDry_1.dmp query=STUDENT:"WHERE ID < 2"
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HR"."STUDENT" 5.906 KB 1 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/test_impdp_expdp/test_exp_query_1.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 23:28:40
WRL_TYPE
--------------------
WRL_PARAMETER
--------------------------------------------------------------------------------
STATUS
------------------
file
/u01/app/oracle/admin/jiagulun/wallet
CLOSED
|