Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is shell's next line character '\' the cause of this issue ?

CastellSep 13 2012 — edited Sep 13 2012
Oracle version: 11.2.0.1 /Red Hat Enterprise Linux Server release 5.4 (Tikanga)

I have faced this wierd issue several times.

I am putting multiple impdp commands in a shell script by using ' \ ' character as the new line indictor (not sure what is this called in Shell scripting terminology )

When I run the below shellscript, the second impdp fails with below error but the 1st and 3rd impdp commands were succesfull.
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 \

impdp \'/ as sysdba\' \
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


threeImports.sh: line 15: remap_tablespace: command not found
I don't understand why I get "unable to open dump file" because the dumpfile is present and moreover the two other impdp commands (1st and 3rd) were succesfull.

I don't understand why the script is trying to execute remap_tablespace as a separate command !

++++
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.
Unlike , this time , I didn't get "remap_tablespace: command not found" error then though.
This post has been answered by L-MachineGun on Sep 13 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2012
Added on Sep 13 2012
2 comments
1,911 views