oracle impdp 多文件需要带上完整文件名

oracle 数据泵导出  

expdp \"/ as sysdba \" DUMPFILE=BI_56_$(date +%Y%m%d)_%U.dmp DIRECTORY=DUMP572 FULL=y FILESIZE=50G exclude=statistics
 

使用 impdp 导入的时候报错

 

[oracle@BI-DB57 ~]$ impdp \"/ as sysdba \"  DIRECTORY=dump572 DUMPFILE=BI_56_$(date -d "4 day ago" +%Y%m%d)*   logfile=impdp_20181023.log FULL=y

Import: Release 11.2.0.4.0 - Production on Tue Oct 23 09:45:57 2018

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "/u02/dump572/BI_56_20181019*.dmp" for read
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
 

要带上所有的文件名称

impdp  \"/ as sysdba \"  directory=dump572  dumpfile=BI_56_20181019_01.dmp,BI_56_20181019_02.dmp,BI_56_20181019_03.dmp,BI_56_20181019_04.dmp,BI_56_20181019_05.dmp,BI_56_20181019_06.dmp,BI_56_20181019_07.dmp,BI_56_20181019_08.dmp,BI_56_20181019_09.dmp,BI_56_20181019_10.dmp,BI_56_20181019_11.dmp,BI_56_20181019_12.dmp,BI_56_20181019_13.dmp,BI_56_20181019_14.dmp,BI_56_20181019_15.dmp,BI_56_20181019_16.dmp,BI_56_20181019_17.dmp,BI_56_20181019_18.dmp,BI_56_20181019_19.dmp,BI_56_20181019_20.dmp,BI_56_20181019_21.dmp,BI_56_20181019_22.dmp,BI_56_20181019_23.dmp,BI_56_20181019_24.dmp,BI_56_20181019_25.dmp,BI_56_20181019_26.dmp,BI_56_20181019_27.dmp,BI_56_20181019_28.dmp,BI_56_20181019_29.dmp,BI_56_20181019_30.dmp,BI_56_20181019_31.dmp,BI_56_20181019_32.dmp,BI_56_20181019_33.dmp,BI_56_20181019_34.dmp,BI_56_20181019_35.dmp,BI_56_20181019_36.dmp,BI_56_20181019_37.dmp,BI_56_20181019_38.dmp,BI_56_20181019_39.dmp,BI_56_20181019_40.dmp  logfile=impdp_20181023.log FULL=y
 

你可能感兴趣的:(ORACLE)