5 Replies Latest reply on Aug 18, 2017 2:41 PM by Kris Rice-Oracle

    How to back out ORDS upgrade

    R Hachem

      I recently upgraded from 3.0.9 to 3.0.11 in my Dev and Test environment.  Everything is working great.  Planning to do Prod but want a backout plan in case something doesn't pan out.

       

      When you run 'java -jar ords.war install advanced', it asks you to log in and then it says this:

      "Upgrading Oracle REST Data Services schema 3.0.9.348.07.16 to version 3.0.11.180.12.34"

      I'm assuming it's referring to the ORDS_METADATA schema, although it does not specifically say so.

       

      I imagine there aren't many changes in the schema from 3.0.9 to 3.0.11 but for the sake of argument, let's say that ORDS 3.0.9 isn't compatible with the updated ORDS_METADATA schema from 3.0.11 (and vice versa).

      Would I be able to export the ORDS_METADATA schema from the database while running ORDS 3.0.9 and then if I needed to revert 3.0.11 --> 3.0.9, would I be able to re-import that schema?

      (I wouldn't want to have to restore an entire 500GB database just to undo a minor ORDS upgrade)

        • 1. Re: How to back out ORDS upgrade
          thatJeffSmith-Oracle

          3.0.10 and 3.0.11 have just a few bug fixes and no changes to the ORDS repository in your database.

           

          You could test a backport by just starting up a 3.0.9 standalone copy of ORDS against your database on a different port to try things out.

          • 2. Re: How to back out ORDS upgrade
            R Hachem

            Section 1.8 of the "REST Data Services Installation, Configuration and Development Guide" states the following:

            "If the installed version is an earlier 3.0.n version of Oracle REST Data Services, you are prompted for the SYS credentials to enable Oracle REST Data Services to apply the in-place upgrade. The in-place upgrade will modify the existing installation to add the updated schema objects and packages. The existing metadata stored in the ORDS schema will remain intact."

             

            However, no back-out/backup recommendation is given.  As a longtime DBA, I know that things may work just fine 9 out of 10 times, but eventually you end up with something that doesn't work as planned and needs to be backed out.  Taking a back-up of the ORDS executables is easy.  You just copy the files somewhere.  However, what is the recommendation for the database schemas used by ORDS?  It seems to me that exporting the ORDS_METADATA schema should work but without knowing the internals of what the upgrade actually does, I can't say for sure.

            • 3. Re: How to back out ORDS upgrade
              Kiran Pawar

              Hi R Hachem,

              R Hachem wrote:

               

              Section 1.8 of the "REST Data Services Installation, Configuration and Development Guide" states the following:

              "If the installed version is an earlier 3.0.n version of Oracle REST Data Services, you are prompted for the SYS credentials to enable Oracle REST Data Services to apply the in-place upgrade. The in-place upgrade will modify the existing installation to add the updated schema objects and packages. The existing metadata stored in the ORDS schema will remain intact."

               

              However, no back-out/backup recommendation is given. As a longtime DBA, I know that things may work just fine 9 out of 10 times, but eventually you end up with something that doesn't work as planned and needs to be backed out. Taking a back-up of the ORDS executables is easy. You just copy the files somewhere. However, what is the recommendation for the database schemas used by ORDS? It seems to me that exporting the ORDS_METADATA schema should work but without knowing the internals of what the upgrade actually does, I can't say for sure.

              Totally agree with you. Oracle APEX has metadata schema (APEX_XXXXXX) where XXXXXX varies according to the version number, so the metadata remains intact during upgrade. We can revert back to old metadata and Oracle APEX versions as required (in case of failed upgrade). We should have similar mechanism for downgrading the Oracle REST Data Services.

              thatJeffSmith-Oracle, Kris Rice-Oracle : Do we have site where we can ask for feature requests for ORDS? like for Oracle APEX.

               

              Regards,

              Kiran

              • 4. Re: How to back out ORDS upgrade
                Kiran Pawar

                Hi R Hachem,

                R Hachem wrote:

                 

                Section 1.8 of the "REST Data Services Installation, Configuration and Development Guide" states the following:

                "If the installed version is an earlier 3.0.n version of Oracle REST Data Services, you are prompted for the SYS credentials to enable Oracle REST Data Services to apply the in-place upgrade. The in-place upgrade will modify the existing installation to add the updated schema objects and packages. The existing metadata stored in the ORDS schema will remain intact."

                 

                However, no back-out/backup recommendation is given. As a longtime DBA, I know that things may work just fine 9 out of 10 times, but eventually you end up with something that doesn't work as planned and needs to be backed out. Taking a back-up of the ORDS executables is easy. You just copy the files somewhere. However, what is the recommendation for the database schemas used by ORDS? It seems to me that exporting the ORDS_METADATA schema should work but without knowing the internals of what the upgrade actually does, I can't say for sure.

                In addition to the above just want to say this:

                There is no downgrading option currently available for Oracle REST Data Services. There is workaround how you can achieve this:

                • Backup the RESTful Services you have developed in ORDS 3.0.9 (it will be a SQL file with DML statements). (You can use Oracle SQL Developer or Oracle SQLcl)
                • Upgrade the ORDS 3.0.9 to ORDS 3.0.11.

                If there is issue you have do the following:

                • Cleanup the ORDS 3.0.11 installation using java -jar ords.war uninstall (Refer: Installing Oracle REST Data Services )
                • Re-install ORDS 3.0.9
                • Deploy the back-up of the RESTful Web Services

                 

                Hope this helps!

                 

                Regards,

                Kiran

                • 5. Re: How to back out ORDS upgrade
                  Kris Rice-Oracle

                  You can/should do a database export / datapump of the ords_metadata schema. Then put that back if needed to 'downgrade' backwards, with that said in the 3.0.x code line there has only been a couple plsql bug fixes and no schema changes.

                   

                  -kris