Forum Discussion

Bharath_Achar's avatar
9 years ago

Oracle RMAN backup completing succesfully with No KB & no child streams

Hello All, Oracle RMAN backup completing succesfully with No KB in activity monitor & no child streams. Required permission have been set to logs directries and sub-directories. bpdbclient &...
  • Marianne's avatar
    9 years ago

    Please have a look at the sample scripts as suggested before.

    When triggered from the master server, the script is run by root user. root user does not have oracle db rights. There needs to be a test for username, if not oracle, then 'su - oracle' to run rman commands.

    Extract from sample script (which is missing in your backup script):

    # Determine the user which is executing this script.
    # ---------------------------------------------------------------------------
    CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`
    ....
    ...

    # Initiate the command string
     
    if [ "$CUSER" = "root" ]
    then
        su - $ORACLE_USER -c "$CMD_STR" >> $RMAN_LOG_FILE
        RSTAT=$?
    else
        /usr/bin/sh -c "$CMD_STR" >> $RMAN_LOG_FILE
        RSTAT=$?
    fi