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

Daily Coping Tip

Mentally scan your body and notice what it is feeling

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

Advanced Incident Response

Early in my career, I worked at a few smaller companies where a problem with the computer systems meant I went into the office and stayed until things were working. As I went to a few larger companies, I wasn't alone when a system went down, but the process was mostly the same. We figured out what was wrong and found a way to fix or replace things, occasionally with help from a vendor. Those were the good days before our internal networks were connected to a public Internet.

Companies developed formal incident response plans to deal with various issues, whether these were problems we caused ourselves or failures of an application. I had the fortune, or misfortune, to be involved in more than a few issues and learned a great deal in how to solve problems as well as how to manage the impact to a large number of employees.

As email and Internet use grew, so did the attacks with viruses and other sorts of malware. Antivirus software helped a great deal, but these days ransomware seems to be a common problem that isn't as preventable as I would have hoped. Quite a few friends have dealt with ransomware issues, most of which have not been widely reported in the news.

I saw an article about a few things that you might want to consider adding to your incident response plan. While some of these items might be unique to the ransomware threat, the thing that struck me was that there is a need to react quickly, in real-time, in response to any detection of an issue. I can only assume this means that there needs to be some advanced monitoring of nodes to detect issues, and I'm not sure how many organizations would adopt this, but in today's world where we want systems available 24/7, perhaps they will.

Being on call is a part of working in many IT departments. Having a response plan, even the general outline of one, helps to coordinate resources and ensure that we use people effectively. Tools are important, especially in today's complex world, and it is important that one of those tools is a simple backup, preferably air-gapped from your main systems. If you don't have these things in place, you might suggest someone start assembling them. These days it seems it's not if you will get attacked, but when.

Lastly, I don't often see this addressed in plans, but make sure you have spelled out some guidelines on rotating staff and getting rest. Far too many companies want "all hands on deck" and forget that normal business still needs to occur. Any incident could last longer than a day, and you want to ensure that some of your staff is fresh and ready to take over from those that do need rest. Don't be afraid to send some people home, or better yet, don't call them in the first place.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

SSRS in Visual Studio

Daniel Calbimonte from SQLServerCentral

Where are the SSRS Projects in Visual Studio? Wher...

External Article

Introducing Pinal Dave to new SQL Monitor features

Additional Articles from Redgate

Pinal Dave from SQL Authority has used – and been a fan of – SQL Monitor since it launched in 2008 (fun fact: it was named SQL Response back then!) There are, however, a few newer features that Pinal isn’t too familiar with, and we were delighted to introduce those to him in this short video.

External Article

COALESCE(), ISNULL() , NULLIF() and alternatives in SQL Server, Oracle and PostgreSQL

Additional Articles from MSSQLTips.com

In this article we look at the SQL functions COALESCE, ISNULL, NULLIF and do a comparison between SQL Server, Oracle and PostgreSQL.

From the SQL Server Central Blogs - Power Automate – Date Expression Basics

Devin Knight from Devin Knight

In this new video series, Devin focuses on working with Power Automate Date Expressions. This first video is a primer to cover the basics of

Blog Post

From the SQL Server Central Blogs - Flyway Mistakes

Steve Jones - SSC Editor from The Voice of the DBA

I have been doing some testing with Redgate’s Flyway Desktop as a new way of managing code for databases. However, just like Git, I appreciate clients, but I want...

 

 Question of the Day

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

 

Migration Help

Which of these tools is used to help assess a workload against a specific version of SQL Server?

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)

Minimal Configuration

If I start a SQL Server instance with the -f parameter, it starts in minimal configuration. Which of these things apply?

Answer: the checkpoint process is not executed

Explanation: When you start in minimal configuration, only a single user can connect, so administrators (plural) is not correct. The checkpoint process does not run, so this is correct. Remote access and read-ahead as disable, and startup stored procedures do not run, so these are incorrect. Also, tempdb is the smallest possible size. Ref: Start SQL Server with Minimal Configuration - https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/start-sql-server-with-minimal-configuration?view=sql-server-ver15

Discuss this question and answer on the forums

 

Featured Script

Excel LET Formula for creating small values tables from a table or range

allinadazework from SQLServerCentral

The Excel (365) "LET" formula below will return a formatted SQL Values Table "T1" that can be pasted into SSMS.

