Oracle version: 11.2.0.1 /Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Hi,
impdp is a command line utility in oracle to import data into a DB schema.
Typically impdp command along with its parameters is run in a single line like
impdp \'/ as sysdba\' DIRECTORY=DATA_PUMP_DIR DUMPFILE=expdp-prod-WMS-12-Sep-2012.dmp parallel=1 LOGFILE=WMS_SIT-imp.log remap_schema=WMS:WMS_SIT remap_tablespace = WMS_DATA:DEV_WMS_01_DATA
For better readability , I thought of putting each parameter on a separate line by using ' \ ' character as the next line indictor (not sure what is this called in Shell scripting terminology ). Is it New line indicator/separator or Next line separator ?
When I run the below shellscript which has three impdp commands , the second impdp fails with below error (error message is misleading, I think) but the 1st and 3rd impdp commands were succesfull. I have faced this wierd issue several times.
impdp \'/ as sysdba\' \
DIRECTORY=DATA_PUMP_DIR \
DUMPFILE=expdp-prod-WMS-12-Sep-2012.dmp \
parallel=1 \
LOGFILE=WMS_SIT-imp.log \
remap_schema=WMS:WMS_SIT \
remap_tablespace = WMS_DATA:DEV_WMS_01_DATA \ # -------> is there anything wrong with this particular next line indicator ' \' shown in red
impdp \'/ as sysdba\' \ # -------------------> the second imdp command which failed
DIRECTORY=DATA_PUMP_DIR \
DUMPFILE=expdp-prod-WMS-12-Sep-2012.dmp \
parallel=1 \
LOGFILE=WMS_SIP_SIT-imp.log \
remap_schema=WMS:WMS_SIP_SIT \
remap_tablespace = WMS_DATA:DEV_WMS_01_DATA \
impdp \'/ as sysdba\' \
DIRECTORY=DATA_PUMP_DIR \
DUMPFILE=expdp-prod-WMS-12-Sep-2012.dmp \
parallel=1 \
LOGFILE=TEST_WMS_01-imp.log \
remap_schema=WMS:TEST_WMS_01 \
remap_tablespace = WMS_DATA:TEST_WMS_01_DATA \
nohup threeImports.sh > threeImportsnohup.log &
error I received for the second import:
Import: Release 11.2.0.1.0 - Production on Thu Sep 13 05:29:22 2012
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-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "/u07/wmsdata/expdat.dmp" for read
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
I don't understand why I get "unable to open dump file" because the dumpfile is present and moreover the two other impdp commands which uses the same dumpfile (1st and 3rd) were succesfull.
Additional Info
Info on very similair issue I had last week
Last week , I had very similair issue. I put 5 impdp commands in a similair script. I don't know if it is a co-incidence , but then also , it was the second impdp that failed with the same error. This is why I am suspecting that something has between the 1st sucessfull impdp and the second impdp command. Anything wrong with the new line indicator shown in red above ?