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!

Problem with dmp file

897886Nov 3 2011 — edited Nov 3 2011
Hi,
I'm installed Oracle 11g on Xubuntu 8.04.1
I've some ".tar" files that contain ".dmp.Z" compressed files.

I have a script:
#!/usr/bin/ksh

if [ "$1" == "" ]

then

  echo "nome file mancante"

  exit

else

  NOME_TAR=$1

fi



ORACLE_HOME=/oracle/11g;export ORACLE_HOME

PATH=$ORACLE_HOME/bin:.:$ORACLE_HOME/panel:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/bin:/usr/cluster/bin

export PATH



ORACLE_SID=orcl; export ORACLE_SID



NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15;export NLS_LANG

PANEL=$ORACLE_HOME/panel; export PANEL

PLOG=$PANEL/log; export PLOG



#### area di appoggio dei file di tar

STAGE=/unload/stage; export STAGE



cd $STAGE



tar -tvf $NOME_TAR > $PLOG/$NOME_TAR.out



CMD=$?



if [ $CMD -gt 0 ]

then

  echo "File tar $NOME_TAR corrotto"

  exit

fi



NOME_DUMP=`cat $PLOG/$NOME_TAR.out | awk '{ print $NF }'`



echo $NOME_DUMP



tar -xvf $NOME_TAR > $PLOG/$NOME_TAR.out2



CMD=$?



if [ $CMD -gt 0 ]

then

  echo "Errore durante il processo di tar -xvf $NOME_TAR "

  exit

fi



rm $NOME_DUMP.pipe

mkfifo $NOME_DUMP.pipe

uncompress < $NOME_DUMP > $NOME_DUMP.pipe &

imp \'/ as sysdba\' file=$NOME_DUMP.pipe log=$PLOG/$NOME_DUMP.log fromuser=gdatp touser=gdatp ignore=y indexes=n CONSTRAINTS=n statistics=none feedback=100000 buffer=1000000



CMD=$?

rm $NOME_DUMP.pipe

if [ $CMD -gt 0 ]

then

  echo "Errore durante il processo di import del file $NOME_DUMP "

  exit

else

  rm $NOME_DUMP

  mv $NOME_TAR $STAGE/FATTO

fi
it doesn't works!!

I have to import these files on oracle db, is there some one that could help me?!?!?!
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2011
Added on Nov 3 2011
3 comments
575 views