Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
Redgate Database Devops
The Voice of the DBA
 

Do What Hurts

A long time ago I heard a manager at a company say that if something is hard, we ought to practice it more and find ways to make it easy. Barring that, we ought to at least be comfortable with the task. I'm not sure if this manager made this up or read it somewhere, but it's the same thought expressed by Martin Fowler in this post: "if it hurts, do it more often."

I'm not sure that's the advice I want to use with everything. When my shins hurt from running, or my shoulder aches after hitting a number of volleyballs, often I want to take a break. At the same time, I know that stopping isn't always the productive thing. I can slow down and build up some strength and things will get better. My long running streak started with slow jogs for short distances, slowly building up the strength in my muscles and joints. Regularly hitting balls and slowly increasing the number I hit work well.

At the same time, putting a hand on a hot stove doesn't get better, no matter how slowly I increase the heat over time. There are some things that aren't worth doing more often to get better, but building software is one where practice does improve skill, quality, and ability if you practice it well. We can decompose our problems easily, we can work in steps, and we can (relatively) easily alter our course of work if we need to do so. In fact, quite a few of the software methodologies adopted in the last 20 years are designed to improve the entire process be ensuring we adapt our work to the customer with regular pauses to evaluate our progress.

When the pain of delays, which are really procrastination, grows, we should find ways to reduce the hassles. Often the pain comes from difficulties, and when that is the case, we might do what Martin Fowler suggests: do it more frequently.

It works well for databases, as he points out in his post, though I'd caution the data professionals to consider the details in his post. Decompose the problems and make the changes across multiple steps, not all at once. When you do that, make sure you plan for pauses in the various stages, not just stringing together multiple scripts into one transaction. That will help you evolve the database along while ensuring your customers can continue working as you make changes.

Steve Jones - SSC Editor

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

Redgate University
 
 Featured Contents

Digging into Azure SQL Database Hyperscale Edition

Steve Jones - SSC Editor from SQLServerCentral

This article will look deeper at the Azure SQL Database - Hyperscale edition, which was moved into General Availability (GA) in May 2019. This followed a bit of a preview time, when I first learned about how it worked in detail. I was impressed with the work being done, some of which will make it […]

Introduction to the Partition By Window Function

Additional Articles from Database Journal

Window functions can be life savers by making a complicated SQL calculation easy. A window function combines that logic and provides row by row or window by window feedback. Read on to learn more!

Automating Schema Comparisons with SQL Compare Projects and PowerShell

Additional Articles from Redgate

Your PowerShell process for database comparison and deployment is running smoothly, and your instinct is to 'leave well alone'. However, you continually need to delve into the script to tweak comparison settings or add a new command line switch. Phil Factor proposes a way to avoid this using SQL Compare projects.

From the SQL Server Central Blogs - Updated Data Profiling in Power BI Desktop

Angela Henry from SQL Swimmer

In this month’s (October 2019) release of Power BI Desktop, they have added a ton of cool stuff, you can read all about it via the Power BI Blog. ...

From the SQL Server Central Blogs - Power BI Monthly Digest – October 2019

Devin Knight from Devin Knight

In this month’s Power BI Digest with Manuel Quintana [Blog | Twitter] and I will again guide you through some of our favorite Power BI

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

The Complex Computed Column

I want to add this column to my table. What happens when I run this?
ALTER TABLE dbo.Activities
ADD ProdOneCount AS CASE
                        WHEN ProductID = 1 THEN
                            CallCount
                        ELSE
                            0
                    END;
GO

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

Backing up SSAS Databases

I have an SQL Server 2017 Analysis Services (SSAS) database that I wish to back up. To speed things up, I'd like to stripe the backup across multiple files. Is this allowed?

Answer: No

Explanation: No. SSAS databases are backed up to a single file. Ref: Backup and Restore of Analysis Services Databases - https://docs.microsoft.com/en-us/analysis-services/multidimensional-models/backup-and-restore-of-analysis-services-databases#bkmk_cube

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.


SQL Server 2017 - Administration
Extended Events- how to log to an SQL table? - I want to enable an Extended events session. However, I don't want it to go to a file on the HDD, I 'd really like to send it all to an SQL table so I can do grouping, analysis, reporting, etc... How can I get that data into an SQL table for longer term storage […]
Error after migrating SSISDB to a newer version of SQL server. - I tried to move SSIS database catalog on SQL server 2014 to a new server SQL 2017. I created the catalog first on new server, and then restored the database SSISDB from old server to new server. And restored the master key. Then I run the following stored procedure and got an error: Use SSISDB […]
SQL Server 2017 - Development
getdate() to east time - hello someone aware how to convert getdate() to at time zone EASTERN TIME can you help me please
SQL Server 2016 - Administration
Very large t-log with backups - I have a database that's 125GB, but the t-log is 190GB.  I do full backups each day and t-log backups every 15 minutes.  I've verified the log backups have been successful for the past week.  Generally when I see a large log like this it is because backups are failing.  The log isn't growing out […]
Optimizer switching sql execution plans - Hi, I have noticed that Optimizer is switching to good and bad plans randomly after IndexRebuild and Update stats job. For example, for 1 week it is using good plan where procedure is taking 1 sec and after that it is switching to bad plan and procedure is taking 50 sec. Is this behavior related […]
Issues trying to restore a backup file from SQL Server 2016 to SQL Server 2012 - Hello, I'm attempting to use a specific backup file from a week ago that was taken from a SQL Server 2016 instance and restore it as a new database onto a different instance, which uses SQL Server 2008 R2.  When I try to script this, I get the following error: "The media family on device […]
Always-On AG Cluster: Suspect database on secondary node, backup failing - Setup: Three node AO AG cluster, Node1 and Node2 synchrounous in DC1, and Node3 ansynchronous in DC2. Hi guys, we had an incident some time ago, the root cause seems to be that because of some disk issues, one db went offline/suspect on the Async node in DC2, this caused a t-log backup to fail, […]
SQL Server 2016 - Development and T-SQL
how to print NULL for datetime column - i have a variable called date @Date DATETIME = NULL, i want to capture this variable into error log information set @log =   @Log + '  ,Date: ' + @Date but this is not capturing anything. i have tried convert(varchar(20),ISNULL(@Date,GETDATE()),110)  it worked ; but i don't want to capture getdate. i want to print NULL.  
Range of values not from a table - Hi, I want a range of values between a start number and end number say 10000 to 50000 using SQL, but these are not stored anywhere on a table. The idea is to then compare each value with the user-ID of a database table to see which ID is missing and which exists. e.g. In […]
Max window function with order by - Hello Everyone Thought I knew how Window functions worked in SQL Server but that was  before I ran below script This script is part of a CTE which is then fed into other CTEs downstream - but I am having hard time understanding how the MAX function here is deriving maximum date for each row […]
empty sys.dm_exec_query_stats - Hello   I am having an issue with the query stats dmv If I run a statement or execute an SP I would expect it to generate a row in sys.dm_exec_query_stats Sometimes it does but more often than not it doesn't I'm also finding that when it does, if I query sys.dm_exec_query_stats a couple of […]
SQL Query with CTE or other...! - Any one can help me please with this issue? I really appreciate this help. The number of Answer is dynamic.
SQL Server 2012 - T-SQL
Script multiple queries - Is it possible to script multiple queries?  I need to transfer about 30 queries from one server to another w/o copying the entire database.  I was hoping i wouldn't have to script out each query individually in SSMS.
Reporting Services
Failed Executions - Curious what everyone else is doing... I've always had a daily report showing me report subscriptions that failed.  I've had a task to better monitor all report interactions (subscriptions, cache refresh and interactive) sitting in my queue, but I put it off because of other higher priority tasks.  Right now I'm in the process of […]
Integration Services
SSIS task and transformation types in SSISDB - Hello   Does SSISDB hold the type of task anywhere It would make querying for slow tasks or data transformations much easier Also, look at history to see if specific transformation timescales have changed etc.   Thanks  
 

 

RSS FeedTwitter

This email has been sent to {email}. 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.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -