RMAN - removing old catalog entries - Page 2
DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: RMAN - removing old catalog entries

  1. #11
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Try

    Code:
    RMAN> delete noprompt expired backup completed before 'sysdate-30';

  2. #12
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    noprompt worked like a charm. Thanks.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  3. #13
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    For the benefit of posterity...

    run {
    crosscheck backup completed before 'sysdate-30';
    delete noprompt expired backup completed before 'sysdate-30';
    }
    exit;

    Logging the output was a little screwey. The command line LOG didn't work at all, "spool log to" worked in the script, but .. and here's the weird part .. only AFTER the "exit;". If "spool log off" was before the "exit;", it created a 0 byte file.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  4. #14
    Join Date
    Apr 2006
    Posts
    377
    Thanks for posting back your results.

    Not exactly sure how you are executing the RMAN script, but two examples to get logging to occur are as follows:

    If you have a file called rman.cmd as:

    Code:
    run {
    crosscheck backup completed before 'sysdate-30';
    delete noprompt expired backup completed before 'sysdate-30';
    }
    You can run the command with proper logging using:

    Code:
    rman target / log=/tmp/rman.log @/tmp/rman.cmd
    For the spooling option, you can create a rman.cmd file as (notice NO 'spool log off'):

    Code:
    spool log to /tmp/rman.log;
    run {
    crosscheck backup completed before 'sysdate-30';
    delete noprompt expired backup completed before 'sysdate-30';
    }
    And run it as follows:

    Code:
    rman target / @/tmp/rman.cmd

  5. #15
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Right. I tried it both ways, but in **this case only** spooling inside the script and with the exit prior to "spool log off" is the only way I can get it to spool the output.

    This is not typical behavior. Must be something about the contents of the script .. like noprompt or something.

    I have other rman scripts that behave as expected whether the logging is in the script or on the command line.
    "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