=LET(
Vals,Table1,Headers,Table1[#Headers],RowSpacer,CHAR(13)&CHAR(10),TabSpacer,CHAR(9),"SELECT "&RowSpacer&TabSpacer&" ["&TEXTJOIN("],[",FALSE,Headers)&"]"&RowSpacer
&"FROM"&RowSpacer&TabSpacer&"(VALUES "
&TabSpacer&TEXTJOIN(",",FALSE,IF(COLUMN(Vals)=MIN(COLUMN(Vals)),RowSpacer&TabSpacer&"('","'")
&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(Vals,"'","''"),CHAR(13),"' + CHAR(13) + '"),CHAR(10),"' + CHAR(10) + '"),"""","'+ CHAR(34)+'")
&IF(COLUMN(Vals)=MAX(COLUMN(Vals)),"')","'"))&RowSpacer&TabSpacer&") "
&"t1 (["&TEXTJOIN("],[",FALSE,Headers)&"])")

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 - Administration
Enormous Table file starting with One waiter then onto the next waiter - Hello there All, I have an enormous table of DataSpace 200 GB information and 450 GB of Index Space, Compression type is ColumnStore. Presently, I am utilizing a power shell script with SqlbulkCopy Object to duplicate the information with a bunch size of 10000. As the objective table size develops the duplicate is turning out […]
Secondary replica and stored procedure - I have store proc runs every 30 mins during business hours on the secondary replica which is in asynchronous mode. In the morning it runs longer than normal run time. I agree it has overnight changes but not a lot. I do notice the correlation of  CPU usage is high during the high run time […]
Query tuning advice - Hi All, Need some direction on query tuning a stored procedure. The stored proc has multiple sql statements inside it and ~500 lines of code which includes MERGE statement. What's happening is , In Production, this stored procedure is taking more than an hour. Note : the parameters passed to this stored proc changes. I […]
SQL Server 2016 - Administration
Best Method for - We have a database (DB1) that gets a giant push of data every morning.  However, due to issues with the team that pushes this data, it isn't always successful, which causes a lot of issues for our reporting needs.  As such, our team has been instructed to have an "Isolation" layer, which is basically a […]
SQL Server 2016 - Development and T-SQL
Datatype conversion error_ replace with NULL - Hi, I am trying to convert several columns from varchar to float. I have managed to do it for most of them but a few of them error out with this message "Error converting data type varchar to float." As it turns out, some of the cells in the uploaded source file have #Div/0 error […]
Conditional Sum in SQL - Hello, I am trying to determine the total count of catheter days in February. My SQL query below intentionally adds a +1 to the # of days summing code to account for each day a patient had a catheter in. But for patients that changed status several times in a month, it is adding 1 […]
Need help with a sql query - I've data in the following format: I need to calculate backlog for each day. My desired result set should look like below:   the formula for "BKLG" for 3/16 is INF-OTF. However, from 3/17 onwards it is (INF+previous day BKLG)-OTF. Would really appreciate if someone can give me ideas on how to achieve the results […]
Administration - SQL Server 2014
How do you change the whole theme of SQL Server 2014 Management Studio to black? - I know that it is possible to change the theme of the window where you input the queries. What I mean is the whole windows in it (like object explorers, results, etc). I've searched through the internet and the only thing I can get is the theme for the 2010 version of it.
Development - SQL Server 2014
SELECT when main table contains NULL and you are attempting a JOIN - Hi, My Main Table looks like this: My Lookup Tables look like this: I want to do a SELECT such that the resulting Table looks like this: So basically I want to maintain the NULLs after the SELECT.
SQL Server 2014 Standard - Sorry for the dumb question in advance. So I just bought a SQL 2014 standard license from a vendor, but noticed that the product key can be looked up on google..... Does SQL 2014 have unique keys or does it just use one product key based on editions?
SQL Server 2012 - T-SQL
How do I add an exclusion to a query? - I have a query that pulls several different columns/attributes of results Two of those columns in the results of my query are EMPLOYEE_ID and WORKSITE_ID I DON'T want the following to show up in my results when i run my query: If EMPLOYEE_ID = 123 AND WORKSITE_ID=22 How do I add a line or two […]
SQL Server 2019 - Administration
AAG and replication setup - I have a general question, hopefully I explain it properly. I have 4 SQL 2019 servers Server1 is the primary, Server2 is the secondary with AAG synchronously, Server3 is also with AAG in Asynchronous mode and the Server4 is the BI server with replication. My question is: I've seen best practice is to have separate […]
SQL Server 2019 - Development
Stored Procedure Performance - I am reviewing a large stored procedure in order to increase its readability and performance. This uncritical procedure is executed at the end of a business day and its purpose is to update several read-only tables that contain daily totals. I am testing it on the latest build (15.0.4198.2) of SQL Server 2019 running on […]
Connecting
Connect to a SQL Server through a proxy - Hello, i have an application which connects to of course an SQL Server. The SQL is a shared service, thus i don't manage it but i have access to the db the app is using as owner. Now, these two machines(SQL and App server) are on the cloud and i can have access only on […]
Analysis Services
Calculated Member slow response time (median) - I am calculating median across a very large set and it can take a long time to give me my results. Is there any type of processing method that I can choose which will calculate the calculated members when I am processing the cubes instead of at run-time? Any suggestions appreciated. The calculation: MEDIAN(Filter(SET_NAME,[Measures].[Median_NUM] > […]
 

 

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

 

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