 | A community of more than 1,600,000 database professionals and growing |
| Featured ContentsFeatured Script |
| Rollbacks Are Normal Do any of you think that a rollback of a version for your application is easy? Most people struggle, and when I talk DevOps and improving your process, the number one question is about rollbacks. In fact, recently I had a few people that struggled to even listen to the early parts of DevOps because all they could think about were previous failed releases and the need to roll back. They kept saying, what about rolling back. Hopefully you can stick with me a bit longer. I'd argue that rollbacks are the process that needs DevOps more than ever, with smaller, more regular releases and practice at making changes. Whether forward or backward, we ought to be able to rev our software easily. I ran across a piece from the cloud platform blog at Google called Reliable releases and rollback - CRE life lessons. The title is an interesting one, but suspend some of your database skepticism until the end. It's easy to consider rolling back in the early parts of the article and say "it's way easier to roll back your application", and it is. Applications just stomp down new (or old) versions on top of what's there, which is often an easy thing to do. As they say at Google, "rollbacks are normal", which certainly seems to fit with the application paradigm. In fact, they recommend rolling back a good release. After all, it's much easier to practice this sort of thing when you have a working new version of software. When the release breaks your system, as mentioned in the piece, everyone's stress level rises and the fixes often aren't well built. Even when they work, which isn't anywhere near all the time, there are often problems later. The idea should be to roll back and ensure everyone knows how to undo a version change. They can document the reasons for rollback and get the previous state of the application running. I hadn't thought about this, but it makes sense. Practice in advance and be prepared. You can always re-deploy the working version. What about databases? They have a solution, and I like it. They want the app developers to build two versions of the application. One pre-schema change, and post. That way you deploy the first version, then the schema change(s). Then you deploy the second version. If there's an issue, you rollback to the first version and undo the database changes. This sounds hard, but once you get into the swing of building code that survives additive changes to the database, this is easy. This doesn't solve any destructive changes to the database, like dropping objects or manipulating data. I would suggest that drops are a completely separate release, and have a full backup (or snapshot) taken and saved for awhile. For data manipulation, save off the previous state of data, just in case you need to reload things. Becoming better at not only delivering changes to the customer, but also removing them when issues are detected is a valuable skill, and since we're likely to have a bad release at some point, this might be a way to even further reduce the risk of deploying database changes. Steve Jones from SQLServerCentral.comJoin the debate, and respond to today's editorial on the forums |
| The Voice of the DBA Podcast Listen to the MP3 Audio ( 4.7MB) podcast or subscribe to the feed at iTunes and Libsyn. The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. | |
|
|
| ADVERTISEMENT |  | Redgate University Self-paced online training courses with easy to follow classes on getting started, exploring advanced features, and making the most of Redgate products. Learn the fundamentals, best practices, and top tips from the experts - Redgate’s Microsoft Data Platform MVPs and engineers. Start Learning |
|  | Simplifying SOX Compliance in DevOps Being compliant shouldn’t have to result in restricting your own work or slowing down your release time. Microsoft Data Platform MVP Grant Fritchey will explore how IT Teams fit into this story and how to best protect your company and customers. Register now |
|
|
|
| |  | Andy Leonard from SQLServerCentral.com In this next level of the Stairway to Biml, we will examine how you can use the information stored in your RDBMS to build packages. More » |
 | Press Release from Redgate When a SQL Server database is operating smoothly and performing well, there is no need to be particularly aware of the transaction log, beyond ensuring that every database has an appropriate backup regime and restore plan in place. When things go wrong, however, a DBA's reputation depends on a deeper understanding of the transaction log, both what it does, and how it works. More » |
 | As SQL Server estates continue to grow quickly, and change in nature, due to the ease with which new cloud-based, containerized or virtual machine-based SQL Servers can be provisioned, so too the role of the monitoring tool changes. More » |
 | Dharmendra Keshari from SQLServerCentral Blogs An interesting issue regarding SQL Server Transaction Replication/CDC log reader agent job can’t be started with the following error: Msg 18752, Level... More » |
 | jsterrett from SQLServerCentral Blogs In SQL Server 2016 we saw Query Store. Query Store was a game changer to help database administrators identify troublesome... More » |
