1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

RMAN log file parameter

Discussion in 'Security, Backup and Recovery' started by General Franco, Aug 7, 2012.

  1. General Franco

    General Franco Active Member

    Messages:
    22
    Likes Received:
    1
    Trophy Points:
    90
    Is it possible to specify a variable in the RMAN log param?
    E.g.

    LOG_DIR=/var/tmp

    #this works ..
    rman TARGET / NOCATALOG LOG = /var/tmp/rman_test.log << EOF

    #this doesn't for some reason ..
    rman TARGET / NOCATALOG LOG = $LOG_DIR/rman_test.log << EOF


    Thanks.
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,345
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Not that way, as you've discovered. You should use the msglog command-line parameter to which you can pass a variable:

    LOG_DIR=/var/tmp
    MSGLOG=${LOG_DIR}/rman_test.log

    $ORACLE_HOME/bin/rman target / nocatalog msglog $MSGLOG append <<EOF
    [rman command script here]
    EOF
     
    General Franco likes this.