Roll forward and back script

  • I recently joined this group and found a lot of valuable information everyday. In an interview, I was asked if I know how to code a roll forward script from DEV to QA, or roll back if failed. I searched on this site and didn't see any topics related. Is there a template of how to do this? The most simple example is to add a new column to a table and it failed during build.

    Thanks

  • Roll forward and roll back are terms related to recovery - as in backup/recovery.

    Reading your posting I think your interviewer was refering to "promoting" changes and "rolling out" changes. This may include code and ddl.

    Picture this scenario. You have to move a new version of your application from Development to QA, this may include new tables as well as all kinds of DDL and code.

    As a rule of thumbs this kind of process is done in a all or nothing basis, you do not want to end up in QA with a mix of the old and the new version so, what do you do?

    1- Take a full backup of QA

    2- Run your promotion script -which includes everything you have to move to QA

    3a- If it fails... restore QA

    3b- If it goes as planned... somebody else will get the credit 🙂

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • Thanks. My question was answered.

    Do you have a sample script?

  • cmapowers (5/22/2010)


    Thanks. My question was answered.

    Do you have a sample script?

    Script will depend on what you have to promote, if promotion includes adding two columns to a table, recreate an index adding a column to index-key and compiling two storedprocs that got altered guess what will be included in your script?

    Yes! ... ddl to add those two columns, drop index and create index statements and two create procedure scripts therefore, each case will be different. 😉

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • OMG. I finally got it. It is SQL statements in stored procedures. I thought that was something very complicated. Thanks.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply