eximpdp include table多种table怎么写

Created By BaoXinjian
PARFILE 可以把各种参数配置为一个文本键值形式的文件,该参数可以指定参数文件的位置。
Expdp命令可以调用Parfile文件,在Parfile里可以写备份脚本,可以使用Query选项。
1. 如expdp.txt 内容如下:
USERID=orcldev/oracle directory=dackup_path dumpfile=orcldev_parfile.dmp logfile=orcldev_parfile.log TABLES='TAB_TEST' QUERY="WHERE TRAN_DATE=TO_DATE('','YYYY-MM-DD')"
执行方法:expdp parfile=expdp.txt 即可执行备份
使用parfile好处是使用query选项是不用使用转义字符,如果将query参数放到外边的话,需要将""进行转义。
2. UNIX写法:
expdp orcldev/oracle directory=backup_path dumpfile=2013.dmp logfile =2013.log schemas=orcldev INCLUDE=TABLE:\"IN \(\'TEST_A\',\'TEST_B\'\)\"& --在Unix系统执行是需要将单引号进行转义操作,否则会报错。
3. WINDOWS写法:
expdp orcldev/oracle directory=backup_path dumpfile=2013.dmp logfile =2013.log schemas=orcldev INCLUDE=TABLE:"IN \('TEST_A','TEST_B')"
案例: 通过在Par文件定义多张表汇总,导出和导入Dump文件
Step1. 创建Expdp的par文件gavin_dump_par_.par
DIRECTORY=GAVIN_EXP_TMP
DUMPFILE=gavin_dumpfile_.dmp
LOGFILE=gavin_dumpfile_exp_.log
TABLES=AP.AP_INVOICES_ALL,
AP.AP_INVOICE_LINES_ALL,
AP.AP_INVOICE_PAYMENTS_ALL
Step2. 在源端数据库导入数据为dump文件
expdp / PARFILE=gavin_dump_par_.par FLASHBACK_SCN=$(print "set pagesize 0 numwidth 30\nselect sys.dbms_flashback.get_system_change_number from"|sqlplus -s
Step3. 在目标数据库导入dump文件
imp / DIRECTORY=GAVIN_IMP_TMP dumpfile=gavin_dumpfile_.dmp logfile=gavin_dumpfile_imp_.dmp.log
Step4. 查看日志和数据库表确认数据是否已经导入成功
较为复杂的初传输定义,需要定义文件的大小,并行度,并通过ksh调用nohup多批量处理
//创建目录
CREATE OR REPLACE DIRECTORY DUMPFILE AS &/u01/data/dump/exp/scripts&;
//执行参数
vi GAVIN_DATA_PARAMETER.par
DIRECTORY=dumpfile
DUMPFILE=GAVIN_DATA_SEQNO_0%U.dump,GAVIN_DATA_SEQNO_1%U.dmp
CONTEXT=ALL
FILESIZE=2G
PARALLEL=4
EXCLUDE=TRIGGER, FUNCTION, PACKAGE, PROCEDURE, SEQUNCEN, VIEW
LOGFILE=GAVIN_DATA_EXPDP.log
TABLES=AP.AP_INVOICES_ALL,
AP.AP_LINES_ALL
//并行执行
vi GAVIN_DATA_EXECUATE.ksh
export basedir=/u01/data/dump/imp/scripts
nohup expdp \'/ as sysdba\' PARFILE=$basedir/GAVIN_DATA_PARAMETER.par&/dev/null 2&&1 &
Thanks and Regards
阅读(...) 评论()expdp,impdp,include,exclude
时间: 15:15:14
&&&& 阅读:96
&&&& 评论:
&&&& 收藏:0
标签:&&&&&&&&&&&&&&&&&&&&&&&&&&&
The examples below are based on:- the demo schema SCOTT that is created with script: $ORACLE_HOME/rdbms/admin/scott.sql- the directory object my_dir that refers to an existing directory on the server where the Oracle RDBMS is installed. Example:Windows:CONNECT system/managerCREATE OR REPLACE DIRECTORY my_dir AS ‘D:\export‘;GRANT read,write ON DIRECTORY my_dir TOUnix:CONNECT system/managerCREATE OR REPLACE DIRECTORY my_dir AS ‘/home/users/export‘;GRANT read,write ON DIRECTORY my_dir TONote
that when creating an export DataPump dumpfile, you have to ensure that
the filename does not already exist in that directory.The following examples show how metadata can be filtered with the EXCLUDE and INCLUDE parameters.1. Syntax of the INCLUDE and EXCLUDE DataPump parameters.With
Metadata filters you can specify a set of objects to be included or
excluded from an Export or Import operation, such as tables, indexes,
grants, procedures.EXCLUDE = object_type[:name_clause] [, ...]INCLUDE = object_type[:name_clause] [, ...]Examples:expdp &other_parameters& SCHEMAS=scott EXCLUDE=SEQUENCE, TABLE:"IN (‘EMP‘, ‘DEPT‘)"impdp &other_parameters& SCHEMAS=scott INCLUDE=FUNCTION, PACKAGE, PROCEDURE, TABLE:"= ‘EMP‘"The
name_clause (specified after the colon separator) is optional. It
allows a selection of specific objects within an object type. The
EXCLUDE example above will export the complete SCOTT schema, except (1)
the sequences owned by SCOTT and (2) the tables EMP and DEPT (with their
dependent objects).The INCLUDE example above will only import the
functions, procedures, and packages that are owned by SCOTT, and will
also import the table EMP (with its dependent objects).A
different kind of filtering is Data filtering. Data filtering is
implemented through the QUERY and SAMPLE parameters, which specify
restrictions on the table rows that are to be exported. For details, see
"Export/Import DataPump Parameter QUERY - How to Specify a Query"2. SQL Operator usage.The
name_clause is a SQL expression that is used as a filter on the object
names of the object. It consists of a SQL operator and the values
against which the object names of the specified type are to be compared.
If no name_clause is provided, all objects of the specified type are
excluded/included. The name clause must be separated from the object
type with a colon. Examples of operator-usage:EXCLUDE=SEQUENCEor:EXCLUDE=TABLE:"IN (‘EMP‘, ‘DEPT‘)"or:EXCLUDE=INDEX:"= ‘MY_INDX‘"or:INCLUDE=PROCEDURE:"LIKE ‘MY_PROC_%‘"or:INCLUDE=TABLE:"& ‘E‘"3. Double quotes and single quotes usage.The
name clause is separated from the object type with a colon. The name
clause must be enclosed in double quotation marks. The single-quotation
marks are required to delimit the name strings. Using the INCLUDE or
EXCLUDE parameter in a parameter file is the preferred method.Parameter file: exp.par-----------------------DIRECTORY = my_dirDUMPFILE&&= exp_tab.dmpLOGFILE& &= exp_tab.logSCHEMAS& &= scottINCLUDE& &= TABLE:"IN (‘EMP‘, ‘DEPT‘)"expdp system/manager parfile=exp.parTo
run this job without a parameter file, you need to escape the special
characters. Incorrect escaping can result in errors such as: ksh: syntax
error: ‘(‘ unexpected.Command line examples (for Windows: type parameters on one single line) :Windows:D:\& expdp system/manager DIRECTORY=my_dir DUMPFILE=exp_tab.dmp LOGFILE=exp_tab.log SCHEMAS=scott INCLUDE=TABLE:\"IN (‘EMP‘, ‘DEP‘)\"Unix:% expdp system/manager DIRECTORY=my_dir DUMPFILE=exp_tab.dmp LOGFILE=exp_tab.log \SCHEMAS=scott INCLUDE=TABLE:\"IN \(\‘EMP\‘, \‘DEP\‘\)\"4. Pay special attention when the same filter name for an object type is used more than once.If
multiple filters are specified for an object type, an implicit AND
operation is applied to them. That is, the objects that are exported or
imported during the job have passed all of the filters applied to their
object types.Incorrect syntax (no error: ORA-31655):INCLUDE=TABLE:"= ‘EMP‘" INCLUDE=TABLE:"= ‘DEPT‘"Correct syntax:INCLUDE=TABLE:"IN (‘EMP‘, ‘DEPT‘)"or (all tables that have an ‘E‘ and a ‘P‘ in their name):INCLUDE=TABLE:"LIKE ‘%E%‘"INCLUDE=TABLE:"LIKE ‘%P%‘"5. The EXCLUDE and INCLUDE parameters are mutually exclusive.It is not possible to specify both the INCLUDE parameter and the EXCLUDE parameter in the same job.Incorrect syntax (error: UDE-00011):INCLUDE=TABLE:"IN (‘EMP‘, ‘DEPT‘)"EXCLUDE=INDEX:"= ‘PK_EMP‘"Correct syntax:INCLUDE=TABLE:"IN (‘EMP‘, ‘DEPT‘)"6. The object types that can be specified, depend on the export/import DataPump mode.During
a TABLE level export/import, certain object types that are directly
related to SCHEMA or DATABASE level jobs, cannot be specified. The same
applies to a SCHEMA level export/import where no DATABASE level object
types can be specified.Example (incorrect spelling of object type USERS (should be: USER); error: ORA-39041):DIRECTORY = my_dirDUMPFILE&&= exp_tab.dmpLOGFILE& &= exp_tab.logTABLES& & = scott.empINCLUDE& &= USERS:"= ‘SCOTT‘", TABLESPACE_QUOTA, SYSTEM_GRANT, ROLE_GRANT, DEFAULT_ROLEExample (incorrect usage of object types in INCLUDE parameter for a TABLE error: ORA-39038):DIRECTORY = my_dirDUMPFILE&&= exp_tab.dmpLOGFILE& &= exp_tab.logTABLES& & = scott.empINCLUDE& &= USER:"= ‘SCOTT‘", TABLESPACE_QUOTA, SYSTEM_GRANT, ROLE_GRANT, DEFAULT_ROLECorrected parameters (run job in schema mode):DIRECTORY = my_dirDUMPFILE&&= exp_tab.dmpLOGFILE& &= exp_tab.logSCHEMAS& &= scottINCLUDE& &= USER:"= ‘SCOTT‘", TABLESPACE_QUOTA, SYSTEM_GRANT, ROLE_GRANT, DEFAULT_ROLEINCLUDE& &= TABLE:"= ‘EMP‘"To determine the name of the object types can be specified with EXCLUDE and INCLUDE, you can run the following query:SET lines 200 pages 20000COL object_path FOR a60COL comments FOR a110-- for database level export/import:SELECT named, object_path, comments&&FROM database_export_objectsWHERE object_path NOT LIKE ‘%/%‘;-- for table schema export/import:SELECT named, object_path, comments&&FROM schema_export_objectsWHERE object_path NOT LIKE ‘%/%‘;-- for table level export/import:SELECT named, object_path, comments&&FROM table_export_objectsWHERE object_path NOT LIKE ‘%/%‘;7. Only specific object types can be named with a Name clause.The
name clause applies only to object types whose instances have names
(for example, it is applicable to TABLE, but not to GRANT).To determine which object types can be named, you can run the following query:SET lines 150 PAGES 20000COL object_path FOR a30COL comments FOR a110-- for database level export/import:SELECT named, object_path, comments&&FROM database_export_objectsWHERE named=‘Y‘;-- for table schema export/import:SELECT named, object_path, comments&&FROM schema_export_objectsWHERE named=‘Y‘;-- for table level export/import:SELECT named, object_path, comments&&FROM table_export_objectsWHERE named=‘Y‘;N OBJECT_PATH& && && && && && &&&COMMENTS- ------------------------------ -----------------------------------------------Y CONSTRAINT& && && && && && && &Constraints (including referential constraints)Y INDEX& && && && && && && && &&&IndexesY PROCDEPOBJ& && && && && && && &Instance procedural objectsY REF_CONSTRAINT& && && && && &&&Referential constraintsY TRIGGER& && && && && && && && &Triggers on the selected tablesNote
that the object type TABLE is not listed here because this is the query
output of the TABLE_EXPORT_OBJECTS view: the tables are already
specified with the TABLES parameter in the DataPump job.Import DataPump example:DIRECTORY = my_dirDUMPFILE&&= exp_tab.dmpLOGFILE& &= exp_tab.logTABLES& & = scott.empEXCLUDE& &= TRIGGER:"IN (‘TRIG1‘, ‘TRIG2‘)", INDEX:"= ‘INDX1‘", REF_CONSTRAINT8. Excluding/Including an object, will also exclude/include it‘s dependent objects.Dependent
objects of an identified object are processed along with the identified
object. For example, if a filter specifies that an index is to be
included in an operation, then statistics from that index will also be
included. Likewise, if a table is excluded by a filter, then indexes,
constraints, grants, and triggers upon the table will also be excluded
by the filter.To determine which objects are dependent, e.g. for a TABLE, you can run the following query (in Oracle10g Release 2 and higher):SET lines 200 pages 20000COL object_path FOR a60COL comments FOR a110-- for TABLE dependent object types (10.2.0.x only):SELECT named, object_path, comments&&FROM database_export_objectsWHERE object_path LIKE ‘TABLE/%‘;N OBJECT_PATH& && && && && && && && && && && &COMMENTS- ------------------------------------------- ------------------------------------------------&&TABLE/AUDIT_OBJ& && && && && && && && && &&&Object audits on the selected tables&&TABLE/COMMENT& && && && && && && && && && & Table and column comments on the selected tables&&TABLE/CONSTRAINT& && && && && && && && && & Constraints (including referential constraints)&&TABLE/CONSTRAINT/REF_CONSTRAINT& && && && & Referential constraints&&TABLE/FGA_POLICY& && && && && && && && && & Fine-grained auditing policies&&TABLE/GRANT& && && && && && && && && && && &Object grants on the selected tables&&TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT& && &&&Object grants on the selected tables&&TABLE/INDEX& && && && && && && && && && && &Indexes&&TABLE/INDEX/STATISTICS& && && && && && && & Precomputed statistics&&TABLE/INSTANCE_CALLOUT& && && && && && && & Instance callouts&&TABLE/MATERIALIZED_VIEW_LOG& && && && && &&&Materialized view logs&&TABLE/POST_INSTANCE/GRANT/PROCDEPOBJ_GRANT&&Grants on instance procedural objects&&TABLE/POST_INSTANCE/PROCDEPOBJ& && && && &&&Instance procedural objects&&TABLE/POST_INSTANCE/PROCDEPOBJ_AUDIT& && &&&Audits on instance procedural objects&&TABLE/POST_TABLE_ACTION& && && && && && && &Post-table actions&&TABLE/PRE_TABLE_ACTION& && && && && && && & Pre-table actions&&TABLE/PROCACT_INSTANCE& && && && && && && & Instance procedural actions&&TABLE/RLS_CONTEXT& && && && && && && && && &Fine-grained access control contexts&&TABLE/RLS_GROUP& && && && && && && && && &&&Fine-grained access control policy groups&&TABLE/RLS_POLICY& && && && && && && && && & Fine-grained access control policies&&TABLE/TRIGGER& && && && && && && && && && & Triggers9. Excluding objects during an Export or Import DataPump job.When
specifying the EXCLUDE parameter for en Export DataPump or Import
DataPump job, all object types for the given mode of export/import (like
schema mode) will be included, except those specified in an EXCLUDE
statement. If an object is excluded, all of its dependent objects are
also excluded. For example, excluding a table will also exclude all
indexes and triggers on the table.9.1. Excluding Constraints.The following constraints cannot be excluded:- NOT NULL constraints.-
Constraints needed for the table to be created and loaded successfully
(for example, primary key constraints for index-organized tables or REF
SCOPE and WITH ROWID constraints for tables with REF columns).This means that the following EXCLUDE statements will be interpreted as follows:-
EXCLUDE=CONSTRAINT will exclude all nonreferential constraints, except
for NOT NULL constraints and any constraints needed for successful table
creation and loading.- EXCLUDE=REF_CONSTRAINT will exclude referential integrity (foreign key) constraints.9.2. Excluding Grants.Specifying EXCLUDE=GRANT excludes object grants on all object types and system privilege grants.9.3. Excluding Users.Specifying
EXCLUDE=USER excludes only the definitions of users, not the objects
contained within users‘ schemas. To exclude a specific user and all
objects of that user, specify a filter such as the following (where
SCOTT is the schema name of the user you want to exclude):EXCLUDE=SCHEMA:"= ‘SCOTT‘"If
you try to exclude a user by using a statement such as EXCLUDE=USER:"=
‘SCOTT‘", only the CREATE USER scott DDL statement will be excluded, and
you may not get the results you expect.10. Including objects during an Export or Import DataPump job.When
specifying the INCLUDE parameter for en Export DataPump or Import
DataPump job, only object types explicitly specified in INCLUDE
statements (and their dependent objects) are exported/imported. No other
object types, such as the schema definition information that is
normally part of a schema-mode export when you have the
EXP_FULL_DATABASE role, are exported/imported.
上一篇: 下一篇:
标签:&&&&&&&&&&&&&&&&&&&&&&&&&&&原文:/seasonzone/p/7098364.html
教程昨日排行
&&国之画&&&& &&&&&&
&& &&&&&&&&&&&&&&
鲁ICP备号-4
打开技术之扣,分享程序人生!2013年4月 Oracle大版内专家分月排行榜第二2013年3月 Oracle大版内专家分月排行榜第二2010年5月 Oracle大版内专家分月排行榜第二
2013年1月 Oracle大版内专家分月排行榜第三2011年12月 Oracle大版内专家分月排行榜第三2010年8月 Oracle大版内专家分月排行榜第三2010年4月 Oracle大版内专家分月排行榜第三2010年3月 Oracle大版内专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。博客访问: 174983
博文数量: 60
注册时间:
科技改变生活
ITPUB论坛APP
ITPUB论坛APP
APP发帖 享双倍积分
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: Oracle
exclude和include参数能够在使用expdp或impdp是对特定的对象或对象类型进行筛选或过滤。比如因工作的需要导出特定的表或不导出特定
的表、视图以及存储过程、索引、约束、授权统计信息等等。下面将给出expdp或impdp使用exclude和include参数的方法和示例。
一、exclude/include参数用法:
&&& EXCLUDE=[object_type]:[name_clause],[object_type]:[name_clause]&&-->排出特定对象
&& &INCLUDE=[object_type]:[name_clause],[object_type]:[name_clause]&&-->包含特定对象
&& &object_type子句用于指定对象的类型,如table,sequence,view,procedure,package等等
&& &name_clause子句可以为SQL表达式用于过滤特定的对象名字。它由SQL操作符以及对象名(可使用通配符)来过滤指定对象类型中的特定对象。
&& &当未指定name_clause而仅仅指定object_type则所有该类型的对象都将被过滤或筛选。多个[object_type]:[name_clause]中间以逗号分割。
&& &示例:
&&&&& &expdp
SCHEMAS=scott EXCLUDE=SEQUENCE,TABLE:"IN ('EMP','DEPT')"
&&&& &&impdp
SCHEMAS=scott INCLUDE=PACKAGE,FUNCTION,PROCEDURE,TABLE:"='EMP'"
二、常用的过滤SQL表达式
&&& EXCLUDE=SEQUENCE,VIEW&&&&&&&&&&&&&&&&&&&&&&&&&&--过滤所有的SEQUENCE,VIEW
&& &EXCLUDE=TABLE:"IN ('EMP','DEPT')"&&&&&&&&&&&&&&&--过滤表对象EMP,DEPT
&&& EXCLUDE=SEQUENCE,VIEW,TABLE:"IN ('EMP','DEPT')"&--过滤所有的SEQUENCE,VIEW以及表对象EMP,DEPT
&& &EXCLUDE=INDEX:"= 'INDX_NAME'"&&&&&&&&&&&&&&&&&&&--过滤指定的索引对象INDX_NAME
&&& INCLUDE=PROCEDURE:"LIKE 'PROC_U%'"&&&&&&&&&&&&&&--包含以PROC_U开头的所有存储过程(_ 符号代表任意单个字符)
&&& INCLUDE=TABLE:"> 'E' "&&&&&&&&&&&&&&&&&&&&&&&&&&--包含大于字符E的所有表对象
&&& 其它常用操作符 NOT IN, NOT LIKE, <, != 等等
& &&直接将过滤操作符封装到参数文件中,如下面的例子
& &&Parameter file:exp_scott.par
&& &DIRECTORY = dump_scott
&& &DUMPFILE = exp_scott_%U.dmp
&& &LOGFILE = exp_scott.log
&&& SCHEMAS = scott
&&& PARALLEL= 2
&&& EXCLUDE = TABLE:"IN ('EMP', 'DEPT')"&
&&& expdp system/manager parfile=exp.par&
==>Author: Robinson Cheng&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
==>Blog:& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
==>MSN:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
==>QQ:&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
三、命令行下转义符的处理
Windows平台:
&&& D:\> expdp system/manager DIRECTORY=my_dir DUMPFILE=exp_tab.dmp LOGFILE=exp_tab.log SCHEMAS=scott
&&& &INCLUDE=TABLE:\"IN ('EMP', 'DEPT')\"
&& &在Windows平台下,需要对象双引号进行转义,使用转义符\
& &&在未使用parfile文件的情形下,所有的符号都需要进行转义,包括括号,双引号,单引号等
&&& % expdp system/manager DIRECTORY=my_dir DUMPFILE=exp_tab.dmp LOGFILE=exp_tab.log SCHEMAS=scott
&&& &INCLUDE=TABLE:\"IN \(\'EMP\', \'DEP\'\)\"
四、exclude/include常见的错误
&&任意需要转义的字符如果未转义或转义错误,都会产生ORA错误。下面给出几种常见的ORA错误。
&&&& ORA-39001: invalid argument value
&&&& ORA-39071: Value for INCLUDE is badly formed.
&&&& ORA-00936: missing expression
&&&& ORA-39001: invalid argument value
&&& &ORA-39071: Value for EXCLUDE is badly formed.
&&&& ORA-00904: “DEPT”: invalid identifier
&&&& ORA-39001: invalid argument value
&&&& ORA-39041: Filter “INCLUDE” either identifies all object types or no object types.
&&&& ORA-39001: invalid argument value
&&&& ORA-39041: Filter “EXCLUDE” either identifies all object types or no object types
&&& &ORA-39001: invalid argument value
&&&& ORA-39038: Object path “USER” is not supported for TABLE jobs.
五、导出示例
&&-->导出不包含sequence,表EMP,DEPT的其它所有对象
&&& [oracle@orasrv scott]$ expdp scott/tiger directory=dump_scott dumpfile=fliter_1.dmp log=fliter_1.log schemas=scott \
&& &> exclude=sequence,table:\" in \(\'EMP\',\'DEPT\'\)\"
&&-->包含大于字符T的所有表对象
&&& [oracle@orasrv ~]$ expdp scott/tiger directory=dump_scott dumpfile=tmp.dmp logfile=tmp.log include=table:\"\>\'T\'\"
&& &...........
&&& Estimate in progress using BLOCKS method...
&&& Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
&&& Total estimation using BLOCKS method: 18.06 MB
&& &Processing object type SCHEMA_EXPORT/TABLE/TABLE
& &&Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
&& &. . exported "SCOTT"."TB_PARL"&&&&&&&&&&&&&&&&&&&&&&&&&& 7.020 MB&& 72598 rows
&&& . . exported "SCOTT"."TT"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 7.009 MB&& 72493 rows
&&& . . exported "SCOTT"."XP":"P2"&&&&&&&&&&&&&&&&&&&&&&&&&& 5.398 KB&&&&&& 1 rows
&&& Master table "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
&&& ******************************************************************************
&& &Dump file set for SCOTT.SYS_EXPORT_SCHEMA_01 is:
&&& & /home/oracle/dump/scott/tmp.dmp
&& &Job "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully completed at 14:24:55
-->仅仅导入表对象TT,如果存在则将其替换
& &&[oracle@orasrv scott]$ impdp scott/tiger directory=dump_scott dumpfile=tmp.dmp logfile=tmp_imp.log \
&&& > include=table:\" =\'TT\' \" table_exists_action=replace
& &&.............
&&& Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
&& &With the Partitioning, OLAP, Data Mining and Real Application Testing options
&& &Master table "SCOTT"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
&&& Starting "SCOTT"."SYS_IMPORT_FULL_01":& scott/******** directory=dump_scott dumpfile=tmp.dmp logfile=tmp_imp.log
&&& include=table:" ='TT' " table_exists_action=replace&
&& &Processing object type SCHEMA_EXPORT/TABLE/TABLE
&& &Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
&& &. . imported "SCOTT"."TT"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 7.009 MB&& 72493 rows
&& &Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
&& &Job "SCOTT"."SYS_IMPORT_FULL_01" successfully completed at 14:59:32
-->下面是一个实际实际导出过程中的parfile参数,exclude参数用于排出所有包含BAK的表对象,以及一些索引对象,使用了in,like运算符
& &&userid=goex_admin
&&& directory=DB_DUMP_DIR
& &&dumpfile=sybo2_full_%U.dmp
&& &logfile=sybo2_full.log
&& &exclude=table:"like '%BAK%'",index:" in ('PK_ACC_POS_CASH_PL_TBL_ARC_11','pk_acc_pos_cash_tbl_arc_11',
& &&&'PK_ACC_POS_STOCK_ARCH_TBL_11','I_ACC_POS_STOCK_TBL_ARC_DT','I_ACC_POS_CASH_PL_ARCH_TBL_DT') ",
&& &&table:"in ('ACC_POS_STOCK_TBL_ARC')"
&& &filesize=
&& &schemas=goex_admin
&-->下面是一个使用query查询过滤的情形
&&-->该操作导出的schema为scott,表对象emp中deptno=20,以及dept表中deptno=20的记录被导出,这两个表中的其余记录被过滤
&&-->该操作除上述过滤以后的所有对象将被一一导出
&&expdp scott/tiger dumpfile=scott_filter.dmp logfile=scott_filter.log directory=DB_DUMP_DIR schemas=scott \
&&> query=scott.emp:'"where deptno=20"',scott.dept:'"where deptno=20"'
阅读(2675) | 评论(0) | 转发(1) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。}

我要回帖

更多关于 table comment expdp 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信