oracle导出子分区的表,导出分区表某个分区的部分数据报错

麻烦高手帮忙看一下分区表导出的问题,老是报错

环境是这样的:

这边生产库上有一个分区表(按月分区),但是每个分区还是特别大,300多G,每个月初的时候会将上个月的分区数据insert

到另一张表里面,走的是全表扫描,一条sql都执行了8个多小时,现在想导一个分区的的部分数据到测试库里面,看能不能加

索引或者拆分分区表,按天分区。

测试库是linux的(10.2.0.5,单实例),正式库AIX(10.2.0.5.11,RAC)

由于正式库本地没有足够的存储空间,测试库空间也不是很大,开始想通过db_link直接impdp进来,发现不支持分区表

然后尝试了一些方法,都报错:

[oracle@chinaunicom jzw]$ exp jzw/1234qwer@bill file=exp_err_p02.dmp tables=UCR_ERR.TG_CDR_PP_ERR_GS

4f06a01a81d5603cca001c0e92e5ebda.gif02 indexes=n buffer=65536 feedback=10000 log=exp_0328.log query=UCR_ERR.TG_CDR_PP_ERR_GS:\"where month_id=\'02\' and INDB_TIME bewteen \'0201\' and \'0215\'\"

[oracle@chinaunicom jzw]$ exp jzw/1234qwer@bill file=exp_err_p02.dmp tables=UCR_ERR.TG_CDR_PP_ERR_GS

4f06a01a81d5603cca001c0e92e5ebda.gif02 indexes=n buffer=65536 feedback=10000 log=exp_0328.log query=UCR_ERR.TG_CDR_PP_ERR_GS:\"where INDB_TIME bewteen \'0201\' and \'0215\'\"

[oracle@chinaunicom jzw]$ exp jzw/1234qwer@bill file=exp_err_p02.dmp tables=UCR_ERR.TG_CDR_PP_ERR_GS

4f06a01a81d5603cca001c0e92e5ebda.gif02 indexes=n buffer=65536 feedback=10000 log=exp_0328.log query=UCR_ERR.TG_CDR_PP_ERR_GS:\"where month_id=\'02\' and to_number\(INDB_TIME\) bewteen 0201 and 0215\"

这3条导出语句的报错差不多都是下面这样

Export: Release 10.2.0.5.0 - Production on Tue Apr 1 21:35:03 2014

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

Note: indexes on tables will not be exported

About to export specified tables via Conventional Path ...

Current user changed to UCR_ERR

. . exporting table               TG_CDR_PP_ERR_GS

. . exporting partition                            P02

EXP-00056: ORACLE error 933 encountered

ORA-00933: SQL command not properly ended

Export terminated successfully with warnings.

用expdp也是报错

[oracle@chinaunicom jzw]$ expdp jzw/1234qwer@bill query=UCR_ERR.TG_CDR_PP_ERR_GS:\"where month_id='02' and to_number\(INDB_TIME\) bewteen 201 and 215\" tables=UCR_ERR.TG_CDR_PP_ERR_GS

4f06a01a81d5603cca001c0e92e5ebda.gif02 directory=jzw_dir dumpfile=jzw_dir:err2_p02.dmp logfile=jzw_dir

4f06a01a81d5603cca001c0e92e5ebda.gif02.log job_name=jzw_job

Export: Release 10.2.0.5.0 - 64bit Production on Tuesday, 01 April, 2014 21:56: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, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

Starting "JZW"."JZW_JOB":  jzw/********@bill query=UCR_ERR.TG_CDR_PP_ERR_GS:"where month_id=02 and to_number(INDB_TIME) bewteen 201 and 215" tables=UCR_ERR.TG_CDR_PP_ERR_GS

4f06a01a81d5603cca001c0e92e5ebda.gif02 directory=jzw_dir dumpfile=jzw_dir:err2_p02.dmp logfile=jzw_dir

4f06a01a81d5603cca001c0e92e5ebda.gif02.log job_name=jzw_job

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 325.2 GB

Processing object type TABLE_EXPORT/TABLE/TABLE

Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT

Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

ORA-31693: Table data object "UCR_ERR"."TG_CDR_PP_ERR_GS":"P02" failed to load/unload and is being skipped due to error:

ORA-00920: invalid relational operator

Master table "JZW"."JZW_JOB" successfully loaded/unloaded

******************************************************************************

Dump file set for JZW.JZW_JOB is:

/oracle/jzw/err2_p02.dmp

Job "JZW"."JZW_JOB" completed with 1 error(s) at 21:56:25

[oracle@chinaunicom jzw]$

个人感觉导出语句应该没有太大问题的,麻烦高手或者有过类似操作的朋友帮忙分析一下

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值