Rman table/view cleanup
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Rman table/view cleanup

  1. #1
    Join Date
    Feb 2001
    Posts
    128

    Rman table/view cleanup

    Hi,

    version - 11.1.0.7

    I have Rman backups running on a database. Due to some application requirements for testing, the system date was changed to reflect a year ago. So. it's June 2011 now.

    My scripts to report backup status etc are not working as expected as they are looking for the max(end_time) from v$rman_status.

    Is there any way to cleanup or reinstall the rman dictionary.

    Appreciate your help

    Regards
    Jay

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,477

    Cool

    Yes, take a look at the "CHANGE" command.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Feb 2001
    Posts
    128
    Hi,

    I checked out the link but I'm still not sure what I need to use for my sceanrio.

    Here's the output from v$rman_status

    select status, start_time, end_time, operation from v$rman_status where operation='BACKUP' order by start_time;

    STATUS START_TIM END_TIME OPERATION
    ----------------------- --------- --------- ---------------------------------
    COMPLETED 16-JUN-11 16-JUN-11 BACKUP
    COMPLETED 16-JUN-11 16-JUN-11 BACKUP
    COMPLETED 16-JUN-11 16-JUN-11 BACKUP
    COMPLETED 16-JUN-11 16-JUN-11 BACKUP
    COMPLETED 17-JUN-11 17-JUN-11 BACKUP
    COMPLETED 17-JUN-11 17-JUN-11 BACKUP
    COMPLETED 17-JUN-11 17-JUN-11 BACKUP -- 17th is sysdate on the server today

    March 12th was when the system date was changed on the server ..
    so the output also has
    COMPLETED 11-MAR-12 11-MAR-12 BACKUP
    COMPLETED 11-MAR-12 11-MAR-12 BACKUP
    COMPLETED 11-MAR-12 11-MAR-12 BACKUP
    FAILED 11-MAR-12 11-MAR-12 BACKUP
    COMPLETED 11-MAR-12 11-MAR-12 BACKUP
    COMPLETED 12-MAR-12 12-MAR-12 BACKUP
    COMPLETED 12-MAR-12 12-MAR-12 BACKUP

    So, basically I need to get rid of all the entries of 2012.

    Thanks again

    Jay

  4. #4
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,477

    Cool

    Perhaps DELETE would work:
    Code:
    DELETE BACKUPSET COMPLETED AFTER '17-JUN-11:23:59:59';
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  5. #5
    Join Date
    Feb 2001
    Posts
    128
    Hi,

    I tried the following .. nothing happened.

    RMAN> DELETE BACKUPSET COMPLETED AFTER 'sysdate';

    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    using channel ORA_DISK_4

    RMAN>

    Regards
    Jay

  6. #6
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,001
    You can also unregister and reregister your database. Unregistering will delete the backups in the catalog. If that doesn't work, unregister the database, then use "nid" to change the db id, then reregister the database. this will work.
    this space intentionally left blank

  7. #7
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,477

    Thumbs down

    Quote Originally Posted by Nugpot View Post
    Hi,

    I tried the following .. nothing happened.

    RMAN> DELETE BACKUPSET COMPLETED AFTER 'sysdate';
    Don't use quotes:
    Code:
    DELETE BACKUPSET COMPLETED AFTER sysdate;

    Or, do as gandolf989 suggests to get "clean" catalog.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  8. #8
    Join Date
    Feb 2001
    Posts
    128
    Finally got the downtime to fix it..

    changing the dbid did the trick.

    Thanks for all your help!!

    Regards
    Jay

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