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

All the Costs of Downtime

I studied economics in university, which isn't that close to database work, though I did have to work through linear regression problems by hand. I always enjoyed mathematics, so this wasn't a hardship. Until I purchased a PC that was capable of letting me do graphs and calculations in PASCAL and BASIC. Then I realized that my enjoyment wasn't that efficient or useful, and a computer could help me get things done way more efficiently.

Many of us work on systems that process tremendous amounts of data, something our organizations couldn't complete without computer hardware, efficiently or not. We just wouldn't be able to get the work done by hand. That's the main reason why downtime is such a problem in the modern world; we can't fall back to manual systems in many cases.

I ran across an article that discusses some of the large-scale failures in recent history (Heathrow, Delta, NYSE, Royal Bank of Scotland) due to computer system failure. Certainly, there are large financial costs and lost revenue for organizations that suffer these outages. However, there are other costs that are borne by the staffers, which don't often make the news.

When it's "all hands on deck" to solve a problem, other work isn't being progressed. There is certainly the interruption of Operations people, but often developers get asked questions or pulled into meetings to provide input. That can take them away from their existing work. Apart from the "23 minutes to get their head back in the game," as noted in the article, can they even focus anymore? Will they be thinking through all the possible causes, and did they actually provide the right information or all the details needed?

During a crisis, or even after, it is very hard for humans to focus on anything else. Apart from the technical details, IT staffers can have a range of emotions and thoughts. They might have sympathy for customers affected. They might worry they're at fault and might be blamed (or terminated). They might be thinking about how they should have coded or configured something differently? Should they have tested more or accounted for issues? They might have simple anger at others who didn't do their job, or frustration at the failure of a piece of hardware.

Perhaps even more concerning is the load management can place on employees to get things fixed. If people work long hours, how do we ease them back into the flow of all the other daily work? I know I've struggled to get people to rotate work with rest as a manager. As an employee, I struggle to even sleep if I am sent home while others are still working. I've had to work 100+hour weeks and very quickly we get into survival mode, not productive mode.

There are lots of costs to downtime apart from the financial impact. If you can't maintain a stable environment that limits the time employees spend firefighting, you likely aren't going to survive as an organization. Startups sometimes can do this, but often it's from a few extremely dedicated employees who make a difference at a smaller scale. And these employees often pay the price in their personal lives with health, relationship, or other issues.

The article goes on to look at predictive analytics that might help us reduce some of the issues from hardware issues. I think this is likely true, as we've seen digital twins that simulate loads on equipment help proactively catch issues.

What do we do with software? If we don't write well architected software that handles the load, how do we write an analytical system that can predict failures? This seems like a level of static and dynamic code analysis that we aren't mature enough to build.

Heck, even if we could, how hard is for many of you to get queries tuned in a running system? I find too often there isn't enough effort or enthusiasm from developers, management and others to follow solid tuning advice and change your SQL. Maybe that's too limited a view.

Perhaps the AI analysts of the future will become the consultants of the past, whose recommendations often mimic the words of the current staff, but somehow carry more weight. Maybe they'll get more things done and changed to help us build more robust systems.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

How Well Does the MSSQL Extension in VSCode Work?

Steve Jones - SSC Editor from SQLServerCentral

A short look at the MSSQL extension for VS Code, getting started with connections and running queries.

External Article

Mastering SQL VIEWs: Syntax, Use Cases, and Best Practices

Additional Articles from SimpleTalk

VIEWs are an undervalued and underused feature in SQL. They basically consist of a query that has been given a name, and a parameter list, so can be used like an inline macro. Technically, you’re supposed to think of it as a virtual table.

Blog Post

From the SQL Server Central Blogs - Azure Networking: Designing for Change

John Morehouse from John Morehouse | Sqlrus.com

Failing to plan is planning to fail. When organizations first begin implementing Azure networking, the focus is often on the immediate requirements: connectivity, security, and performance for your databases...

Blog Post

From the SQL Server Central Blogs - Secure Your SQL Estate: Best Practices for Azure SQL Security

Chris Yates from The SQL Professor

The Castle and the Keys Imagine your Azure SQL environment as a sprawling digital estate – a castle of data, with towers of insight and vaults of sensitive information....

Definitive Guide to DAX cover

The Definitive Guide to DAX: Business Intelligence for Microsoft Power BI, SQL Server Analysis Services, and Excel

Site Owners from SQLServerCentral

Now expanded and updated with modern best practices, this is the most complete guide to Microsoft’s DAX language for business intelligence, data modeling, and analytics. Expert Microsoft BI consultants Marco Russo and Alberto Ferrari help you master everything from table functions through advanced code and model optimization.

 

 Question of the Day

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

 

