Results 1 to 2 of 2

Thread: Export scripts

  1. #1
    Join Date
    Mar 2002
    Posts
    4

    Unanswered: Export scripts

    Hi

    I'm having a problem with my export scripts

    I use use the same script to dump my Oracle dbs every night:

    I have dbs in 8.0.5, 8.1.5 and 8.1.7 and the script works for dbs in all these flavours but 1 of the dbs in 8.1.5 fails

    this is what I see in my logs

    . exporting table VOTEQUESTIONS 1118 rows exported
    . . exporting table VOTERFORMANOFMATCH 310 rows exported
    . . exporting table VOTERMANOFTOURNAMENT 149 rows exported
    . . exporting table VOTES_PER_MINUTE 7132 rows exported
    . about to export CLUSTPROBE's tables via Direct Path ...
    . exporting referential integrity constraints
    . exporting synonyms
    EXP-00008: ORACLE error 904 encountered
    ORA-00904: invalid column name
    EXP-00000: Export terminated unsuccessfully
    Heres the script below

    usage()
    {
    echo "Usage: $0 <ORACLE_SID> <SYSTEM Password> [remove]"
    exit 1
    }

    export ORAENV_ASK=NO
    export ORACLE_SID=$1

    SYSPWD=$2
    REMOVE=$3

    if [ "$ORACLE_SID" = "" ] || [ "$SYSPWD" = "" ]
    then
    usage
    fi

    . oraenv

    export ORACLE_HOME=`grep -v \# /var/opt/oracle/oratab | grep $ORACLE_SID | awk -F: '{print $2}'`

    export LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:/usr/openv/netbackup/bin

    if [ "`ps -ef|grep $ORACLE_SID|egrep -v 'grep|fullexp'|wc -l`" -gt 0 ];
    then
    echo "$ORACLE_SID is running on this node, continuing with export\n"
    else
    echo "$ORACLE_SID is running on other node, quitting\n"
    exit 1
    fi

    OPFILE_EXT="${ORACLE_SID}_`date +\%Y\%m\%d\%H\%M`"
    SYMLINK="${ORACLE_SID}_`date +\%Y\%m\%d`"

    cd /usr/oracle/app/oracle/$ORACLE_SID/export

    if [ "$REMOVE" = "remove" ]
    then
    echo "Removing all earlier $ORACLE_SID export files..."
    \rm -f ${ORACLE_SID}_*
    fi


    NODNAME=/tmp/zoot$$

    /bin/rm -f ${NODNAME}
    /etc/mknod ${NODNAME} p

    ( /usr/bin/gzip -9 < ${NODNAME} > /usr/oracle/app/oracle/$ORACLE_SID/export/${OPFILE_EXT}.dmp.gz ) &

    exp full=y userid=system/$SYSPWD file=${NODNAME} direct=y log=./${OPFILE_EXT}.log

    /bin/rm -f ${SYMLINK}.dmp.gz
    ln -s ${OPFILE_EXT}.dmp.gz ${SYMLINK}.dmp.gz

    /bin/rm -f ${NODNAME}
    any help gratefully recieved . . .

  2. #2
    Join Date
    Jun 2001
    Location
    The Netherlands
    Posts
    38
    Try running catexp on the database ginving trouble.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •