5 Replies Latest reply: Oct 6, 2009 1:46 AM by asifkabirdba RSS

    Can't backup control file

    Salman Qureshi
      hi
      i run the following command

      RMAN> BACKUP CURRENT CONTROLFILE TO 'c:\control.bak';

      This statement returns me following error message stack

      ********************************
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-00558: error encountered while parsing input commands
      RMAN-01009: syntax error: found "single-quoted-string": expecting one of: "destination"
      RMAN-01007: at line 1 column 32 file: standard input
      ********************************

      I really dont know whats going on. I dont think that syyntx is wrong.

      I am facing this error on oracle 10g release 2 and also on oracle 9i release 2.

      Follwoing command runs fine.

      RMAN> backup current controlfile;

      Can any one help mein this regard?

      Regards
        • 1. Re: Can't backup control file
          ebrian
          You can use:
          RMAN> backup as copy current controlfile format 'c:\control.bak';
          • 2. Re: Can't backup control file
            Salman Qureshi
            Ok, i will use it but the questions is that why the statement i am executing, fails. Does it run at your end? Same syntex is give in documentation.

            I am actually trying a backup and restore operation before upgrading a DB and restoring if up gradation fails.

            RUN
            {
            ALLOCATE CHANNEL chan_name TYPE DISK;
            BACKUP DATABASE FORMAT 'c:\backup%U' TAG before_upgrade;
            BACKUP CURRENT CONTROLFILE TO 'save_controlfile_location';
            }

            It must run, but i amend the statement and write as follows

            RUN
            {
            ALLOCATE CHANNEL chan_name TYPE DISK;
            BACKUP DATABASE FORMAT 'c:\backup%U' TAG before_upgrade;
            BACKUP CURRENT CONTROLFILE;
            }

            It backs up controlfile to a default location in recovery area.
            E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PUCIT10\BACKUPSET\2007_03_22\O1_MF_NCNNF_TAG20070322T230515_305KBWH5_.BKP

            After backup, i try to restore the database as follows

            STARTUP NOMOUNT
            RUN
            {
            REPLICATE CONTROLFILE FROM 'E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PUCIT10\BACKUPSET\2007_03_22\O1_MF_NCNNF_TAG20070322T230515_305KBWH5_.BKP';
            ALTER DATABASE MOUNT;
            RESTORE DATABASE FROM TAG before_upgrade
            ALTER DATABASE OPEN RESETLOGS;
            }

            Now this command fails with the following error

            ******************************************************
            using channel ORA_DISK_1
            replicating control file
            input filename=E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PUCIT10\BACKUPSET\2007_03_22\O1_MF_NCNNF_TAG20070322T230515_305KBWH5_.BKP
            output filename=E:\ORACLE\ORADATA\PUCIT10\CONTROL01.CTL
            RMAN-00571: ===========================================================
            RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
            RMAN-00571: ===========================================================
            RMAN-03009: failure of replicate command on ORA_DISK_1 channel at 03/22/2007 23:13:58
            ORA-19563: control file header validation failed for file E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PUCIT10\BACKUPSET\2007_03_22\O1_MF_NCNNF_TAG20070322T230515_305KBWH5_.BKP
            ORA-19600: input file is control file (E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\PUCIT10\BACKUPSET\2007_03_22\O1_MF_NCNNF_TAG20070322T230515_305KBWH5_.BKP)
            ORA-19601: output file is control file (E:\ORACLE\ORADATA\PUCIT10\CONTROL01.CTL)
            ******************************************************

            Can you guide me how to test my backup and restore?

            Regards
            • 3. Re: Can't backup control file
              ebrian
              You backup database command (BACKUP DATABASE FORMAT 'c:\backup%U' TAG before_upgrade;) should create a backup of your controlfile for you automatically. Did you try restoring from that version?

              In addition, the command:
              RMAN> BACKUP CURRENT CONTROLFILE TO 'c:\control.bak';
              seems to be a documentation bug. The following should work:
              RMAN> BACKUP CURRENT CONTROLFILE FORMAT 'c:\control.bak';
              • 4. Re: Can't backup control file
                685663
                I tried on my oracle 11g system

                backup current controlfile to 'c:\app\ctl01.bak'; does not work

                and backup current controlfile format 'c:\app\ctl01.bak'; works filne,
                • 5. Re: Can't backup control file
                  asifkabirdba
                  backup format '/oracle/rman_backup/RMAN_CTL_TST<%s:%t:%p>.bkp' current controlfile;


                  Works fine on 10.2.0.1.0


                  Regards
                  Asif Kabir