Single User SQL Server on Linux

How can I start SQL Server on Linux in single-user mode to restore the master database?

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)

The Tightly Linked View

I try to run this code on SQL Server 2022. All the objects exist in the database.

CREATE OR ALTER VIEW OrderShipping
AS
SELECT cl.CityNameID,
       cl.CityName,
       o.OrderID,
       o.Customer,
       o.OrderDate,
       o.CustomerID,
       o.cityId
 FROM dbo.CityList AS cl
 INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID
GO
CREATE OR ALTER FUNCTION GetShipCityForOrder
(
    @OrderID INT
)
RETURNS VARCHAR(50)
WITH SCHEMABINDING
AS
BEGIN
    DECLARE @city VARCHAR(50);
    SELECT @city = os.CityName
    FROM dbo.OrderShipping AS os
    WHERE os.OrderID = @OrderID;
    RETURN @city;
END;
go

What is the result?

Answer: The view is created but the function is not created

Explanation: The view is created, as this is valid code. The function is not created, as a function cannot be created with schemabinding unless the view referenced in the function must be schemabound. Ref: CREATE FUNCTION - https://learn.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql?view=sql-server-ver17

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 2016 - Development and T-SQL
Work out closing balance using opening balance of prior month - Hello, I think I need a recursive cte query but unsure of the logic. I have data for 3 Divisions for 12 months. For Jan, Closing (H) value is the sum of Open + Created + Won + Lost For all other months, it then also needs to include prior months closing, so the formula […]
SQL Server 2019 - Administration
how to optimise whole database full of table and sp in one go using githubcopilo - i have subscription of github copilot which i can access in vs 2022 comunity edition. i have been optimising my tsql in vs 2022 using githubcopilot. now i need to optimise my whole database which has many tables and sps.
SQL Server 2019 - Development
Is there a way to have dynamic table headers? - Hi everyone I have a SP which compares two tables and outputs mismatching entries: SELECT T1.QUOTE_DATE AS REPORT_UNIT_DATE FROM #UNIT AS T1 SELECT MAX(TRADE_DATE) AS REPORT_DIVISION_DATE FROM DBO.DIVISION SELECT T1.UNIT_SYMBOL AS UNIT_TABLE, T2.DIVISION_SYMBOL AS DIVISION_TABLE FROM #UNIT AS T1 FULL JOIN #DIVISION AS T2 ON T1.UNIT_SYMBOL = T2.DIVISION_SYMBOL WHERE T2.DIVISION_SYMBOL IS NULL OR T1.UNIT_SYMBOL IS […]
is there a way to "detect" schema like changes on a server? - Hi, we have a few people who like to experiment on our prod sql server with new tables, schema changes, dependency chain breaks, maybe ssis, even ssrs  etc etc without telling anyone till its too late.  They hold high ranking positions so forget your first thought.   I often end up with technical debt or sheer […]
SQL Azure - Administration
Azure elastic query credential question - I am trying to check out elastic query between two test instances we have in GCCH Azure.  On the Microsoft learn page, it says that the first step is to create a master key and scoped credential as follows: CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'somegoodpassword'; CREATE DATABASE SCOPED CREDENTIAL [elastic_to_dev] WITH IDENTITY = […]
Editorials
The Security of Old Tech - Comments posted to this topic are about the item The Security of Old Tech
Password Guidance - Comments posted to this topic are about the item Password Guidance
Requiring Technical Debt Payments - Comments posted to this topic are about the item Requiring Technical Debt Payments
Learning a New Language - Comments posted to this topic are about the item Learning a New Language
Guidelines and Requirements - Comments posted to this topic are about the item Guidelines and Requirements
Article Discussions by Author
Revisiting SQL Server Window Functions- A Practical Walkthrough - Comments posted to this topic are about the item Revisiting SQL Server Window Functions- A Practical Walkthrough
Tables with a SPARSE Column and Consumption - Comments posted to this topic are about the item Tables with a SPARSE Column and Consumption
Using table variables in T-SQL - Comments posted to this topic are about the item Using table variables in T-SQL
Using the FP-Growth Algorithm to Mine Useful Patterns in Data - Comments posted to this topic are about the item Using the FP-Growth Algorithm to Mine Useful Patterns in Data
SQL Server 2022 - Administration
SQL Server 2025 Jobs - Hello SQL Server 2022 16.0.4212.1 running on a Windows Server 2025 Std,V 24H2, SO OS build 26100.6584. SQL Agent service account: NT Service\SQLSERVERAGENT I have a series of jobs whose steps call SP of the same database. One of them scheduled to run at a specific time fails: "Job failed. The job was invoked by […]
 

 

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

 

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