12 Replies Latest reply on Nov 16, 2016 8:18 AM by 927578

    Doubt

    927578

      Hi,

      I want to open standby database in read write mode.

       

      So I followed below links

       

      https://oracleracdba1.wordpress.com/2012/10/10/how-to-open-physical-standby-database-in-read-write-mode/

       

       

      Now my standby database role also showing primary . but I want revert it back change to standby as a standby database and apply all archive logs from production.how to do .. pls advice .

       

       

      Please note that I didn't change anything in original primary database

        • 1. Re: Doubt
          John Thorton

          927578 wrote:

           

          Hi,

          I want to open standby database in read write mode.

           

          So I followed below links

           

          https://oracleracdba1.wordpress.com/2012/10/10/how-to-open-physical-standby-database-in-read-write-mode/

           

           

          Now my standby database role also showing primary . but I want revert it back change to standby as a standby database and apply all archive logs from production.how to do .. pls advice .

           

           

          Please note that I didn't change anything in original primary database

          when all else fails Read The Fine Manual

           

          https://docs.oracle.com/database/121/SBYDB/toc.htm

          • 2. Re: Doubt
            927578

            Thx john.. it's bit urgent .. will read later .

             

            Can you please provide steps now .. plz

            • 3. Re: Doubt
              John Thorton

              927578 wrote:

               

              Thx john.. it's bit urgent .. will read later .

               

              Can you please provide steps now .. plz

              Please explain why it is urgent for me to solve this issue for you?

               

              The lack of planning on your part, does NOT constitute an emergency on my part.

              • 4. Re: Doubt
                AJ

                The only way would be to utilize flashback database on standby and flash it back to a point before you opened with read-write.

                 

                AJ

                • 5. Re: Doubt
                  John Stegeman

                  I'll be happy to give you urgent assistance once you've paid the consulting fees for urgent help.

                  • 6. Re: Doubt
                    927578

                    I said it's urgent for me that doesn't mean that I'm forcing you.. if you like to help ..help me else leave it..

                     

                     

                    AJ,

                     

                    Thanks ..can I follow below link

                     

                     

                    https://easyoradba.com/tag/convert-primary-to-standby/

                    • 7. Re: Doubt
                      AJ

                      On things like this (where you can break something) - I only trust Oracle documentation for the exact version I'm using and having done in a test environment first.

                       

                      My Oracle support has a nice document that goes through this: "How To Open Physical Standby For Read Write Testing and Flashback (Doc ID 805438.1)"

                       

                      However, I would prefer to use snapshot standby for cases like this.

                       

                      AJ

                      1 person found this helpful
                      • 8. Re: Doubt
                        ddf_dba

                        You have performed a failover so what was your standby is now your primary.  You also performed a failover in a manner NOT recommended by Oracle; read here:

                         

                        https://docs.oracle.com/cd/E11882_01/server.112/e41134/sql_stmts.htm#SBYDB4904

                         

                        Oracle states:

                         

                        "ACTIVATE [PHYSICAL|LOGICAL] STANDBY DATABASE FINISH APPLY]

                        Performs a failover. The standby database must be mounted before it can be activated with this statement.

                        Note: Do not use the ALTER DATABASE ACTIVATE STANDBY DATABASE statement to failover because it causes data loss. Instead, use the following best practices:

                        • For physical standby databases, use the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement with the FINISH keyword to perform the role transition as quickly as possible with little or no data loss and without rendering other standby databases unusable.
                        • For logical standby databases, use the ALTER DATABASE PREPARE TO SWITCHOVER and ALTER DATABASE COMMIT TO SWITCHOVER statements."

                         

                        Sometimes blog posts aren't the best source of information; yes, the command works (as you have found out) but the post says NOTHING with regard to executing a failover to get your standby into read write mode. You now have no standby; you will need to create a new standby, and I'm fairly certain that is NOT what you wanted to do.  Had you read the documentation instead of some unknown blog post by a DBA you are not familiar with you would done some research and decided to perform a switchover, to test the Data Guard configuration and temporarily put your standby in read write mode.  Of course that makes your primary the standby until you execute another switchover but you would not have lost your primary/standby configuration.  Also, had you read the documentation (especially the section quoted above) you would have realized this is a change you can't simply undo.  Yes, what was your standby is now in read write mode but it's also your primary database, which is something you hadn't expected.  Honestly the title on that blog post is misleading, at best, and completely wrong at worst, as it doesn't put your standby in read write mode it makes it your new primary.

                         

                        You cannot have both the primary and standby in read write mode at the same time; you either switch roles for a period of time or you completely lose your standby altogether, which is where you are right now.  At this point you have no other choice but to recreate the standby database on the server where the primary used to be; after a failover you can't just go back to where  you were.

                         

                         

                        David Fitzjarrell

                        1 person found this helpful
                        • 9. Re: Doubt
                          mseberg

                          In the future i would look at this as a better option:

                           

                           

                          http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/ha/dataguard/usingsnapshot/usingsnapshot.htm

                           

                          Make sure you have flashback setup correctly before jumping in.

                           

                          Best Regards

                           

                          mseberg

                          1 person found this helpful
                          • 10. Re: Doubt
                            927578

                            Thank you so much.. my flashback also disabled. So I decided to create new standby with same same . can I delete current database using  dbca and restore from prod backup or is there any way to create new standby. I need it in same name.

                            • 11. Re: Doubt
                              Shivananda Rao
                              can I delete current database using  dbca and restore from prod backup or is there any way to create new standby. I need it in same name.

                               

                              When you say "delete current database", does that mean you are pointing to the standby database ?

                              If you would like to recreate the standby database, then please follow the documentation. Moreover, the physical standby database would be of the same name as that of the primary.

                               

                               

                              -- Shivananda Rao

                              • 12. Re: Doubt
                                927578

                                Thanks. i created new standby  database