EXPDP ORACLE with INCLUDE and QUERY options

HI experts, I need do an export using expdp, with:
tables like A_5MIN%
and the cluase= WHERE UTCTIME BETWEEN '11/02/2014' AND '11/08/2014'
I tried with parfile:
userid=xajtdb/xxxxxxx@test
buffer=10000000
DIRECTORY=DATA_PUMP_DIR
DUMPFILE=export_tables_5min.dmp
rows=y
constraints=n
indexes=n
grants=n
statistics=none
INCLUDE=table:\"IN (\'A_5MIN_%\'\"
QUERY="WHERE UTCTIME BETWEEN '11/02/2014' AND '11/08/2014'"
LOGFILE=export_tables_5min.log

Open in new window

But I had problems and errors. Specially with the separator characters.
I'm working with SO Linux RedHat
It is posible do this?
Could you help me with some examples.
Regards
Thank you
carlino70Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
You need to escape the quotes with \ like in the line before...
0
carlino70Author Commented:
Modifying this line like shows down:
INCLUDE=\"IN (\'A_5MIN_033\',\'A_5MIN_023\')\"
QUERY=\"WHERE UTCTIME BETWEEN \'11/02/2014\' AND \'11/08/2014\'\"

Open in new window

Shows the error:
Export: Release 11.2.0.3.0 - Production on Tue Aug 12 12:10:29 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
ORA-39001: invalid argument value
ORA-39071: Value for INCLUDE is badly formed.
ORA-00907: missing right parenthesis

Open in new window

Any idea?
0
slightwv (䄆 Netminder) Commented:
Based on he docs the INCLUDE in the parfile doesn't need escaping:
http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#i1007837

You also need LIKE not IN with a wildcard.  There is an example in the same doc link on the index line.

On the QUERY clause, I would look at using TO_DATE with the strings just to be safe.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
carlino70Author Commented:
Excellent Sr. This is the parfile:
userid=xajtdb/neptune@xa21
buffer=10000000
DIRECTORY=DATA_PUMP_DIR
DUMPFILE=export_tables_5min.dmp
INCLUDE=TABLE:"LIKE 'A_5MIN_%'"
QUERY="WHERE UTCTIME BETWEEN TO_DATE('11/02/2014 00:00:00','DD/MM/YYYY HH24:MI:SS') AND TO_DATE('11/08/2014 23:59:59','DD/MM/YYYY HH24:MI:SS')"
LOGFILE=export_tables_5min.log

Open in new window

Thankyou again
0
carlino70Author Commented:
Excellent
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.