csdn网友提出关于expdp exclude及impdp问题解答
1, csdn网友的问题:
- 数据库版本
- expdp官方说明
[ora10g@seconary ~]$ expdp -help
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 2:42:15
Copyright (c) 2003, 2007, Oracle. All rights reserved.
The Data Pump export utility provides a mechanism for transferring data objects
between Oracle databases. The utility is invoked with the following command:
Example: expdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp
You can control how Export runs by entering the 'expdp' command followed
by various parameters. To specify parameters, you use keywords:
Format: expdp KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
Example: expdp scott/tiger DUMPFILE=scott.dmp DIRECTORY=dmpdir SCHEMAS=scott
or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
USERID must be the first parameter on the command line.
Keyword Description (Default)
------------------------------------------------------------------------------
ATTACH Attach to existing job, e.g. ATTACH [=job name].
COMPRESSION Reduce size of dumpfile contents where valid
keyword values are: (METADATA_ONLY) and NONE.
CONTENT Specifies data to unload where the valid keywords are:
(ALL), DATA_ONLY, and METADATA_ONLY.
DIRECTORY Directory object to be used for dumpfiles and logfiles.
DUMPFILE List of destination dump files (expdat.dmp),
e.g. DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp.
ENCRYPTION_PASSWORD Password key for creating encrypted column data.
ESTIMATE Calculate job estimates where the valid keywords are:
(BLOCKS) and STATISTICS.
ESTIMATE_ONLY Calculate job estimates without performing the export.
EXCLUDE Exclude specific object types, e.g. EXCLUDE=TABLE:EMP.
FILESIZE Specify the size of each dumpfile in units of bytes.
FLASHBACK_SCN SCN used to set session snapshot back to.
FLASHBACK_TIME Time used to get the SCN closest to the specified time.
FULL Export entire database (N).
HELP Display Help messages (N).
INCLUDE Include specific object types, e.g. INCLUDE=TABLE_DATA.
JOB_NAME Name of export job to create.
LOGFILE Log file name (export.log).
NETWORK_LINK Name of remote database link to the source system.
NOLOGFILE Do not write logfile (N).
PARALLEL Change the number of active workers for current job.
PARFILE Specify parameter file.
QUERY Predicate clause used to export a subset of a table.
SAMPLE Percentage of data to be exported;
SCHEMAS List of schemas to export (login schema).
STATUS Frequency (secs) job status is to be monitored where
the default (0) will show new status when available.
TABLES Identifies a list of tables to export - one schema only.
TABLESPACES Identifies a list of tablespaces to export.
TRANSPORT_FULL_CHECK Verify storage segments of all tables (N).
TRANSPORT_TABLESPACES List of tablespaces from which metadata will be unloaded.
VERSION Version of objects to export where valid keywords are:
(COMPATIBLE), LATEST, or any valid database version.
The following commands are valid while in interactive mode.
Note: abbreviations are allowed
Command Description
------------------------------------------------------------------------------
ADD_FILE Add dumpfile to dumpfile set.
CONTINUE_CLIENT Return to logging mode. Job will be re-started if idle.
EXIT_CLIENT Quit client session and leave job running.
FILESIZE Default filesize (bytes) for subsequent ADD_FILE commands.
HELP Summarize interactive commands.
KILL_JOB Detach and delete job.
PARALLEL Change the number of active workers for current job.
PARALLEL=.
START_JOB Start/resume current job.
STATUS Frequency (secs) job status is to be monitored where
the default (0) will show new status when available.
STATUS[=interval]
STOP_JOB Orderly shutdown of job execution and exits the client.
STOP_JOB=IMMEDIATE performs an immediate shutdown of the
Data Pump job.
|
EXCLUDEDefault: none Purpose Enablesyou to filter the metadata that is exported by specifying objects and object types that you want excludedfrom the export operation. Syntax and Description EXCLUDE=object_type[:name_clause] [, ...] All object types for the given mode of export 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. The name_clause is optional. It allows selection of specific objects within an object type. It is a SQL expression used as a filter on the type's object names. It consists of a SQL operator and the values against which the object names of the specified type are to be compared. The name clause applies only to object types whose instances have names (for example, it is applicable to TABLE, but not to GRANT). The name clause must be separated from the object type with a colon and enclosed in double quotation marks, because single-quotation marks are required to delimit the name strings. For example, you could set EXCLUDE=INDEX:"LIKE 'EMP%'"to exclude all indexes whose names start with emp. If no name_clause is provided, all objects of the specified type are excluded. More than one EXCLUDE statement can be specified. Oracle recommends that you place EXCLUDE clauses in a parameter file to avoid having to use escape characters on the command line. |
小结:
- 查看数据库目录
SQL> col directory_name for a30
- 用户tbs_11204的表
- 导出用户tbs_11204的数据,但不导出其中的表t_sex
- 授权给导出用户
- 导出仍旧报错
- 为导出用户创建目录
- 报错依旧
- 移除exclude选项expdp成功,说明exclude里面内容编写有误
- 加上选项exclude,仍旧报错
- 修正exclude,只指定对象类型expdp成功
- 编写一个命令选项参数文件,其内容为:排除单表t_sex
- 排除多个表
- 排除不同的对象类型
[ora10g@seconary ~]$ impdp -help
Import: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 3:53:57
Copyright (c) 2003, 2007, Oracle. All rights reserved.
The Data Pump Import utility provides a mechanism for transferring data objects
between Oracle databases. The utility is invoked with the following command:
Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp
You can control how Import runs by entering the 'impdp' command followed
by various parameters. To specify parameters, you use keywords:
Format: impdp KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp
USERID must be the first parameter on the command line.
Keyword Description (Default)
------------------------------------------------------------------------------
ATTACH Attach to existing job, e.g. ATTACH [=job name].
CONTENT Specifies data to load where the valid keywords are:
(ALL), DATA_ONLY, and METADATA_ONLY.
DIRECTORY Directory object to be used for dump, log, and sql files.
DUMPFILE List of dumpfiles to import from (expdat.dmp),
e.g. DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp.
ENCRYPTION_PASSWORD Password key for accessing encrypted column data.
This parameter is not valid for network import jobs.
ESTIMATE Calculate job estimates where the valid keywords are:
(BLOCKS) and STATISTICS.
EXCLUDE Exclude specific object types, e.g. EXCLUDE=TABLE:EMP.
FLASHBACK_SCN SCN used to set session snapshot back to.
FLASHBACK_TIME Time used to get the SCN closest to the specified time.
FULL Import everything from source (Y).
HELP Display help messages (N).
INCLUDE Include specific object types, e.g. INCLUDE=TABLE_DATA.
JOB_NAME Name of import job to create.
LOGFILE Log file name (import.log).
NETWORK_LINK Name of remote database link to the source system.
NOLOGFILE Do not write logfile.
PARALLEL Change the number of active workers for current job.
PARFILE Specify parameter file.
QUERY Predicate clause used to import a subset of a table.
REMAP_DATAFILE Redefine datafile references in all DDL statements.
REMAP_SCHEMA Objects from one schema are loaded into another schema.
REMAP_TABLESPACE Tablespace object are remapped to another tablespace.
REUSE_DATAFILES Tablespace will be initialized if it already exists (N).
SCHEMAS List of schemas to import.
SKIP_UNUSABLE_INDEXES Skip indexes that were set to the Index Unusable state.
SQLFILE Write all the SQL DDL to a specified file.
STATUS Frequency (secs) job status is to be monitored where
the default (0) will show new status when available.
STREAMS_CONFIGURATION Enable the loading of Streams metadata
TABLE_EXISTS_ACTION Action to take if imported object already exists.
Valid keywords: (SKIP), APPEND, REPLACE and TRUNCATE.
TABLES Identifies a list of tables to import.
TABLESPACES Identifies a list of tablespaces to import.
TRANSFORM Metadata transform to apply to applicable objects.
Valid transform keywords: SEGMENT_ATTRIBUTES, STORAGE
OID, and PCTSPACE.
TRANSPORT_DATAFILES List of datafiles to be imported by transportable mode.
TRANSPORT_FULL_CHECK Verify storage segments of all tables (N).
TRANSPORT_TABLESPACES List of tablespaces from which metadata will be loaded.
Only valid in NETWORK_LINK mode import operations.
VERSION Version of objects to export where valid keywords are:
(COMPATIBLE), LATEST, or any valid database version.
Only valid for NETWORK_LINK and SQLFILE.
The following commands are valid while in interactive mode.
Note: abbreviations are allowed
Command Description (Default)
------------------------------------------------------------------------------
CONTINUE_CLIENT Return to logging mode. Job will be re-started if idle.
EXIT_CLIENT Quit client session and leave job running.
HELP Summarize interactive commands.
KILL_JOB Detach and delete job.
PARALLEL Change the number of active workers for current job.
PARALLEL=.
START_JOB Start/resume current job.
START_JOB=SKIP_CURRENT will start the job after skipping
any action which was in progress when job was stopped.
STATUS Frequency (secs) job status is to be monitored where
the default (0) will show new status when available.
STATUS[=interval]
STOP_JOB Orderly shutdown of job execution and exits the client.
STOP_JOB=IMMEDIATE performs an immediate shutdown of the
Data Pump job.
[ora10g@seconary ~]$
|
- 验证导入数据是否成功
- 添加full=y选项的导入
注意标红部分,导入会智能判断,略去已经存在的的对象
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-1252027/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-1252027/
csdn网友提出关于expdp exclude及impdp问题解答相关推荐
- exp/expdp 与 imp/impdp命令导入导出数据库详解
exp/expdp 与 imp/impdp命令导入导出数据库详解 一.exp命令导出数据库 如何使exp的帮助以不同的字符集显示:set nls_lang=simplified chinese_chi ...
- oracle使用impdp导入方法,oracle expdp导出和impdp导入使用方法
本篇介绍一下oracle expdp导出.impdp导入的使用方法 准备工做 oracle中的expdp导出.impdp导入的使用以前,都得先完成如下三个步骤linux 第一步 以管理员身份,建立逻辑 ...
- 转帖 CSDN网友挑选的2007年最有价值文章-2010南非世界杯Vuvuzela
技术知识更新很快,而好的互联网内容散布各地,程序员如何快速整理.方便检索是一大需求,CSDN网摘服 务正是迎合这样的需求推出的服务,一年多来,得到很多网友的喜爱.同时,网友的参与和分享机制,让更多好的 ...
- 天猫双11数据过于完美?网友提出质疑,官方已回应
点击上方"民工哥技术之路"选择"星标" 每天10点为你分享不一样的干货 来源:硅谷分析狮 企鹅号/腾讯科技,文章中的观点仅代表原作者之观点,与本号立场无关. 1 ...
- 从一个用户expdp导出再impdp导入到另一个用户
如果想导入的用户已经存在: 1. 导出用户 expdp user1/pass1 directory=dumpdir dumpfile=user1.dmp 2. 导入用户 impdp user2/pas ...
- Oracle使用数据泵expdp导出和impdp导入
用数据泵导出首先要创建逻辑目录,然后给用户读取和写入这个目录的权限 注意:数据泵只能在Oracle服务端操作,客户端无法操作 一.expdp导出 1.创建逻辑目录: create directory ...
- 详细回复某个CSDN网友,对我的文章和技术实力以及CSDN的吐槽
貌似被大学生鄙视了,我也是醉了,现在的大学生水平和信心,都这么高了~ 看来,我得加把劲了~ o(︶︿︶)o 电子商务系列文章,是我闲来无事,分享自己的一些业余实践经验的文章.其中关于数据库设计的这一篇 ...
- 备份数据库的expdp语句_【ORACLE语句备份】数据库表同步 ——定时任务管理器(EXPDP导出,IMPDP导入)...
1.C:\Users\Administrator>sqlplus sys/xxx@xxx as sysdba; 2.SQL> create directory dbbak4 as 'e:\ ...
- oracle数据泵导入 锁,Oracle数据泵expdp导出,impdp导入
准备: 1)创建逻辑目录,该命令不会在操作系统创建真正的目录,最好以system等管理员创建. create directory dpdata as '/opt'; 2)查看管理理员目录(同时查看操作 ...
- 基于瞳孔检测,湖北中学推出人脸支付!网友提出安全投诉,学校:符合法规,无风险...
来源:大数据文摘 本文约2500字,建议阅读6分钟 本文介绍了湖北中学使用瞳孔检测的情况. 试想,当你在学校准备去吃饭,来到食堂,刷一下脸,确认信息,选择爱吃的菜品,点击确认,完成结账. 整个过程可以 ...
最新文章
- 视学算法第五轮送书活动获奖名单
- 【解决线程安全问题:通过Lock锁对象】
- PHP数组的交集array_intersect(),array_intersect_assoc(),array_inter_key()函数的小问题
- FreeRtos 那点事
- 这个瑞士的项目没法在今年三月申请,因为我需要护照并且这个项目在人文社科学员下面,886
- 【转】Linux 静态库与共享库的使用
- 线程的属性 —— 分离的状态(detached state)、栈地址(stack address)、栈大小(stack size)
- 简单比对照片是否相同_小新说法 | 如何认定商标是否侵权?
- Python学习笔记----基础篇10----模块2
- raid-6磁盘阵列损坏导致数据丢失的恢复过程(图文教程)
- 手写及场景文字分析与识别的一些新尝试
- pycharm2020版本界面中英文注释
- Python Cookbook by Eric
- 阶段1 语言基础+高级_1-3-Java语言高级_09-基础加强_第3节 注解_18_注解_案例_简单的测试框架...
- Asprise OCR v4.0 64位破解...仅供学习使用
- mac虚拟机服务器设置u盘启动不了怎么办,苹果MacBook Air u盘启动不了怎么办?
- 思科本周发布一季财报:利润或继续下滑
- IDEA连接MySQL数据库时 schemas不显示数据
- 3DoF+ Video简介
- Linux:rsyslog 日志丢失 messages lost due to rate-limiting