7 Replies Latest reply: Mar 4, 2013 12:57 PM by user2857110 RSS

    Taking cold backup of  DB in ARCH MODE  to another server & applying logs

    user2857110
      I have a 9i DB in archivelog mode on Windows 2003 SP1 (Dell 6650) . I took this database down cold. I had my server tech platespin an image of the local drives and lay them down on a new server Windows 2003 SP2 ( Dell R610)

      I had my SAN guy image the LUNS and attach them to the new server. We also renamed the server and IP of the new server, but the database names are the same. We shut the old server down completely before bringing up the new server.

      Once on the new server the database comes up fine and its a copy of the database on the old server. Now I had the application person enter a few transactions on the new database and after that I switched the log file to cut a couple of archivelogs.

      Then I shut this database down cold , copied my logs out to a safe place and shut down my new server.

      I then started the old server and the database came up clean as i thought it would. I now want to apply my archivelogs logs I cut on the new server to the old server. I brought the old server DB up on startup mount and gave the recover database using backup controlfile unitl cancel.

      Oracle asked for the first log then the second. Then I got an error about my undotablespace not being in sync.

      what should I have done? Could I have also copied the redo logs from the new db to the old db and then started my recovery?

      I am basically doing this because I want to take my database to new hardware, and once there if I have pereformance issues, I want to be able to bring the new DB down cold and go back to the old server with my new server logs and roll forward.

      I have thought that if I wanted to go back after I have the DB on the new hardware it might be easier to shut the new DB down cold and then clone it back tot he old server.

      Please any ideas? I need a proven back out plan once I go to the new server .

      Edited by: user2857110 on Mar 2, 2013 11:34 AM

      Edited by: user2857110 on Mar 2, 2013 11:40 AM
        • 1. Re: Taking cold backup of  DB in ARCH MODE  to another server & applying logs
          Justin_Mungal
          >
          I then started the old server and the database came up clean as i thought it would. I now want to apply my archivelogs logs I cut on the new server to the old server. I brought the old server DB up on startup mount and gave the recover database using backup controlfile unitl cancel.
          Did you actually open the database on the old server, or just mount it? If you opened it, I'm pretty sure that is what caused things to go out of sync.

          What version and edition of Oracle are you using? Can you paste the error message here?
          • 2. Re: Taking cold backup of  DB in ARCH MODE  to another server & applying logs
            ***Anuj***
            I understand you want to go back to your old server.This is not supported way and there are better ways to do this.Try below steps if it does not resolve your problem then you have to restore cold backup from new server to old server.

            1. shut down database on old server.
            2. take cold backup of database on old server
            3. shutdown database on new server and copy all new archivelogs /redo logs and control file to old server.
            4. mount database on old server using controlfile you brought from new server.
            5. Run recovery.it may ask for all the archivelog you transfered.if it is asking for a archivelog which you do not have provide full path of redo log file you brought from new server.

            HTH
            Anuj
            http://www.oracle-12c.com/
            • 3. Re: Taking cold backup of  DB in ARCH MODE  to another server & applying logs
              Justin_Mungal
              ***Anuj*** wrote:
              I understand you want to go back to your old server.This is not supported way and there are better ways to do this.Try below steps if it does not resolve your problem then you have to restore cold backup from new server to old server.

              1. shut down database on old server.
              2. take cold backup of database on old server
              3. shutdown database on new server and copy all new archivelogs /redo logs and control file to old server.
              4. mount database on old server using controlfile you brought from new server.
              5. Run recovery.it may ask for all the archivelog you transfered.if it is asking for a archivelog which you do not have provide full path of redo log file you brought from new server.

              HTH
              Anuj
              http://www.oracle-12c.com/
              Did you see that he already opened the database on the old server?
              • 4. Re: Taking cold backup of  DB in ARCH MODE  to another server & applying logs
                ***Anuj***
                I understand he got error when he was trying to open..

                HTH
                Anuj
                http://www.oracle-12c.com/
                • 5. Re: Taking cold backup of  DB in ARCH MODE  to another server & applying logs
                  Justin_Mungal
                  I think he already opened it:

                  >
                  I then started the old server and the database came up clean as i thought it would. I now want to apply my archivelogs logs I cut on the new server to the old server. I brought the old server DB up on startup mount and gave the recover database using backup controlfile unitl cancel.
                  • 6. Re: Taking cold backup of  DB in ARCH MODE  to another server & applying logs
                    user2857110
                    So when I do some work on the new server, it updates the controlfiles, redo and might have cut an archive log. So at this point I have changed my new database from the old database, and the only way to go back to the old server is to bring everything over.

                    this morning I took my files from the new server back to the old server. I brought the DB up in mount and applied the logs , then stopped recovery and reset the logs.

                    this seems to work fine.
                    • 7. Re: Taking cold backup of  DB in ARCH MODE  to another server & applying logs
                      user2857110
                      1. shut down database on old server.
                      2. take cold backup of database on old server
                      3. shutdown database on new server and copy all new archivelogs /redo logs and control file to old server.
                      4. mount database on old server using controlfile you brought from new server.
                      5. Run recovery.it may ask for all the archivelog you transfered.if it is asking for a archivelog which you do not have provide full path of redo log file you brought from new server.


                      could you expand on item 4?

                      My command that I was using RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;

                      I then applied all the logs , issues a cancel recovery statement and reset the logs.