| A community of more than 1,600,000 database professionals and growing |
| | What do you do when you inherit a mess at work? Sometimes when we start a new job, or support a new system, we inherit some technical debt. I am not talking about server issues or backup management. I am talking about poorly designed systems, with problems from database schema issues to cursors that are un-necessary to sa rights used for everything to crazy triggers to completely un-normalized tables. There are functions with unbelievably complex queries and views upon nested views that will keep you up at night. The systems usually run, perhaps not very well, but they more or less do what they need to do. I think there are three ways I have seen people respond to these messes. The first response is a passive response. This is the most conservative and somewhat reactive way of dealing with the situation. Basically, you don’t do anything. No table changes or investigation of the system. You certainly wouldn’t disable any users. You wait; when and if something breaks or if performance becomes a problem, then you focus on that issue and fix it. There isn’t really a comprehensive analysis of the system or any plan to rewrite to fix the mess. It seems a lot of people go for this response since it seems relatively safe. No ownership is really taken, just band aids applied. Minimum effort is needed. This is a safe response, but you still have a mess. The second response is systematic. There may be minor schema and table changes. Each stored procedure, function, trigger, and view is analyzed. There is a carefully laid out plan to improve the code. Cursors are removed, perhaps indexes are added. These can be relatively safe changes. Certainly, there is some risk, but the essence of the system is maintained. More ownership is taken of the system and hopefully, it is pretty well understood how things are supposed to work. Significant effort is needed to accomplish this solution. This response is still pretty safe and hopefully, there is less of a mess, but it takes time and money to accomplish it. The final response I have seen is nuclear. This response tends to happen when the system was so poorly designed, or it is so convoluted that it is pretty much beyond any hope of repair. I am sure you can think up some other names for this type of system. So you pretty much nuke it all and just start over. New schema, new tables, new everything. This can be particularly difficult if there is no one who truly understands how the system should work. This is a high risk solution, but there can also be high reward. Maximum effort is required, as a complete rewrite is needed. The hope is at the end of the project, there is no more mess. Different arguments can be made for each of these approaches. I would guess you all could add a few more options from your experiences. I have seen each of these solutions applied at different times throughout my career, and there have been varying degrees of success. Very few people feel good about a passive response, but sometimes your hands are tied. Management doesn’t want to invest the money and effort, or they have no stomach for the risk. A full on nuclear response might be the best action in some cases. We all probably imagine we can do a better design than the previous person. Still, such an undertaking comes at high risk and cost. So, my question to you today is: what have you done when you inherited a mess? What response was taken and how did it all turn out? Ben Kubicek from SQLServerCentral.comJoin the debate, and respond to today's editorial on the forums |
|
| ADVERTISEMENT | | How can you help your team write better, shareable SQL faster? Find out by discovering 15 Super SQL Tips from Microsoft MVPs and other SQL Server experts. Using SQL Prompt to write, refactor, and share SQL, they show how it strips away the repetition of coding and standardizes it everywhere. View the tips and dow... |
| | Find SQL in your database for free For example, want to rename one of your table columns but are not sure what stored procedures reference it? Using Redgate’s free SSMS add-in, SQL Search, you can search for the column name and find all the stored procedures that use it. Find out more and download now. |
| | SQL Monitor - Always have the answers to SQL performance issues SQL Monitor keeps an eye on your SQL Servers 24/7, so you don't have to. It helps you proactively monitor the performance of your SQL Servers, saving you time, and makes sure you always have the answers to tough performance problems. Find out more.... |
|
|
|
| | | James McGillivray from SQLServerCentral.com Enhance the functionality of your SSAS Tabular and PowerBI output, by understanding HOW-, WHY- and WHEN to leverage the power of DAX to create text, date or Boolean measures. More » |
| Additional Articles from Database Journal Learn how to leverage Azure Active Directory when connecting to Azure SQL Database from applications or services in a non-interactive manner, by relying on token-based authentication. More » |
| Redgate invites you to participate in a survey to uncover rates of adoption of DevOps practices among Microsoft SQL Server database users. The survey will take between 5 and 10 minutes to complete. All respondents who provide a valid email address will be sent a copy of the research report when available, as well as being entered into a prize draw to win a $250 Amazon gift card. More » |
| Devin Knight from SQLServerCentral Blogs In this module you will learn how to use the Synoptic Panel Power BI Custom Visual. The Synoptic Panel is... More » |
|
|
| | Today's Question (by Steve Jones): The new STRING_ESCAPE() function in SQL Server 2016 takes two parameters: a string to escape and a type of escaping rules. What are valid values for the type? |
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: T-SQL. 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 | Professional Microsoft SQL Server 2014 Integration Services The 2014 release of Microsoft's SQL Server Integration Services provides enhancements for managing extraction, transformation, and load operations, plus expanded in-memory capabilities, improved disaster recovery, increased scalability, and much more. The increased functionality will streamline your ETL processes and smooth out your workflow, but the catch is that your workflow must change. New tools come with new best practices, and Professional Microsoft SQL Server 2014 Integration Services will keep you ahead of the curve. SQL Server MVP Brian Knight is the most respected name in the business, and your ultimate guide to navigating the changes to use Microsoft SQL Server Integration Services 2014 to your utmost advantage. Get your copy from Amazon today. | | |
|
|
|
|
|
| Yesterday's Question of the Day |
| |
| | Mashrur Shuvo from SQLServerCentral.com Create a .txt file with all of your server name and save it in a safe location, like C:\ServerList. Copy the above script and update it with your desire location for the output file, Like C:\HardDriveSpaceDetail.txt Attached that file to your email and send it to your boss. I used Gmail as the SMTP, but you should use your corporate email service or SMTP. Create a windows task to run the PS script before you have your morning coffee. 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. Unable to restore a database on a new instance - [b]Scenario[/b] Moving database from: Microsoft SQL Server 2008 (SP4) - 10.0.6241.0 (X64) Apr 17 2015 10:56:08 Copyright (c) 1988-2008 Microsoft Corporation Enterprise... Select query inside procedure taking long time, clustered indexes doing scans, need suggestion - I have a procedure, which is running very slow, and is being timed out without returning any records. [Reports] Table... Search query based on four separate parameters. - Hello all, After searching for possible solutions, I haven't found anything that provides me with what I'm after. I'm fairly new... possible combinations for all rows in table - I have a table having three column Name Value1 Value2 Value3 A 1 2 3 B 4 5 1 C 2 3 1 I want... recursive query to find out orphans - Hi, i need a query to find out all orphan over a hierarchical table with the code above i can get... RAMDisk? Use it for TempDB? - RAMDisk used to exist in Windows NT. I used it and it worked really well. Then, it was eliminated in... Using OpenRowset to Insert Data - Hi Guys, I've got some data I need to copy to a table on a different server, a convenient way for... Query optimization - Hello, I want to optimise the following query that is running so slowly. Please help or gimme an advice. MERGE dbo.LocalizedCategories AS... Is there a way to extract only credit card numbers from text - i have below sample data, i try to extract valid credit card data. But i was not able to do... How to drop temp table created by somebody else? - I want to drop a temp table created by somebody else how would I go about doing this? I see... easy, very easy to answer - STEP 2 (THIS IS FROM KHANACADEMY) Maybe your friends only like singing either recent songs or truly epic songs. Add another... High percent signal waits with very low cpu usage - I am trying to find out what could be causing this issue. Why would we be waiting on cpu when... Unexpected Behavior With TOP clause in a DELETE - I recently encountered some unexpected behavior, or at least not expected by me, using the TOP clause in a DELETE... Converting time - from "seconds after midnight" - Hello all, We have time saved in our db in a seconds after midnight format and need to convert it to... effective use of subquery with a where condition - Good day friends, i have the query below: There are two sub queries with joins, the first sub query requires a... SP_EXECUTESQL query problem - We migrated an application several weeks ago and all appears to be running ok, apart from a couple of queries... Best way to automate running adhoc scripts? - Hello, Just started a new DBA position. I am seeing things that seriously need some attention. I would rather not do... SSIS Excel import error - The situation is: Server A: runs alle the ssis jobs. Excel is located on a fileserver. Connection string Excel: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\Fileserver\somewehre\Excelfile.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES"; The... BULK INSERT failing. - Hello, I have a situation where I am trying to do a bulk insert of a file that's on a network... SSAS Deployment Error - I am trying to deploy an SSAS project running in tabular mode and am getting the following error: Error returned: 'The... |
|
| This email has been sent to [email protected]. To be removed from this list, please click here. If you have any problems leaving the list, please contact the [email protected]. | 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 ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. Contact: [email protected] |
|
|