个人简介:
8年oracle从业经验,具备丰富的oracle技能,目前在国内北京某专业oracle服务公司从事高级技术顾问。
服务过的客户:
中国电信
中国移动
中国联通
中国电通
国家电网
四川达州商业银行
湖南老百姓大药房
山西省公安厅
中国邮政
北京302医院
河北廊坊新奥集团公司
项目经验:
中国电信3G项目AAA系统数据库部署及优化
中国联通CRM数据库性能优化
中国移动10086电商平台数据库部署及优化
湖南老百姓大药房ERR数据库sql优化项目
四川达州商业银行TCBS核心业务系统数据库模型设计和RAC部署及优化
四川达州商业银行TCBS核心业务系统后端批处理存储过程功能模块编写及优化
北京高铁信号监控系统RAC数据库部署及优化
河南宇通客车数据库性能优化
中国电信电商平台核心采购模块表模型设计及优化
中国邮政储蓄系统数据库性能优化及sql优化
北京302医院数据库迁移实施
河北廊坊新奥data guard部署及优化
山西公安厅身份证审计数据库系统故障评估
联系方式:
手机:18201115468
qq : 305076427
qq微博: wisdomone1
新浪微博:wisdomone9
qq群:275813900
itpub博客名称:wisdomone1
http://blog.itpub.net/9240380/
解决方案:
- 数据库版本
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
- 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.
|
exclude选项官方说明
小结:
name_clause是可选项,如不指定,则不导出由object_type指定的所有对象类型
name_clause必须由双引号括起来,而非单引号
name_clause适用于有具体名称的对象,不适于grant
可以指定多个exclude子句
如果要指定排除某个对象类型的对象,可以采用object_type:"in ('object_name'')"
或者object_type:"like 'emp%'" and so on
为了防止命令转义,可以把exclude选项值单独放在parfile中,这样可读性好
- 查看数据库目录
SQL> col directory_path for a100
SQL> col owner for a10
SQL> set linesize 300
SQL> select owner,directory_name,directory_path from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
---------- ------------------------------ ----------------------------------------------------------------------------------------------------
SYS DATA_PUMP_DIR /home/ora10g/product/10.2.0/db_1/rdbms/log/
SYS ORACLE_OCM_CONFIG_DIR /home/ora10g/product/10.2.0/db_1/ccr/state
SQL>
- 用户tbs_11204的表
SQL> conn tbs_11204/system
Connected.
SQL> select tname from tab;
TNAME
------------------------------
T_SEX
CARD_SALE_DETAIL
V_T_NON_PARTITION
T_LIST_PARTITION
T_PK
T_BIND
STAT_T_STAT
T_STAT
T_PARTITION
T_BIG_TABLE
T_COMP_IDX
TNAME
------------------------------
RM_PARTH_RELATION
RM_PARTY
T_LOCK_STAT
T_MV
MLOG$_T_MV
T_SIZE
MV_T_MV_SECOND
T_NON_PARTITION_TEMP
T_NON_PARTITION
20 rows selected.
SQL> select count(*) from tab;
COUNT(*)
----------
20
- 导出用户tbs_11204的数据,但不导出其中的表t_sex
[ora10g@seconary ~]$ expdp tbs_11204/system directory=data_pump_dir dumpfile=20140815_exclude_t_sex.dmp exclude=tbs_11204:t_sex
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 2:48:45
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39038: Object path "TBS_11204" is not supported for SCHEMA jobs.
- 授权给导出用户
[ora10g@seconary ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 15 02:49:04 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> grant read,write on directory data_pump_dir to tbs_11204;
Grant succeeded.
- 导出仍旧报错
[ora10g@seconary ~]$ expdp tbs_11204/system dumpfile=DATA_PUMP_DIR:20140815_exclude_t_sex.dmp exclude=tbs_11204:t_sex
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 2:53:12
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39038: Object path "TBS_11204" is not supported for SCHEMA jobs.
- 为导出用户创建目录
[ora10g@seconary ~]$ sqlplus tbs_11204/system
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 15 02:54:36 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> host
[ora10g@seconary ~]$ pwd
/home/ora10g
[ora10g@seconary ~]$ mkdir -p /home/ora10g/tbs_11204
[ora10g@seconary ~]$ exit
exit
SQL> create directory dir_tbs_11204 as '/home/ora10g/tbs_11204';
Directory created.
- 报错依旧
[ora10g@seconary ~]$ expdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp exclude=tbs_11204:t_sex
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 2:58:01
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39038: Object path "TBS_11204" is not supported for SCHEMA jobs.
- 移除exclude选项expdp成功,说明exclude里面内容编写有误
[ora10g@seconary ~]$ expdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 2:59:28
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "TBS_11204"."SYS_EXPORT_SCHEMA_01": tbs_11204/******** dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 347.3 MB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
中间略
. . exported "TBS_11204"."T_PK" 0 KB 0 rows
Master table "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for TBS_11204.SYS_EXPORT_SCHEMA_01 is:
/home/ora10g/tbs_11204/20140815_exclude_t_sex.dmp
Job "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully completed at 03:00:02
[ora10g@seconary ~]$
- 加上选项exclude,仍旧报错
注意标红部分,表明exclude里面的内容格式不对
[ora10g@seconary ~]$ expdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp exclude=table:t_sex
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 3:02:08
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39071: Value for EXCLUDE is badly formed.
ORA-00920: invalid relational operator
- 修正exclude,只指定对象类型expdp成功
[ora10g@seconary ~]$ expdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp exclude=table
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 3:02:37
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "TBS_11204"."SYS_EXPORT_SCHEMA_01": tbs_11204/******** dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp exclude=table
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
Processing object type SCHEMA_EXPORT/JOB
Master table "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for TBS_11204.SYS_EXPORT_SCHEMA_01 is:
/home/ora10g/tbs_11204/20140815_exclude_t_sex.dmp
Job "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully completed at 03:02:39
[ora10g@seconary ~]$
- 编写一个命令选项参数文件,其内容为:排除单表t_sex
[ora10g@seconary ~]$ more zxy_parfile.txt
exclude=TABLE:"LIKE 'T_SEX%'"
或者
[ora10g@seconary ~]$ more zxy_parfile.txt
exclude=TABLE:"in ('T_SEX')"
[ora10g@seconary ~]$ expdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp parfile=./zxy_parfile.txt
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 3:17:41
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "TBS_11204"."SYS_EXPORT_SCHEMA_01": tbs_11204/******** dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp parfile=./zxy_parfile.txt
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 347.2 MB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
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/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION
Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
Processing object type SCHEMA_EXPORT/TABLE/MATERIALIZED_VIEW_LOG
Processing object type SCHEMA_EXPORT/JOB
. . exported "TBS_11204"."T_SIZE" 36.49 MB 3000000 rows
. . exported "TBS_11204"."T_NON_PARTITION_TEMP" 34.12 MB 2000000 rows
. . exported "TBS_11204"."T_LOCK_STAT" 14.76 MB 1130030 rows
. . exported "TBS_11204"."T_BIND" 28.55 MB 2000000 rows
. . exported "TBS_11204"."T_BIG_TABLE" 18.82 MB 1600000 rows
. . exported "TBS_11204"."T_PARTITION":"P4" 13.31 MB 999701 rows
. . exported "TBS_11204"."CARD_SALE_DETAIL":"P1" 6.331 MB 333336 rows
. . exported "TBS_11204"."CARD_SALE_DETAIL":"P2" 6.331 MB 333332 rows
. . exported "TBS_11204"."CARD_SALE_DETAIL":"P3" 6.236 MB 333332 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P1" 2.858 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P10" 2.864 MB 166666 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P11" 2.864 MB 166666 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P2" 2.864 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P3" 2.864 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P4" 2.858 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P5" 2.858 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P6" 2.864 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P7" 2.864 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P8" 2.858 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P9" 2.858 MB 166666 rows
. . exported "TBS_11204"."T_COMP_IDX" 5.691 MB 360000 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P0" 2.699 MB 166666 rows
. . exported "TBS_11204"."RM_PARTH_RELATION" 4.803 MB 362104 rows
. . exported "TBS_11204"."RM_PARTY" 3.739 MB 264813 rows
. . exported "TBS_11204"."STAT_T_STAT" 12.37 KB 3 rows
. . exported "TBS_11204"."T_LIST_PARTITION":"P1" 5.273 KB 1 rows
. . exported "TBS_11204"."T_PARTITION":"P3" 6.414 KB 100 rows
. . exported "TBS_11204"."T_STAT" 5.585 KB 3 rows
. . exported "TBS_11204"."MLOG$_T_MV" 0 KB 0 rows
. . exported "TBS_11204"."MV_T_MV_SECOND" 0 KB 0 rows
. . exported "TBS_11204"."T_LIST_PARTITION":"P2" 0 KB 0 rows
. . exported "TBS_11204"."T_MV" 0 KB 0 rows
. . exported "TBS_11204"."T_PARTITION":"P2" 0 KB 0 rows
. . exported "TBS_11204"."T_PK" 0 KB 0 rows
Master table "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for TBS_11204.SYS_EXPORT_SCHEMA_01 is:
/home/ora10g/tbs_11204/20140815_exclude_t_sex.dmp
Job "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully completed at 03:17:55
[ora10g@seconary ~]$
- 排除多个表
[ora10g@seconary ~]$ more zxy_parfile.txt
exclude=TABLE:"in ('T_SEX','T_PK')"
[ora10g@seconary ~]$ expdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp parfile=./zxy_parfile.txt
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 3:29:20
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "TBS_11204"."SYS_EXPORT_SCHEMA_01": tbs_11204/******** dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp parfile=./zxy_parfile.txt
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 347.2 MB
Processing object type SCHEMA_EXPORT/USER
中间略
. . exported "TBS_11204"."T_PARTITION":"P2" 0 KB 0 rows
Master table "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for TBS_11204.SYS_EXPORT_SCHEMA_01 is:
/home/ora10g/tbs_11204/20140815_exclude_t_sex.dmp
Job "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully completed at 03:29:36
[ora10g@seconary ~]$
- 排除不同的对象类型
SQL> select object_name from user_objects where lower(object_type)='procedure';
OBJECT_NAME
--------------------------------------------------------------------------------
PROC_T_NON_PARTITION
PROC_TEST
多个exclude子句
[ora10g@seconary ~]$ more zxy_parfile.txt
exclude=TABLE:"in ('T_SEX','T_PK')" exclude=PROCEDURE:"in ('PROC_TEST')"
[ora10g@seconary ~]$ rm -rf /home/ora10g/tbs_11204/20140815_exclude_t_sex.dmp
[ora10g@seconary ~]$ expdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp parfile=./zxy_parfile.txt
Export: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 3:33:37
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "TBS_11204"."SYS_EXPORT_SCHEMA_01": tbs_11204/******** dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp parfile=./zxy_parfile.txt
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 347.2 MB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
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/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION
Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
Processing object type SCHEMA_EXPORT/TABLE/MATERIALIZED_VIEW_LOG
Processing object type SCHEMA_EXPORT/JOB
. . exported "TBS_11204"."T_SIZE" 36.49 MB 3000000 rows
. . exported "TBS_11204"."T_NON_PARTITION_TEMP" 34.12 MB 2000000 rows
. . exported "TBS_11204"."T_LOCK_STAT" 14.76 MB 1130030 rows
. . exported "TBS_11204"."T_BIND" 28.55 MB 2000000 rows
. . exported "TBS_11204"."T_BIG_TABLE" 18.82 MB 1600000 rows
. . exported "TBS_11204"."T_PARTITION":"P4" 13.31 MB 999701 rows
. . exported "TBS_11204"."CARD_SALE_DETAIL":"P1" 6.331 MB 333336 rows
. . exported "TBS_11204"."CARD_SALE_DETAIL":"P2" 6.331 MB 333332 rows
. . exported "TBS_11204"."CARD_SALE_DETAIL":"P3" 6.236 MB 333332 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P1" 2.858 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P10" 2.864 MB 166666 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P11" 2.864 MB 166666 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P2" 2.864 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P3" 2.864 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P4" 2.858 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P5" 2.858 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P6" 2.864 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P7" 2.864 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P8" 2.858 MB 166667 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P9" 2.858 MB 166666 rows
. . exported "TBS_11204"."T_COMP_IDX" 5.691 MB 360000 rows
. . exported "TBS_11204"."T_NON_PARTITION":"P0" 2.699 MB 166666 rows
. . exported "TBS_11204"."RM_PARTH_RELATION" 4.803 MB 362104 rows
. . exported "TBS_11204"."RM_PARTY" 3.739 MB 264813 rows
. . exported "TBS_11204"."STAT_T_STAT" 12.37 KB 3 rows
. . exported "TBS_11204"."T_LIST_PARTITION":"P1" 5.273 KB 1 rows
. . exported "TBS_11204"."T_PARTITION":"P3" 6.414 KB 100 rows
. . exported "TBS_11204"."T_STAT" 5.585 KB 3 rows
. . exported "TBS_11204"."MLOG$_T_MV" 0 KB 0 rows
. . exported "TBS_11204"."MV_T_MV_SECOND" 0 KB 0 rows
. . exported "TBS_11204"."T_LIST_PARTITION":"P2" 0 KB 0 rows
. . exported "TBS_11204"."T_MV" 0 KB 0 rows
. . exported "TBS_11204"."T_PARTITION":"P2" 0 KB 0 rows
Master table "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for TBS_11204.SYS_EXPORT_SCHEMA_01 is:
/home/ora10g/tbs_11204/20140815_exclude_t_sex.dmp
Job "TBS_11204"."SYS_EXPORT_SCHEMA_01" successfully completed at 03:33:49
[ora10g@seconary ~]$
小结:
exclude适用于想导出生产或测试系统某些特定的数据对象,进行相关的测试
exclude功能灵活,十分强大
impdp官方说明
[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 ~]$
|
impdp导入上述的dmp文件
[ora10g@seconary ~]$ impdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp
Import: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 3:55:36
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "TBS_11204"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "TBS_11204"."SYS_IMPORT_FULL_01": tbs_11204/******** dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"TBS_11204" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "TBS_11204"."T_SIZE" 36.49 MB 3000000 rows
. . imported "TBS_11204"."T_NON_PARTITION_TEMP" 34.12 MB 2000000 rows
. . imported "TBS_11204"."T_LOCK_STAT" 14.76 MB 1130030 rows
. . imported "TBS_11204"."T_BIND" 28.55 MB 2000000 rows
. . imported "TBS_11204"."T_BIG_TABLE" 18.82 MB 1600000 rows
. . imported "TBS_11204"."T_PARTITION":"P4" 13.31 MB 999701 rows
. . imported "TBS_11204"."CARD_SALE_DETAIL":"P1" 6.331 MB 333336 rows
. . imported "TBS_11204"."CARD_SALE_DETAIL":"P2" 6.331 MB 333332 rows
. . imported "TBS_11204"."CARD_SALE_DETAIL":"P3" 6.236 MB 333332 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P1" 2.858 MB 166667 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P10" 2.864 MB 166666 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P11" 2.864 MB 166666 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P2" 2.864 MB 166667 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P3" 2.864 MB 166667 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P4" 2.858 MB 166667 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P5" 2.858 MB 166667 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P6" 2.864 MB 166667 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P7" 2.864 MB 166667 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P8" 2.858 MB 166667 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P9" 2.858 MB 166666 rows
. . imported "TBS_11204"."T_COMP_IDX" 5.691 MB 360000 rows
. . imported "TBS_11204"."T_NON_PARTITION":"P0" 2.699 MB 166666 rows
. . imported "TBS_11204"."RM_PARTH_RELATION" 4.803 MB 362104 rows
. . imported "TBS_11204"."RM_PARTY" 3.739 MB 264813 rows
. . imported "TBS_11204"."STAT_T_STAT" 12.37 KB 3 rows
. . imported "TBS_11204"."T_LIST_PARTITION":"P1" 5.273 KB 1 rows
. . imported "TBS_11204"."T_PARTITION":"P3" 6.414 KB 100 rows
. . imported "TBS_11204"."T_STAT" 5.585 KB 3 rows
. . imported "TBS_11204"."MLOG$_T_MV" 0 KB 0 rows
. . imported "TBS_11204"."MV_T_MV_SECOND" 0 KB 0 rows
. . imported "TBS_11204"."T_LIST_PARTITION":"P2" 0 KB 0 rows
. . imported "TBS_11204"."T_MV" 0 KB 0 rows
. . imported "TBS_11204"."T_PARTITION":"P2" 0 KB 0 rows
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/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION
Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
Processing object type SCHEMA_EXPORT/TABLE/MATERIALIZED_VIEW_LOG
Processing object type SCHEMA_EXPORT/JOB
- 验证导入数据是否成功
[ora10g@seconary ~]$ sqlplus tbs_11204/system
SQL> col object_name for a50
SQL> select object_name,object_type,status from user_objects;
OBJECT_NAME OBJECT_TYPE STATUS
-------------------------------------------------- ------------------- -------
PROC_T_NON_PARTITION PROCEDURE VALID
T_NON_PARTITION TABLE VALID
CARD_SALE_DETAIL TABLE PARTITION VALID
CARD_SALE_DETAIL TABLE PARTITION VALID
CARD_SALE_DETAIL TABLE PARTITION VALID
CARD_SALE_DETAIL TABLE VALID
T_LIST_PARTITION TABLE PARTITION VALID
T_LIST_PARTITION TABLE PARTITION VALID
T_LIST_PARTITION TABLE VALID
T_PARTITION TABLE PARTITION VALID
T_PARTITION TABLE PARTITION VALID
OBJECT_NAME OBJECT_TYPE STATUS
-------------------------------------------------- ------------------- -------
T_PARTITION TABLE PARTITION VALID
T_PARTITION TABLE VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
OBJECT_NAME OBJECT_TYPE STATUS
-------------------------------------------------- ------------------- -------
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_NON_PARTITION TABLE PARTITION VALID
T_BIND TABLE VALID
STAT_T_STAT TABLE VALID
T_STAT TABLE VALID
T_BIG_TABLE TABLE VALID
T_COMP_IDX TABLE VALID
RM_PARTY TABLE VALID
RM_PARTH_RELATION TABLE VALID
T_LOCK_STAT TABLE VALID
OBJECT_NAME OBJECT_TYPE STATUS
-------------------------------------------------- ------------------- -------
MLOG$_T_MV TABLE VALID
T_SIZE TABLE VALID
T_NON_PARTITION_TEMP TABLE VALID
T_MV TABLE VALID
MV_T_MV_SECOND TABLE VALID
IDX_CARD_SALE_DETAIL INDEX VALID
IDX_T_BIND INDEX VALID
STAT_T_STAT INDEX VALID
IDX_T_PARTITION INDEX VALID
IDX_T_BIG_TABLE INDEX VALID
IDX_T_COMP_IDX INDEX VALID
OBJECT_NAME OBJECT_TYPE STATUS
-------------------------------------------------- ------------------- -------
IDX_RM_PARTY_ID INDEX VALID
IDX_RM_PARTH_RELATION INDEX VALID
I_SNAP$_MV_T_MV_SECOND INDEX VALID
TMP$$_IDX_T_NON_PARTITION_C0 INDEX VALID
IDX_T_NON_PARTITION_CARD_ID INDEX VALID
V_T_NON_PARTITION VIEW VALID
MV_T_MV_SECOND MATERIALIZED VIEW VALID
51 rows selected.
SQL>
- 添加full=y选项的导入
[ora10g@seconary ~]$ impdp tbs_11204/system dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp full=y
Import: Release 10.2.0.5.0 - 64bit Production on Friday, 15 August, 2014 4:45:38
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "TBS_11204"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "TBS_11204"."SYS_IMPORT_FULL_01": tbs_11204/******** dumpfile=dir_tbs_11204:20140815_exclude_t_sex.dmp full=y
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"TBS_11204" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39151: Table "TBS_11204"."CARD_SALE_DETAIL" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_LIST_PARTITION" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_PARTITION" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_NON_PARTITION" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_BIND" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."STAT_T_STAT" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_STAT" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_BIG_TABLE" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_COMP_IDX" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."RM_PARTY" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."RM_PARTH_RELATION" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_LOCK_STAT" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."MLOG$_T_MV" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_SIZE" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_NON_PARTITION_TEMP" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."T_MV" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "TBS_11204"."MV_T_MV_SECOND" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
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/PROCEDURE/PROCEDURE
ORA-31684: Object type PROCEDURE:"TBS_11204"."PROC_T_NON_PARTITION" already exists
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
ORA-31684: Object type VIEW:"TBS_11204"."V_T_NON_PARTITION" already exists
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION
Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
ORA-31684: Object type MATERIALIZED_VIEW:"TBS_11204"."MV_T_MV_SECOND" already exists
Processing object type SCHEMA_EXPORT/TABLE/MATERIALIZED_VIEW_LOG
Processing object type SCHEMA_EXPORT/JOB
ORA-39083: Object type JOB failed to create with error:
ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
Failing sql is:
BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 3, LUSER=> 'TBS_11204', PUSER=> 'TBS_11204', CUSER=> 'TBS_11204', NEXT_DATE=> TO_DATE('4000-01-01 00:00:00', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'sysdate+1/43200', BROKEN=> TRUE, WHAT=> 'proc_test;', NLSENV=> 'NLS_LANGUAGE=''SIMPLIFIED CHINESE'' NLS_TERRITORY=''CHINA'' NLS_CURRENCY=''?'' NLS_ISO_CURRENCY=''CHINA'' NLS_NUMERIC_CHARACTERS=''.,'' N
ORA-39083: Object type JOB failed to create with error:
ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
Failing sql is:
BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 2, LUSER=> 'TBS_11204', PUSER=> 'TBS_11204', CUSER=> 'TBS_11204', NEXT_DATE=> TO_DATE('4000-01-01 00:00:00', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'sysdate+1/43200', BROKEN=> TRUE, WHAT=> 'proc_test;', NLSENV=> 'NLS_LANGUAGE=''SIMPLIFIED CHINESE'' NLS_TERRITORY=''CHINA'' NLS_CURRENCY=''?'' NLS_ISO_CURRENCY=''CHINA'' NLS_NUMERIC_CHARACTERS=''.,'' N
ORA-39083: Object type JOB failed to create with error:
ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
Failing sql is:
BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 4, LUSER=> 'TBS_11204', PUSER=> 'TBS_11204', CUSER=> 'TBS_11204', NEXT_DATE=> TO_DATE('4000-01-01 00:00:00', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'sysdate+1/43200', BROKEN=> TRUE, WHAT=> 'proc_test;', NLSENV=> 'NLS_LANGUAGE=''SIMPLIFIED CHINESE'' NLS_TERRITORY=''CHINA'' NLS_CURRENCY=''?'' NLS_ISO_CURRENCY=''CHINA'' NLS_NUMERIC_CHARACTERS=''.,'' N
ORA-39083: Object type JOB failed to create with error:
ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
Failing sql is:
BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 5, LUSER=> 'TBS_11204', PUSER=> 'TBS_11204', CUSER=> 'TBS_11204', NEXT_DATE=> TO_DATE('4000-01-01 00:00:00', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'sysdate+1/43200', BROKEN=> TRUE, WHAT=> 'proc_test;', NLSENV=> 'NLS_LANGUAGE=''SIMPLIFIED CHINESE'' NLS_TERRITORY=''CHINA'' NLS_CURRENCY=''?'' NLS_ISO_CURRENCY=''CHINA'' NLS_NUMERIC_CHARACTERS=''.,'' N
ORA-39083: Object type JOB failed to create with error:
ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
Failing sql is:
BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 6, LUSER=> 'TBS_11204', PUSER=> 'TBS_11204', CUSER=> 'TBS_11204', NEXT_DATE=> TO_DATE('2014-08-15 03:33:39', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'sysdate+1/43200', BROKEN=> FALSE, WHAT=> 'proc_test;', NLSENV=> 'NLS_LANGUAGE=''SIMPLIFIED CHINESE'' NLS_TERRITORY=''CHINA'' NLS_CURRENCY=''?'' NLS_ISO_CURRENCY=''CHINA'' NLS_NUMERIC_CHARACTERS=''.,''
Job "TBS_11204"."SYS_IMPORT_FULL_01" completed with 26 error(s) at 04:45:49
[ora10g@seconary ~]$
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-1252027/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-1252027/