LRM-00116: ')' followed by 'yyyy-mm-dd' FOR ORACLE 11G EXPDP

來源:互聯網
上載者:User

For Oracle11G  EXPDP 

應要求到某個表的某個月之間的資料

EXPDP HELP=Y

QUERY
Predicate clause used to export a subset of a table.
For example, QUERY=employees:"WHERE department_id > 10".

於是  expdp shark/2013 directory=dir_dp dumpfile =traderecord.dmp query=traderecord:"where tr_datetime >= to_date('2014-03-01','yyyy-mm-dd') and tr_datetime < to_date('2014-04-01','yyyy-mm-dd')"
LRM-00116: syntax error at ')' following 'yyyy-mm-dd'


於是要加轉移符號 

]expdp shark/2013 directory=dir_dp dumpfile =traderecord.dmp query=traderecord:\"where tr_datetime \>= to_date\(\'2014-03-01\'\,\'yyyy-mm-dd\'\) and tr_datetime \< to_date\(\'2014-04-01\',\'yyyy-mm-dd\'\)\"


Export: Release 11.2.0.1.0 - Production on Tue Apr 1 14:30:47 2014
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 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "CCPS"."SYS_EXPORT_SCHEMA_01":  shark/******** directory=dir_dp dumpfile=traderecord.dmp query=traderecord:"where tr_datetime >= to_date('2014-03-01','yyyy-mm-dd') and tr_datetime < to_date('2014-04-01','yyyy-mm-dd')" 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 10.92 GB


不是吧 轉移那麼多!!

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.