1. 程式人生 > >ORA-39194: Table mode jobs require the tables to be comma separated.

ORA-39194: Table mode jobs require the tables to be comma separated.

一、問題概述

expdp通過parfile導數時候報錯如下:

ORA-39194: Table mode jobs require the tables to be comma separated.

相關指令碼為:

userid='sys/[email protected] as sysdba'
directory=LZLL
dumpfile=expdp_%Y%M%U.dmp
logfile=expdp.log
job_name=expdp1101
version=10.2.0.5.0
tables=('ECISINS.PRPCVATINFO',
'ECIS.PRPCVATINFO',
'ECIS.PRPCUSTSTATISTICS',
'ECIS.PRPPTEXT',
'ECIS.PRPDPOLICYCHGLOG',
'ECIS.PRPDCLASS',
'ECIS.PRPDCODE',
'ECIS.PRPDCOMPANY',
'ECIS.PRPDCURRENCY',
'ECIS.PRPDEXCH',
'ECIS.PRPDKIND',
'ECIS.PRPDRISK',
'ECIS.PRPDUSER',
'ECIS.PRPLCLAIM',
'ECIS.PRPLCLAIMLOSS',
'ECIS.PRPLCOMPENSATE',
'ECIS.PRPLPAYMETHOD',
'ECIS.PRPLPERSON',
'ECIS.PRPLREGIST',
'ECIS.PRPLRELATEPERSON',
'ECIS.PRPDFORMULA',
'CCTEST.CRM_CASE_INFO',
'CCTEST.CRM_CASE_CANCEL',
'CCTEST.CRM_COMPLAINT',
'CCTEST.CRM_CASCADE_MENU',
'CCTEST.CRM_CONSULTATION',
'CCTEST.CRM_RESERVATION_FEE',
'CCTEST.CRM_OBJECTION',
'CCTEST.CRM_RESCUE_ORDER',
'CCTEST.CRM_REPORT_INFO',
'CCTEST.CRM_URGE_CLAIM',
'CCTEST.CRM_URGE_OTHERTYPE',
'CCTEST.CRM_CAMPAIGN_TASK',
'CCTEST.CRM_CUSTOMER_BASE',
'CCTEST.CRM_URGE_LOSSPRICE',
'CCTEST.CRM_URGE_PROSPECT',
'CCTEST.CRM_URGE_PROSPECT_SUPPLY',
'PPLS.PRPLACCIDENTCASERELATED',
'PPLS.PRPLACCIDENTINFO',
'PPLS.PRPLCLAIM',
'PPLS.PRPLCLAIMLOSS',
'PPLS.PRPLCLAIMLOSSITEMS',
'PPLS.PRPLCMAIN',
'PPLS.PRPLCOMPENSATE',
'PPLS.PRPLLOSS',
'PPLS.PRPLPAYINFO',
'PPLS.PRPLPAYINFOLIST',
'PPLS.PRPLPAYMETHOD',
'PPLS.PRPLPERSON',
'PPLS.PRPLREGIST',
'PPLS.PRPLRELATEPERSON',
'PPLS.PRPLCAR',
'CCOC_INTEG.PPLS.PRPLCARDRIVER',
'CCOC_INTEG.T_PA_PHEAD', ? ? ? ? ? ? ?
'CCOC_INTEG.T_PA_CMAIN', ? ? ? ? ? ?
'CCOC_INTEG.T_PA_CMAINEXTENSION', ? ??
'CCOC_INTEG.T_PA_CMAINRELATION', ? ??
'CCOC_INTEG.T_PA_CAPPNT', ? ? ? ? ? ?
'CCOC_INTEG.T_PA_CINSUREDPERSON', ? ??
'CCOC_INTEG.T_PA_CINSUREDITEMPERSON',?
'CCOC_INTEG.T_PA_CITEM_KIND',?
'CCOC_INTEG.T_PA_CITEM_KINDEXT', ? ? ?
'CCOC_INTEG.T_PA_CITEMCAR', ? ? ?
'CCOC_INTEG.T_PA_CITEMCAROTHER',
'EVVIVBU_CONFIG.T_DD_BUSI_DATA_TABLE',
'EVVIVBU_CONFIG.T_DD_BUSI_DATA_TABLE_RECORD',
'EVVIVBU_CONFIG.T_PRD_PRODUCT',
'EVVIVBU_CONFIG.T_PRD_PLAN_DEFINITION',
'EVVIVBU_CONFIG.T_PUB_EXCHANGE_RATE',
'EVVIVBU_CONFIG.T_PRD_PRODUCT_ELEMENT',
'EVVIVBU_CONFIG.T_PRD_PRODUCT_MASTER',
'OPE_YIERTY.T_PTY_BRANCH',
'OPE_YIERTY.T_PTY_PARTY',
'ECIS_UAT_PUB.T_PUB_USER',
'OPE_YIE.T_PA_PL_CUST_STAT',
'OPE_YIE.T_PA_PL_POLICY',
'OPE_YIE.T_PA_PL_INVOICE_INFO',
'OPE_YIE.T_PA_DATA_PATCH_LOG',
'OPE_YIE.T_PA_EDS_ENDORSEMENT')

