1 2 Previous Next 16 Replies Latest reply: Sep 25, 2013 11:01 PM by yxes2013 RSS

    Recreate deleted archivelog

    yxes2013

      Hi all,

       

      Aix 6.1

      11.2.0.1

       

      Hi all,

       

      I have accidentally deleted 1 archivelog which was not yet applied to the DR site.

      How do I recreate this 1 archivelog?

       

       

       

      Thanks,

      zxy

        • 1. Re: Recreate deleted archivelog
          sybrand_b

          You don't. You recreate your standby database.

          Please explain me: what makes you think it is possible?

           

          ---------

          Sybrand Bakker

          Senior Oracle DBA

          • 2. Re: Recreate deleted archivelog
            Eduardo Legatti

            Hi,

             

            I'm not sure if you need to worry about that. Your configuration are using  ARCn or LGWR? On the primary database, Oracle Data Guard uses archiver processes (ARCn) or the log writer process (LGWR) to collect transaction redo data and transmit it to standby destinations. Using the LGWR process differs from ARCn processing because instead of waiting for the online redo log to switch at the primary database and then writing the entire archived redo log at the remote destination all at once, the LGWR process selects a standby redo log file at the standby site that reflects the log sequence number (and size) of the current online redo log file of the primary database. Then, as redo is generated at the primary database, it is also transmitted to the remote destination. Are you having problems with gaps?

             

            For more information take a look at documentation.

             

            Cheers

             

            Legatti


            • 3. Re: Recreate deleted archivelog
              Hemant K Chitale

              However, he might be using ARCH to transmit redo archivelogs, in which case a gap can be significant.  He'd need to restore the archivelog from a backup  (deleting an archivelog before it is backed up is a sin).

               

              Hemant K Chitale


              • 4. Re: Recreate deleted archivelog
                yxes2013

                It was deleted by retention policy

                 

                So even if it is 1 archivelog I need to do encremental backup and update everything the DR site? for example I have 101 archivelogs the the 1st was deleted. so the remaining next 100 is useless?

                 

                 

                Thanks

                • 5. Re: Recreate deleted archivelog
                  yxes2013

                  Yeah I have problems with Gaps

                   

                  https://app.box.com/s/t9vi3nuroopm6di52kvm

                  • 6. Re: Recreate deleted archivelog
                    Hemant K Chitale

                    Surely you would have a backup before a deletion  ?  Backups would be running frequently enough to avoid this.

                     

                    If you don't have a backup of the archivelog, you need to refresh the standby with either an incremental backup from the primary or a full backup from the primary.

                     

                    As for the question :

                    >for example I have 101 archivelogs the the 1st was deleted. so the remaining next 100 is useless?

                    Do a simple thought experiment.  The Archivelogs have transactions.  Transactions make use of data in the database.  If one transaction inserted a new employee in the EMPLOYEES table and another (later) transaction updated his salary but you lose the archivelog containing the INSERT of the employee, can you apply the archivelog containing the Update ?

                    How many transactions would one archivelog have ?  How many  subsequent transactions would depend on the missing transactions ?

                     

                    Hemant K Chitale

                     


                    • 7. Re: Recreate deleted archivelog
                      yxes2013

                      Thanks Hemant Sir! for the clear explanation.

                       

                      I searched google and I found only  refresh standby using incremental backup. But I can not find refresh standby using full backup. I want to do the latter, can you please give me the procedure on how to do it or some links maybe?

                      • 8. Re: Recreate deleted archivelog
                        Hemant K Chitale

                        You refresh the standby using a full backup in the same way that you do when you *create* the standby.  The only differences now are

                        a) You don't have to recreate the listener.ora and tnsnames.ora entries

                        b) You don't have to recreate the standb parameter file (pfile or spfile)

                         

                        http://docs.oracle.com/cd/E11882_01/server.112/e41134/create_ps.htm#i63561

                         

                         

                        Hemant K Chitale

                        • 9. Re: Recreate deleted archivelog
                          yxes2013

                          Ouch that is so complicated, I better use the incremental one.

                           

                          Thanks

                          • 10. Re: Recreate deleted archivelog
                            Hemant K Chitale

                            Well, actually the incremental method is more "complicated".

                             

                            But you choose to not read the documentation. 

                             

                             

                            Frankly, your manager should be questioned by the CIO.

                             

                            Hemant K Chitale


                            • 11. Re: Recreate deleted archivelog
                              yxes2013

                              Thanks  but the CIO is partly to blame why I can not implement it. I am asking for test/lab server for testing first before I do it in PROD, but they just seems no resource available.

                              It is very hard to setup and AIX environment. I wish they have used linux so I can just use the laptop.

                              • 12. Re: Recreate deleted archivelog
                                4641c7a2-fced-4501-92ad-3593c0fcd911

                                it is very easy to apply incremental backup to standby ...check below steps.  i did several times.

                                 

                                On standby:

                                Sql> select to_char (current_scn) from v$database;

                                 

                                On production (c) :

                                 

                                rman>backup incremental from scn 914451255000 database format '/dbbackup/back_inc_aug18/forstandby_%U' tag 'standby';

                                 

                                rman>backup current controlfile for standby format '/dbbackup/back_inc_aug18/control_stby.ctl';

                                 

                                 

                                on standby:

                                 

                                shutdown immediate

                                startup nomount

                                connect rman using : rman target /

                                rman>restore standby controlfile from '/dbbackup/back_inc_aug18/control_stby.ctl';

                                rman>sql 'alter database mount standby database;

                                 

                                catalog the backup pieces

                                RMAN> CATALOG START WITH '/dbbackup/back_inc_aug18/';

                                rman> recover database noredo;

                                 

                                i hope above steps will resolve your issue.


                                • 13. Re: Recreate deleted archivelog
                                  yxes2013

                                  Thanks dear,

                                   

                                  Can you test also full rman backup apply to standby to sync it? The docs really confused me a lot.

                                   

                                  Thanks

                                  • 14. Re: Recreate deleted archivelog
                                    Eduardo Legatti

                                    Hi,

                                     

                                    It was deleted by retention policy

                                     

                                    This is very strange. According to documentation archived redo logs are not eligible for deletion until all the consumers of the logs have satisfied their requirements. Consumers of logs can include RMAN, standby databases, Oracle Streams databases, and the Flashback Database feature.

                                     

                                    Cheers

                                     

                                    Legatti

                                    1 2 Previous Next