We're here to help!

Archivelog Maintanence with Dbvisit Replicate

Follow
Problem Description

In production how should the archivelogs be managed ? At the moment in production the rman script I have backing up the database deleted the obsolete archivelogs, but I guess the same isn't true when running replicate?

Solution

Use the command LIST OBSOLETE REDO in the console to see which redologs can be deleted, as they are no longer needed by Replicate. Use the output in:

rman> delete archivelog until sequence <sequence# from above command>

LIST OBSOLETE REDO does not have to be run interactively. It can follow the start-console command to only run that specific command and exit. The -s flag suppresses the headers and minimizes the output:

./start-console.sh -s LIST OBSOLETE REDO
Thread 1 last obsolete sequence#: 7936 (1 day and 1 hour ago)
OK-0: Completed successfully

On Linux and Unix this can then be used to output the exact obsolete redo logs that we require for the rman command:

$ RMAN_OBSOLETE_SEQUENCE=./start-console.sh -s LIST OBSOLETE REDO | awk -F: /sequence#/'{print $2}' | awk '{print $1}'
$ echo $RMAN_OBSOLETE_SEQUENCE
$ 7936

Arjen Visser May 29, 2013 09:44

Have more questions? Submit a request

Comments