SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

State v Migrations

This editorial was originally published on Apr 8, 2015. It is being republished as Steve is out of the office.

Most people work in evolutionary databases. By that I mean a database where you have some schema, and over time you are altering that schema. You might be adding columns to tables or views, changing stored procedure or function code, or something else, but you aren't really rebuilding the database from scratch on a regular basis. Certainly some people sell software and a database that's always being rebuild and upgraded from state X to state Y, but that's a much more complex issue.

For those of us that work with these evolving databases, we really have two choices in how to work on upgrades. We can store each change to the database as a script and ensure we run the correct scripts in the correct order (discarding those that aren't needed) when we deploy changes. I've done that before, and it can work, but this approach requires I've have good control of production to prevent changes from being made in that environment that aren't also made in development. This is the approach advocated by Paul Stovell, of Octopus Deploy.

The other approach is to look at the state of development at some point in time, compare that to production (with a tool like SQL Compare) and then generate a script that makes the changes needed. This is how lots of people deploy their changes today, though this approach isn't without its own issues. NOT NULL columns, renames, and more can cause problems with this approach. There are ways around these issues, but they require some work.

Ultimately the problem of smoothly deploying changes to databases requires a bit of discipline from the DBAs and developers. Tools can help, and they certainly can reduce the work involved, but good habits and a consistent process are important to ensure that changes are made smoothly. The one thing that helps you find problems with your process and code is testing, which is something I'd recommend you implement no matter what method you choose for deploying your changes.

Steve Jones from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums

ADVERTISEMENT
SQL Monitor

What’s the top challenge faced by SQL Server professionals in 2018?

Learn how 626 SQL Server professionals monitor their estates in our new report on the State of SQL Server Monitoring. Discover the challenges currently facing the industry, and what is coming next. Download your free copy of the report

GDPR

How to make your SQL Server development GDPR ready

Redgate’s SQL Data Privacy Suite helps you to build a data catalog of your SQL Server estate, and put in processes to protect and monitor personal information. Find out more about how our tools help with GDPR compliance

Featured Contents

 

Jobs You Wouldn't Expect To Be Threatened By Tech But Are

Donna Morgese from SQLServerCentral.com

Will there be a fair balance between the coming generations of technology and the human workforce? Here is a list of industries that may not think yes. More »


 

Idle Connection Resiliency

Additional Articles from Microsoft MSDN

Describes the idle connection resiliency feature, which allows ODBC and SqlClient data access applications to maintain their connections to SQL Server 2014 or an Azure SQL Database. More »


 

Hyper-V and PowerShell: Shielded Virtual Machines

Additional Articles from SimpleTalk

In Windows Server 2016, Microsoft have implemented a strong security concept called Shielded Virtual Machines. Shielded VMs have been improved in the Windows Server 2019 release. In the second part of this series, Nicolas describes what Shielded Virtual Machines are and how to configure them using PowerShell. More »


 

From the SQLServerCentral Blogs - Power BI Monthly Digest – June 2018

Devin Knight from SQLServerCentral Blogs

This month I continued my series with my friend Manuel Quintana [Blog | Twitter] as we guide you through some of... More »


 

From the SQLServerCentral Blogs - WSFC Lost Quorum votes due to network problem

araujo.christian from SQLServerCentral Blogs

Problem: Early in the morning I received emails requesting for support as the applications were failing to connect to one of... More »

Question of the Day

Today's Question (by Raghavender Chavva):

In SSMS v1.7, how many types of authentication for a SQL Server are allowed?

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: Authentication.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Exam Ref 70-765 Provisioning SQL Databases

Prepare for Microsoft Exam 70-765–and help demonstrate your real-world mastery of provisioning SQL Server databases both on premise and in SQL Azure. Designed for experienced IT professionals ready to advance their status, Exam Ref focuses on the critical thinking and decision-making acumen needed for success at the MCSA level. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

What is returned from this query on SQL Server 2017?

 SELECT TRY_CONVERT(INT, '1.23')

Answer: NULL

Explanation:

TRY_CONVERT will return a NULL if the expression provided in the second parameter cannot be converted to a valid value in the datatype in parameter 1.

Ref: TRY_CONVERT - http://www.sqlservercentral.com/articles/TRY_CONVERT()/172016/

TRY_CONVERT - click here


» Discuss this question and answer on the forums

Featured Script

SQL Server Unused Index Script

Yusuf Kahveci from SQLServerCentral.com

SQL Server UnUsed Index Find Script

In our database, run a query that we have created to find indexes that we have created but are not being used.

Yusuf KAHVECI

yusufkahveci@sqlturkiye.com

www.sqlturkiye.com

Thanks

More »

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2017 : SQL Server 2017 - Development

use UPDATE with OPENQUERY on mutiple columns - I'm trying to update a table in mysql from SQL SERVER: UPDATE OPENQUERY(SRVLINK,'Select COLA, COLB, COLC from rtable WHERE id = 157') set...


SQL Server 2016 : SQL Server 2016 - Administration

SSRS 2016 - HTML5 rendering issues - Hello, We migrate reports from a SSRS2012 Instance with Sharepoint integration to a SSRS2016 Instance in native mode and we encounter...


SQL Server 2012 : SQL 2012 - General

Errodumps consuming space - Hi Experts, We are facing space issue due to Errordumps getting created in the following folder: C:\Program Files\Microsoft SQL Server\110\Shared\ErrorDumps After a bit...


SQL Server 2012 : SQL Server 2012 - T-SQL

XML nodes help - The XML in the attached file is the XMLTEXT field in my CDRecords table. What code would i use to cross...


SQL Server 2008 : SQL Server 2008 - General

AX On SQL Server 2008 - Evening All, Just inherited an AX 2009 sql server, that has intermittent performance problems. I've seen some people suggesting that setting maxdop...


SQL Server 2005 : CLR Integration and Programming.

Returning values from CLR function to a TSQL variable using Order By - Hi, After reading the articles around the performance of CLR we decide to roll out our own version of a CLR...

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