5 Replies Latest reply: Feb 21, 2013 11:42 AM by EdStevens RSS

    Archivelog Restore

    986295
      i have changed the log_archive_dest_1 to another drive (suppose D ) than Oracle installed disk
      created tables in scott ,
      alter system switch logfile;
      so archive log was der in the new destination
      i delete that archivelog from D and pasted to drive E ( cut paste )
      start rman , crosschecked archivelogs
      Now , i want to tell Rman that recover that archivelog from E and then recover

      10.2.0
      win 7

      Thanks
        • 1. Re: Archivelog Restore
          Hemant K Chitale
          The controlfile and RMAN only "know" about the archivelog file in the location it was created (drive D).

          As you have moved the archivelog to another location (drive E), you can "inform" RMAN (and update the controlfile) about the new location with the "CATALOG" command in RMAN. The syntax is "CATALOG START WITH ..directory/folder_that_contains_the_archivelog". (CATALOG can also be used for backuppieces that have been moved from one location to another).

          To remove RMAN's knowledge of the old location (D), run "CROSSCHECK ARCHIVELOG ALL" (or the specific sequence). This causes RMAN to discover that the archivelog is no longer in the expected location. RMAN marks it as "EXPIRED". You can then run "DELETE EXPIRED ARCHIVELOG ALL" to remove the entry for the old location.



          Hemant K Chitale
          • 2. Re: Archivelog Restore
            986295
            One more thing i want to add :


            i have changed the log_archive_dest_1 to another drive (suppose D ) than Oracle installed disk
            created tables in scott ,
            alter system switch logfile;
            so archive log was der in the new destination
            i delete that archivelog from D and pasted to drive E ( cut paste )
            i go to sqlplus as scott , drop all created tables
            now
            Rman>crosscheck archivelog all;
            Rman>catalog start with ' E:\';
            Rman>are you sure to catalog file? -yes

            now, can i recover that tables that i dropped ?  as  i have a copy of archivelog in E

            Thanks

            Edited by: 983292 on Feb 21, 2013 5:10 PM

            Edited by: 983292 on Feb 21, 2013 5:10 PM

            Edited by: 983292 on Feb 21, 2013 5:19 PM
            • 3. Re: Archivelog Restore
              Hemant K Chitale
              You cannot "recover" the dropped tables.
              When you issue a recover database and reapply the archivelog, the DROP TABLE command would also be replayed. The tables would get dropped again before you open the database.

              If you want the tables you need to restore and recover the database to a point in time before the DROP TABLE.


              If, however, you have a RECYCLEBIN enabled, you might be able to recover the dropped tables from the recyclebin. The command would be "FLASHBACK TABLE tablename TO BEFORE DROP; "


              Hemant K Chitale
              • 4. Re: Archivelog Restore
                986295
                Hemant K Chitale wrote:
                You cannot "recover" the dropped tables.
                When you issue a recover database and reapply the archivelog, the DROP TABLE command would also be replayed. The tables would get dropped again before you open the database.
                Thanks !
                but what if i alter system switch log BEFORE the DROPPING table , and saved that archivelog
                even in that case i cant recover?

                Thanks again
                • 5. Re: Archivelog Restore
                  EdStevens
                  983292 wrote:
                  Hemant K Chitale wrote:
                  You cannot "recover" the dropped tables.
                  When you issue a recover database and reapply the archivelog, the DROP TABLE command would also be replayed. The tables would get dropped again before you open the database.
                  Thanks !
                  but what if i alter system switch log BEFORE the DROPPING table , and saved that archivelog
                  even in that case i cant recover?

                  Thanks again
                  When you recover, rman replays the redo stream, starting with the first archivelog after the restored backup. If you do not do a point in time recovery, it will replay all of the redo up through and including the online redologs. If your DROP TABLE command is in that redo stream, it will be executed and your table will once again be dropped.

                  If you specify your recovery to recover to a point in time prior to the time you dropped the table, the recovery begins the same way but stops at the specified time. You would have your tables back, but you would have lost ALL transaction activity that occurred after the specified point in time.