9 Replies Latest reply: Feb 12, 2006 12:26 AM by 10438 RSS

    RMAN> backup archivelog all delete input

    10438
      Hello DBAs,

      what does this command will do?

      RMAN> backup archivelog all delete input;

      DN
        • 1. Re: RMAN> backup archivelog all delete input
          376714
          Hi,

          It will backup all required archivelogs to the default configured channel. Every successfully backed up archivelog will be deleted from it's source directory. And the command will globally fail if there are missing archive files.

          Regards,

          Yoann.
          • 2. Re: RMAN> backup archivelog all delete input
            10438
            Yoann,

            Actually, we run this script when our Database is down due to redo log files become full.

            Is it normal process?

            Regards,
            DN
            • 3. Re: RMAN> backup archivelog all delete input
              488266
              Hi,

              why is your DB down due to full redo log ?
              don't you have automatic archive on ?
              this process will free some spaces on the device that holds the archived redo logs,
              so if your db was hang due to lack of free space , yes this could help.
              • 4. Re: RMAN> backup archivelog all delete input
                10438
                I wanted to put this code in the cron job.
                (RMAN> backup archivelog all delete input;)

                It can automatically run after every 48 hours.

                How do I setup cron job for this?

                DN
                • 5. Re: RMAN> backup archivelog all delete input
                  488604
                  48 hours meaning every other day.


                  minute (0-59),
                  hour (0-23),
                  day of the month (1-31),
                  month of the year (1-12),
                  day of the week (0-6 with 0=Sunday).

                  Each of these patterns may be either an asterisk (meaning
                  all legal values) or a list of elements separated by commas.
                  An element is either a number or two numbers separated by a
                  minus sign (meaning an inclusive range). Notice that the
                  specification of days may be made by two fields (day of the
                  month and day of the week). Both are adhered to if specified
                  as a list of elements. See EXAMPLES.

                  This will run every other day starting Sun at 12 midnight.

                  00 00 * * 0,2,4,6 /scripts.ksh
                  • 6. Re: RMAN> backup archivelog all delete input
                    10438
                    I have set cron job for RMAN> backup archivelog all delete input; and its work.

                    But I got following message in my log file.
                    Please give ur feed back.


                    Recovery Manager: Release 10.1.0.4.0 - 64bit Production

                    Copyright (c) 1995, 2004, Oracle. All rights reserved.

                    RMAN>
                    connected to target database: SIDNAME (DBID=XXXXXXXX)
                    using target database controlfile instead of recovery catalog

                    RMAN>
                    Starting backup at 10-FEB-06
                    current log archived
                    allocated channel: ORA_DISK_1
                    channel ORA_DISK_1: sid=269 devtype=DISK
                    allocated channel: ORA_DISK_2
                    channel ORA_DISK_2: sid=268 devtype=DISK
                    channel ORA_DISK_1: starting compressed archive log backupset
                    channel ORA_DISK_1: specifying archive log(s) in backup set
                    input archive log thread=1 sequence=5701 recid=2412 stamp=581958928
                    input archive log thread=1 sequence=5702 recid=2413 stamp=581961105
                    input archive log thread=1 sequence=5703 recid=2414 stamp=581964532
                    input archive log thread=1 sequence=5704 recid=2415 stamp=582025325
                    input archive log thread=1 sequence=5705 recid=2416 stamp=582029976
                    input archive log thread=1 sequence=5706 recid=2417 stamp=582031922
                    channel ORA_DISK_1: starting piece 1 at 10-FEB-06
                    channel ORA_DISK_2: starting compressed archive log backupset
                    channel ORA_DISK_2: specifying archive log(s) in backup set
                    input archive log thread=1 sequence=5707 recid=2418 stamp=582037207
                    input archive log thread=1 sequence=5708 recid=2419 stamp=582038471
                    input archive log thread=1 sequence=5709 recid=2420 stamp=582043538
                    input archive log thread=1 sequence=5710 recid=2421 stamp=582048518
                    input archive log thread=1 sequence=5711 recid=2422 stamp=582055205
                    channel ORA_DISK_2: starting piece 1 at 10-FEB-06
                    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/10/2006 18:00:
                    12
                    ORA-19502: write error on file "/u02/backup/backup_6ehb2t97_1_1", blockno 6145 (
                    blocksize=512)
                    ORA-27063: number of bytes read/written is incorrect
                    IBM AIX RISC System/6000 Error: 28: No space left on device
                    Additional information: -1
                    Additional information: 1048576
                    channel ORA_DISK_1 disabled, job failed on it will be run on another channel
                    RMAN-03009: failure of backup command on ORA_DISK_2 channel at 02/10/2006 18:00:
                    12
                    ORA-19502: write error on file "/u02/backup/6fhb2t97_1_1", blockno 6145
                    (blocksize=512)
                    ORA-27063: number of bytes read/written is incorrect
                    IBM AIX RISC System/6000 Error: 28: No space left on device
                    Additional information: -1
                    Additional information: 1048576
                    channel ORA_DISK_2 disabled, job failed on it will be run on another channel
                    RMAN-00571: ===========================================================
                    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                    RMAN-00571: ===========================================================

                    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/10/2006 18:00:
                    12
                    ORA-19502: write error on file "/u02/backup/backup_6ehb2t97_1_1", blockno 6145 (
                    blocksize=512)
                    ORA-27063: number of bytes read/written is incorrect
                    IBM AIX RISC System/6000 Error: 28: No space left on device
                    Additional information: -1
                    Additional information: 1048576

                    RMAN>

                    Recovery Manager complete.

                    DN
                    • 8. Re: RMAN> backup archivelog all delete input
                      490082
                      One thing I do not understand is why you are trying to write archivelog backup using RMAN to a disk again ?.

                      Is this a separate disk or are you just backing up to the same disk ?

                      RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/10/2006 18:00:
                      12
                      ORA-19502: write error on file "/u02/backup/backup_6ehb2t97_1_1", blockno 6145 (
                      blocksize=512)
                      ORA-27063: number of bytes read/written is incorrect
                      IBM AIX RISC System/6000 Error: 28: No space left on device]


                      Message above indicates that /u02 is full and needs to be cleaned up before the job can proceeed.

                      Do you really need these archive logs ?.. Whats your backup strategy ?

                      Oracle_King
                      • 9. Re: select * from V$RECOVERY_FILE_DEST;
                        10438
                        King,

                        Actually I just take role in the existing project.
                        Here what we are doing.

                        We do Backup of XYZ schema everyday 1:00 AM PST.
                        Database Dump will be created in /u02 directory of our server

                        Then we need to move XYZ schema dump to BOX 2 manually in 'binary' or 'auto' mode.

                        [ Once a week - using Xmanager or Putty or FTP ].

                        Probably I need to move dmp files first and then run
                        RMAN> backup archivelog all delete input;



                        DN