執行指令碼報錯如下:

[[email protected] $ expdp parfile=expdp_evis.par

Export: Release 12.2.0.1.0 - Production on Fri Nov 9 09:27:42 2018

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

Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
ORA-39194: Table mode jobs require the tables to be comma separated.

[[email protected] ]$

二、解決方案:

DataPump TABLES Export Fails WIth Error ORA-39194 (文件 ID 1304286.1)

APPLIES TO:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.2.0.2 - Release: 10.2 to 11.2
Information in this document applies to any platform.

GOAL

You need to export a larger number of tables/partitions (i.e. hundreds), so you need to use the TABLES parameter in a DataPump parameter file. For example, the file (exp.par) may look like this.
 

directory=dpump_dir
dumpfile=dpump_dir:exp.dmp
logfile=dpump_dir:expdp.log
parallel=16
transportable=always
TABLES=(
USER1.TABLE1:P20080101,
USER1.TABLE1:P20080102,
USER1.TABLE1:P20080103,
....NOTE: entire list has not been included
USER1.TABLE1:P20081029,
USER1.TABLE1:P20081030,
USER1.TABLE1:P20081031
)


When you run DataPump Export using the parameter file, it fails with the following error:
 

$ expdp system/manager parfile=exp.par

Export: Release 11.2.0.1.0 - Production on Mon Feb 7 12:23:27 2011
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 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORA-39194: Table mode jobs require the tables to be comma separated.


Further examination will show that the TABLES parameter is not able to be read properly from the DataPump Parameter file.

By enabling DataPump tracing using parameter TRACE=1FF0300, a detailed Data Pump Worker trace file is generated. By examining that trace file, you will see entries like the following:
 

KUPM:16:02:10.751: DBMS_DATAPUMP.METADATA_FILTER (hand, 'TABLE_FILTER', 'USER1.TABLE1:P20080101,USER1.TABLE1:P20080102,USER1.TABLE1:P20080103,
USER1.TABLE1:P20080104,USER1.TABLE1:P20080105,USER1.TABLE1:P2
KUPM:16:02:10.751: 0080106,USER1.TABLE1:P20080107,USER1.TABLE1:P20080108,USER1.TABLE1:P20080109,
USER1.TABLE1:P20080110,USER1.TABLE1:P20080111,USER1.TABLE1:P20080112,
USER1.TABLE1:P20080113,USER1
KUPM:16:02:10.751: .TABLE1:P20080114,USER1.TABLE1:P20080115,USER1.TABLE1:P20080116,
USER1.TABLE1:P20080117,USER1.TABLE1:P20080118,USER1.TABLE1:P20080119,
USER1.TABLE1:P20080120,USER1.TABLE1
KUPM:16:02:10.751: :P20080121,USER1.TABLE1:P20080122,USER1.TABLE1:P20080123,
USER1.TABLE1:P20080124,USER1.TABLE1:P20080125,USER1.TABLE1:P20080126,
USER1.TABLE1:P20080127,USER1.TABLE1:P2008012
KUPM:16:02:10.751: 8,USER1.TABLE1:P20080129,USER1.TABLE1:P20080130,USER1.T...', '');
...
KUPM:16:02:11.202: Remaining trimmed filter: >USER1.TABLE1:P20080904,USER1.TABLE1.TABLE1.TABLE1.TABLE1.TABLE1.TABLE1.
TABLE1.TABLE1.TABLE1.TABLE1.TABLE1.TAB<

KUPM:16:02:11.202: Element: USER1 Delimiter: .
KUPM:16:02:11.203: Element: TABLE1 Delimiter: :
KUPM:16:02:11.203: Element: P20080904 Delimiter: ,


In the entries timestamped 16:02:11, you can see that the value for the TABLES parameter is no longer correct.

This is evidence that the DataPump Parameter file is corrupted, where it is likely that the value for the TABLES parameter contains non-printing characters.

SOLUTION

Re-create the Data Pump Parameter file, preferably using the different method.

If the TABLES parameter was generated by a query (i.e. to be able to generate the list of table names) then it was likely that the query tool added non-printing characters to the output, and it is these non-printing characters that are causing the ORA-39194 error to be reported.

我這邊重新儲存文字解決問題