SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Rollbacks Are Normal


Rollbacks Are Normal

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)

Group: Administrators
Points: 686470 Visits: 21594
Comments posted to this topic are about the item Rollbacks Are Normal

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Rod
Rod
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32632 Visits: 2888
I really like this article and the Google blog post you mentioned. It makes sense, a lot of sense. It's brilliant, in fact.

But I think you made a mistake. The Google blog post didn't suggestion rolling back the change in the database schema. Quoting from the blog post:

Now, if there are any problems with either of the new binaries then you can roll back to a previous version without having to also roll back the schema.


Using the Google blog posts terminology, version v + 1 of an app takes into account only the changes to the database schema, without adding any new functionality to version v. Then you apply the database schema changes, and then introduce the functionality changes to the app in version v + 2.

However, you bring up something I don't think was necessarily taken into account in Google's blog post. That's how might things be effected if you drop some database object, like a table, view or stored proc? It almost seems to me as though Google's post covered only adding something to a database schema, rather than removing something big like dropping an object.

Still, I really like Google's approach on this and it certainly covers what likely is the majority of database schema changes.

Kindest Regards,Rod
Connect with me on LinkedIn.
jonathan.crawford
jonathan.crawford
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5954 Visits: 1653
I assumed that v+1 should maintain the functionality without that object, which would be consistent with the new schema. I'm not sure how you do that, maybe that means you never have an upgrade that adds a new object and drops an old one that are mutually exclusive, but that you need to maintain the old object through at least one upgrade version before you can comfortably drop it?

-------------------------------------------------------------------------------------------------------------------------------------
Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses
Rod
Rod
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32632 Visits: 2888
I don't know either, Jonathan. to me, dropping an object has bigger considerations to take into account. Perhaps it doesn't if the data is refactored into other objects. But if you're just doing away with something, I don't see how it can't have an impact even upon the v+1 version of the application.

Kindest Regards,Rod
Connect with me on LinkedIn.
jonathan.crawford
jonathan.crawford
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5954 Visits: 1653

I did this recently when I needed to fix a naming convention, maybe something like this would work for v+1(very simplistic):

  1. copy records in oldTable into newTable (with correct naming convention), both objects still existing (v+1).
  2. create view with same name as oldTable
  3. Drop oldTable (except we'd skip this step in the software version v+1)
  4. refactor code to point to newTable, where it references oldTable (which is really now a view)
  5. Once done, drop oldTable view. (this would happen in v+2)



-------------------------------------------------------------------------------------------------------------------------------------
Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses
Eric M Russell
Eric M Russell
SSC Guru
SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)

Group: General Forum Members
Points: 123287 Visits: 15632
Regardless of what formal process you follow and which tools you use for the delivery mechanism, many of us have known for years that it's best to perform iterative deployments.


"The universe is complicated and for the most part beyond your control, but your life is only as complicated as you choose it to be."
Rod
Rod
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32632 Visits: 2888
Eric M Russell - Thursday, September 20, 2018 11:44 AM
Regardless of what formal process you follow and which tools you use for the delivery mechanism, many of us have known for years that it's best to perform iterative deployments.


For me, the example given of how Google does it, was very helpful. I've heard "iterative deployments", but I have never actually seen it in action.

Kindest Regards,Rod
Connect with me on LinkedIn.
drew.allen
drew.allen
SSC Guru
SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)

Group: General Forum Members
Points: 75163 Visits: 19103
jonathan.crawford - Thursday, September 20, 2018 10:56 AM

I did this recently when I needed to fix a naming convention, maybe something like this would work for v+1(very simplistic):

  1. copy records in oldTable into newTable (with correct naming convention), both objects still existing (v+1).
  2. create view with same name as oldTable
  3. Drop oldTable (except we'd skip this step in the software version v+1)
  4. refactor code to point to newTable, where it references oldTable (which is really now a view)
  5. Once done, drop oldTable view. (this would happen in v+2)

I would just use synonyms.

Drew

J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
How to post data/code on a forum to get the best help.
How to Post Performance Problems
Make sure that you include code in the appropriate IFCode tags, e.g. [code=sql]<your code here>[/code]. You can find the IFCode tags under the INSERT options when you are writing a post.
Eric M Russell
Eric M Russell
SSC Guru
SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)SSC Guru (123K reputation)

Group: General Forum Members
Points: 123287 Visits: 15632
Rod at work - Thursday, September 20, 2018 1:28 PM
Eric M Russell - Thursday, September 20, 2018 11:44 AM
Regardless of what formal process you follow and which tools you use for the delivery mechanism, many of us have known for years that it's best to perform iterative deployments.
For me, the example given of how Google does it, was very helpful. I've heard "iterative deployments", but I have never actually seen it in action.

By "iterative deployment", I simply mean that a major release to an existing production system is deployed incrementally in units, and there could be extended periods of time and testing between each deployment. Components that are functionally dependent (ie: adding a column to table and updating the views and forms that use the column) are deployed within the same unit. From my experience across multiple employers, it's very common.



"The universe is complicated and for the most part beyond your control, but your life is only as complicated as you choose it to be."
Steve Jones
Steve Jones
SSC Guru
SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)SSC Guru (686K reputation)

Group: Administrators
Points: 686470 Visits: 21594
Rod at work - Wednesday, September 19, 2018 9:16 AM
I really like this article and the Google blog post you mentioned. It makes sense, a lot of sense. It's brilliant, in fact.

But I think you made a mistake. The Google blog post didn't suggestion rolling back the change in the database schema. Quoting from the blog post:

Now, if there are any problems with either of the new binaries then you can roll back to a previous version without having to also roll back the schema.


Using the Google blog posts terminology, version v + 1 of an app takes into account only the changes to the database schema, without adding any new functionality to version v. Then you apply the database schema changes, and then introduce the functionality changes to the app in version v + 2.

However, you bring up something I don't think was necessarily taken into account in Google's blog post. That's how might things be effected if you drop some database object, like a table, view or stored proc? It almost seems to me as though Google's post covered only adding something to a database schema, rather than removing something big like dropping an object.

Still, I really like Google's approach on this and it certainly covers what likely is the majority of database schema changes.


True, but if the issue is with the database, you can roll back the schema changes without breaking the app. You're also not under pressure to roll back changes in the db because users must wait. You can do this in a more controlled fashion.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search