DataPump Expdp ORA-39071: Value for EXCLUDE is badly formed

_____________________________________________________________________________________________________________________

Problem Description:
Datapump export command failed with following error.

[oracle@TESTBOX dbhome_1]$ expdp exclude=TABLE:"LIKE 'DEV.EMP%'" directory=dp_dir  dumpfile=exp.dmp logfile=exp.log


Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-39001: invalid argument value
ORA-39071: Value for EXCLUDE is badly formed.
ORA-00936: missing expression

Solution Description
This is happening mainly with exclude command with like operator with single quote(‘) and double quote(“). You have to use the unix command line escape character(\) in front of quotes.
oracle@TESTBOX dbhome_1]$ expdp exclude=TABLE:\"LIKE \'DEV.EMP%\'\" directory=dp_dir  dumpfile=exp.dmp logfile=exp.log

Export: Release 19.0.0.0.0 - Production on Sat Sep 21 10:15:01 2019
Version 19.3.0.0.0

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

Username: / as sysdba
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "SYS"."SYS_EXPORT_SCHEMA_03":  "/******** AS SYSDBA" exclude=TABLE:"LIKE 'DEV.EMP%'" directory=dp_dir dumpfile=exp.dmp logfile=exp.log

_____________________________________________________________________________________________________________________

0 comments:

Post a Comment

 

acehints.com Copyright 2011-19 All Rights Reserved | Site Map | Contact | Disclaimer | Google