5 Replies Latest reply on Jun 2, 2014 2:13 PM by Baerenmarke

    ORACLE XE v11.2, Moving the entire database to a new XE instance

    Baerenmarke

      At the Moment I'm running Oracle XE on a Windows Laptop.

       

      In two or three weeks I will receive a new server that will have another XE instance running on the Solaris platform.

      The present database on the Laptop must be moved to the new 64bit machine, once completed the instance on the Laptop will be dropped.

       

      What in your opinion is the best strategy to accomplish this.

       

      Kind regards.

      - Wilfried

        • 1. Re: ORACLE XE v11.2, Moving the entire database to a new XE instance
          Bas de Klerk

          Hi Wilfried,

           

          Oracle XE is not available on Solaris ( only on windows/32 and Linux/64 ) so you can't do that.

          You could consider buying a standard edition one license ( the cheapest one ) or something like that and migrate your database to SE1 on solaris or install a supported linux/64 distro on your hardware.

          The standard procedure for such a platform and database edition change is a full database export and import.

           

          Cheers

            Bas

          • 2. Re: ORACLE XE v11.2, Moving the entire database to a new XE instance
            Paul M.

            Another way might be :

             

            - take a cold RMAN backup of your actual XE database

            - install Virtualbox on your new machine

            - create a Windows virtual machine (32 bit)

            - install XE on it

            - restore your XE database.

            • 3. Re: ORACLE XE v11.2, Moving the entire database to a new XE instance
              clcarter

              And another possibility ... get a trace file backup of the controlfile and do a shutdown at the source instance, be totally sure its a "good, sane" (e.g. shutdown immediate; *not* a shutdown abort;) so that no oracle processes are touching the datafiles.

               

              Copy all source datafiles, *just* datafiles, to the new host- do a startup nomount and recreate on the controlfile(s). The entire process does not take much longer than copying the files to the new host. Its a trivial exercise, after doing it a couple times. See the trace file generated from a (system connection, or any user with the DBA role, an 'as sysdba' connection works as well):

               

              alter database backup controlfile to trace resetlogs;

               

              And the .trc file generated (look for the newest .trc file at the background_dump_dest folder) has all the bits needed to recreate the controlfile(s). Simply adjust the At the new instance, if there is/are files at the controlfile(s) location(s) they will have to be moved or deleted to get them out of the way, or the instance will bark when the create controlfile... step is run.  The only trick is naming the list of DATAFILE lines to point at the correct copied file locations. Also if a change to the db_name parameter is wanted, a create controlfile action is the way to do it, a simple adjustment to the create controlfile reuse ... bit, change REUSE to  SET and in place of the ORACLE_SID in use at the old instance, put the value of the new db_name in double quotes.

               

              And if the process blows up for any reason, simply shutdown abort and move/rename the controlfile(s) (if the last try got that far) and try again. After fixing what ever caused the blow up, of course

               

              The rman method per Paul M. is also good practice. The worst time to try learning how to use the backup and restore utilities is when they are actually needed. Restoring to a new target instance makes for a good thing to have in your back pocket under the "experience" category. And verifying that your backups are good and usable is also a very very "good thing to do" from time to time.

              • 4. Re: ORACLE XE v11.2, Moving the entire database to a new XE instance
                Paul M.

                And verifying that your backups are good and usable is also a very very "good thing to do" from time to time.

                Agree... that's one of my "main" activities in my tens of Oracle databases

                • 5. Re: ORACLE XE v11.2, Moving the entire database to a new XE instance
                  Baerenmarke

                  Thanks to all for your valuable Information.

                   

                  I decided to put v12c on the new Server along with a 5-user license pack.

                  as well as a production system on one server.

                   

                  Once the Server is up I will test your recommendations and I'm sure everything will be fine.

                   

                  Kind Regards.

                  - Wilfried