|
|
| | Today's Question (by Steve Jones): I have this code inside of the sample.py file. def TwiceThePrice(Price): Twice = Price * 2 print(Twice) I open a Python 3.5 REPL and import this file with this code: from sample import TwiceThePrice Now I edit the sample.py file in a text editor to add look like this: def TwiceThePrice(Price): Twice = Price * 2 print("$%d" % Twice) In the same REPL, I want to get the updated function definition with the dollar sign in the output. What should I do? |
Think you know the answer? Click here, and find out if you are right.
We keep track of your score to give you bragging rights against your peers. This question is worth 1 point in this category: Python. We'd love to give you credit for your own question and answer. To submit a QOTD, simply log in to the Contribution Center. |
|
|
| |
| Yesterday's Question of the Day |
| Yesterday's Question (by Steve Jones): I have this table. CREATE TABLE UserConfig ( UserConfigKey INT IDENTITY(1,1) NOT NULL CONSTRAINT UserConfigPK PRIMARY KEY , UserID INT , IsActive BIT SPARSE , IsSubscriber BIT SPARSE , DefaultQuantity INT SPARSE ) How do I add a column set to this table? Answer: This table needs to be dropped and recreated with the column set as part of the definition Explanation: A column set cannot be added to a table if there are already sparese columns. This table needs to be recreated with the column set in the original definition. Ref: Use Column Sets - click here
» Discuss this question and answer on the forums |
|
|
| | Database Pros Who Need Your Help |
| Here's a few of the new posts today on the forums. To see more, visit the forums. JSON AUTO, WITHOUT_ARRAY_WRAPPER not returning all the columns - Hi I have this View with these fieldsSELECT FisrtName ,LastName ,IDNumber ,Address1 ,Address2 Question: Recover database with minimal data loss example question - Recover database with minimal data loss question Hope someone can help a bit. I've been going through some practice questions online for... Why such a big log size? - I have a datamart with one main fact table that is about 45Gbs of data and 9Gbs of index It contains... Audit In SQL Server - I need to save an audit trail of changes made to some tables. Replication Snapshot scheduling - How often is the good practice for replication snapshot schedule in sql server transactional replication? My understanding is that the... Could not find stored Procedure error - Hello, Using SQL Server 2014, Visual Studio 2015 and IIS 8.0.9, using Windows Authentication I'm at my wit's end with this issue... The database principal has granted or denied permissions to catalog objects in the database and cannot be dropped - Dear all, I get the following error message when trying to remove a login on SSISDB even though it has no... Changing the case of letters in SQL - update of rows - Hi there I have a large table showing lists of world countries with some rows showing e.g. UNITED KINGDOM and some... Is there a better way to write a simple query? - This is pretty typical SQL Code for me: -- SET NOCOUNT ON added to prevent extra result sets from -- interfering... Avoid duplicate values - Hey guys, Got this table and I want to avoid inserting the same records. CREATE TABLE . ( (255) NULL, (50) NULL, ... HOW TO GET FIRST DATE - Dear all, I have data like: NAME SPONSOR_NAME DATE_OF_CALL A FI Multiple Join Behaviour - Hi guys, I've read 2 or 3 articles on Multiple Joins but I'm still failing to understand exactly what's happening... How can I get a set Date and Time Range between Yesterday and Today? - Hello, I am looking to create a query that will get data between Yesterday at 6AM until 1AM today. Is there... Shrink data file issue - Hi All I shrank data file in a production database . at first the size was 99 GB , after shrinking it... Disable TDE - Guys, What is the best way to disable TDE. I uncheck the "Set Database Encryption On property" but I am still... Log file doesn't clear after backup - I have two databases on a sql server 2008 r2 instance that are mirrored to a second server. I do... DBCC CheckDB successful but Backup teminates (Msg 3203, Level 16, State 1, Line 3 Read failed: 23) - Following a SAN issue one database was marked Suspect. No other corruption was apparent on any of the system dbs... Exporting in Excel without cells or excel columns merging for one column of data table(need sorting, data filters perfectly) - Hi, I have an issue with the excel exporting of the report using ssrs. I am using only the body... SSRS Scale Out Deployment Behind F5 Load Balancer - Morning Guys, It has been dictated to me that I cannot use Microsofts' NLB and must use F5 instead. Has anyone had... SSIS Package Execution - Hi everyone, I am new to this subject (MSBI-SSIS).I have a question related to SSIS package. I am trying to execute the... |
|
| This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
| This newsletter was sent to you because you signed up at SQLServerCentral.com. Feel free to forward this to any colleagues that you think might be interested. If you have received this email from a colleague, you can register to receive it here.
| This transmission is ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. Contact: webmaster@sqlservercentral.com |
|
|