4 Replies Latest reply: Mar 27, 2014 11:21 AM by Shreesha RSS

    Rollback procedure for APEX code deployment

    Shreesha

      Guys,

       

      I need your help.

       

      All i need to know is - how can i roll back the changes deployed into production?

       

      For ex: We have the apex code & some db changes, deployed into production. Had there been a problem, we need to back out the changes deployed, so that production can be brought back into the previous working status.

       

      How could this be possible please?

       

      Any help would be greatly appreciate.

       

      Thank you

        • 1. Re: Rollback procedure for APEX code deployment
          Roel Hartman

          Regarding the APEX side of things: Running the previous install (export) file is the only option. Because the export starts with deleting the old application .... and then installs the newer version.

          • 2. Re: Rollback procedure for APEX code deployment
            Shreesha

            Thanks Roel for the speedy response. :-)

             

            Just to understand your response completely -

             

            1. Created a product release pack. This contains exported pages and some DB changes.

            2. Deployed into production on 27/03/2014 for example.

            3. All went well.

            4. After a week we have another release -03/04/2014 .

            5. Prepared the release pack - again it contains some pages and db changes.

            6. Things didn't go well.

            7. Restore or roll back option you say is - to run the previous install that was created in step #1 ?

             

            or I'm thinking - another option would be - take a backup by export the concerned pages/packages/db changes in scope before the deployment. Had there been a situation where we need to roll back then just restore the application file from the backup? I'm just asking would this be feasible?

             

            Thanks

            • 3. Re: Rollback procedure for APEX code deployment
              Roel Hartman

              Of course taking a backup of your database before deployment gives you the option to go back in time as well.

              Exporting the APEX application from Prod should give the same export file as the one you used to deploy to Prod (unless you're used to make changes in Prod ... I hope you don't).

              You can (re)deploy database code - packages, functions, procedures, views, triggers - the same way.

              Changes made to tables can't be solved elegantly (think of adding columns, changing column lengths etc). A backup/restore of the database is your best option for that.

               

              You might consider splitting the deployment of the database structures (tables) and code - as they can be reverted differently, depending on your weapon of choice....

              • 4. Re: Rollback procedure for APEX code deployment
                Shreesha

                Thanks mate. :-)