Multiple DB's using same rman script problem
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Multiple DB's using same rman script problem

  1. #1
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204

    Multiple DB's using same rman script problem

    RMAN Script:
    spool log to '/home/oracle/backup/flush.log';
    run {...cut for issue clarity...}
    exit;
    spool log off;

    The problem is the spool file. If I run this in parallel, the spool file will get screwed up.

    Can I pass in a variable?

    Should I have one script for each database (flushDB1.rman, flushDB2.rman, etc.)?

    -Ken
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    you could send all stdout to a file instead of using spool in a file

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    rman catalog foo/bar@cat target / cmdfile=your_script.rman msglog=db1.out
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Quote Originally Posted by davey23uk
    you could send all stdout to a file instead of using spool in a file
    For example...

    cron job???
    script_that_runs_rman.sh>/home/oracle/backup/logs/DB1_flush.log

    Will this catch it all?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  5. #5
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Quote Originally Posted by marist89
    rman catalog foo/bar@cat target / cmdfile=your_script.rman msglog=db1.out
    db1.out could be $1, for example?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  6. #6
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    As Jeff pointed

    backup_archive.rcv
    connect target / ;
    connect catalog user/passwd@catalogdb
    run {
    allocate channel d1 device type disk format '/rman/logfiles/%d_%u_%p';
    BACKUP ARCHIVELOG ALL DELETE INPUT;
    release channel d1;
    }
    exit;


    backup_archive.sh

    if [[ -z ${1} ]]; then
    echo "please provide a dbname and try again";
    exit 1;
    else
    LOGFILE='/backup/${1}_log_`date +\%Y\%m\%d`
    fi

    rman cmdfile=backup_archive.rcv msglog=${LOGFILE}

    exit 0;


    I personally would prefer to generate the rcv script dynamically and then delete upon finishing it.

    This would tag the file with the DBID and the date

    Thanx,
    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  7. #7
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Thanks Sam. I appreciate the detailed explanation. Thanks for your time.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

Posting Permissions

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


Click Here to Expand Forum to Full Width