script to copy archive log to standby site
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: script to copy archive log to standby site

  1. #1
    Join Date
    Nov 2000
    Posts
    245
    Does anyone has a script to copy the archive log from primary site to standby site? could you send me?

    or help me to fix my script:


    if [ ! -a $AL1/$csid/.rcp.tim ] ; then
    touch $AL1/$csid/.rcp.tim
    fi

    for F in `find $AL1/$csid -type f -newer $AL1/$csid/.rcp.tim -name 'arch*'|sort`
    do
    rcp $F $remote:$AL1/$csid/
    cp -p $F $AL1/$csid/.rcp.tim
    done

    --- I use the dummy file, .rcp.tim as a milestone to tracking the latest "time" which file been copies. the problem is it doesnot work correctly when 2 log files created at the same mininute- it only copy one.

    thanks in advance

    Jim

  2. #2
    Join Date
    Mar 2000
    Location
    CA
    Posts
    317
    Instead of tracking the time, track the ARCH file Log Seq.No which should and make that script wake up and find if any new files are generated copy all of them
    Thanks
    Kishore Kumar

  3. #3
    Join Date
    Jan 2001
    Posts
    126
    Hi,

    Another way to to do this is to send the output of standby roll to a file. When the roll stops due to non-availability of file the information is logged in the output file. From this output file you can get the next log file name to be copied.

    Baliga


  4. #4
    Join Date
    Nov 2000
    Posts
    245

    to mbaliga, Kishore

    mbaliga, Kishore,

    thanks your input. could you please give me detail syntax/description how to do it? thanks

    Jim

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