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

Data for Defense

It's a dangerous world out there. Many of us hear about data breaches on a regular basis, and we often blame poor security at various organizations. Certainly there are a lot of silly mistakes made, whether in configuration or the mishandling of data in insecure environments. Security is a tough business, however, and most organizations don't have the budget to combat all the threats they face, at least not as effectively as a larger organization could.

I have more sympathy for organizations after reading about the work of some Microsoft security teams that go up against the world's best hackers on a daily basis. To truly understand the vulnerabilities in software, someone must also understand how to attack it. Those of us that only have a defensive mindset are inherently limited in how we design protective measures.

There is a group, the Microsoft Threat Intelligence Center (MSTIC), that looks for and tracks hackers around the world, trying to understand how they attack organizations. This is a group of multiple teams looking at nation state attacks, as well as complex software tricks, using the tremendous amount of data they gather from telemetry to analyze the different techniques and vectors used to exploit holes in our systems. They notify customers, letting them know when a customer need to be prepared to defend themselves.

This is a fascinating read, and one that makes me think that most of our organizations are going to be at cyberwar for the foreseeable future. Already we know that any system on the Internet is likely to be probed and attacked if it has vulnerabilities. Most of us are careful about what we expose, but we also know the weakest link in our organization could cause us issues.

We do the best we can, but often we do depend on other organizations, like Microsoft, to actively be identifying and helping us understand what to patch or change to protect ourselves. I assume Google and Apple have similar groups, notifying their customers of potential threats. These large vendors are likely the best positioned to help, given all the data they collect about their platforms. Certainly I worry about data privacy with these vendors, but I do think that their massive troves of data on how their software works can also benefit all of us.

Steve Jones - SSC Editor

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

Redgate Database Devops
  Featured Contents

Increase Query Speed with Covering Indexes from SQLServerCentral

Improving the response times of queries in SQL Server is a common task for DBAs and developers. In this article, we will talk about how you can effectively use covered indexes to improve your performance, and when you should use them.

Implementing SQL Server Integration Services with Azure Data Factory

Additional Articles from Database Journal

Read on to step through the process of implementing Azure Data Factories.

From the SQL Server Central Blogs - When a SQL UPDATE Statement DELETES Rows

Bert Wagner from Bert Wagner

Watch this week’s episode on YouTube. At first I wasn’t going to write this post. I thought it would be too simple. Then I watched two experienced SQL developers...

From the SQL Server Central Blogs - Building an Azure Sandbox – Part 1 – The Basics

Bradley Schacht from Bradley Schacht

I recently posted that I was doing my annual Azure sandbox rebuild but this time I wanted to do things a little differently…all in PowerShell. Unlike previous years when...


  Question of the Day

Today's question (by sergey.gigoyan):


Rebuild vs Reorganize

Which statements are correct about the rebuilding and reorganizing indexes in MS 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)

The Schema Name

I gave this code to a junior DBA to create a new user:


We have some objects in the [etl] schema, but some of our code doesn't seem to create new objects in this schema correctly. We want to verify that the user can correctly see the schema. Someone logs in as the user, SSISProcess, and they want to check the default schema. What should they run to get this?



Explanation: The schema_name() function will return your default schema if no parameter is provided. Ref: SCHEMA_NAME() -

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
SQL Server Reporting Services 2017 - Error 1503 - Getting this error when SSRS (Express) service restarts: System.InvalidOperationException: Cannot start service SQLServerReportingServices on computer '<MyWin10DesktopPC'> ---> System.ComponentModel.Win32Exception: The service did not respond to the start or control request in a timely fashion    --- End of inner exception stack trace ---    at System.ServiceProcess.ServiceController.Start(String[] args)    at System.ServiceProcess.ServiceController.Start()    at ReportServicesConfigUI.Panels.ConfigurationPanelWithErrors.StartOrStopServiceTask(Boolean start, String serviceName) […]
Weird network issue - Hi, I have an ssis package, that when I run it from the virtual server (the package is deployed on the catalog) and I use a job to run the package it takes 18 hours. I have set up another server (very small one called TEMP), is also a virtual server and deployed the same […]
SQL Server 2017 - Development
Importing JSON - I am attempting to import JSON into my db and I'm getting stuck on a few nested objects.  In this particular JSON fields are omitted when there isn't a value for that particular record, and that includes the nested objects.  However, in some cases there is more than one nested object and I only want […]
Parse character string into multiple fields - I need to parse a VARCHAR(255) field into four fields, three VARCHAR(5) and one VARCHAR(255). The VARCHAR field to be parsed is a variable length for example: 122 667|6 71|77|120 71|77|219|427|122|670|120|10 The characters before the first | go into field 1 The characters after the first | but before the second | go into field […]
SQL Server 2016 - Administration
Database file size question - Hi all, I am working with a database from a third-party vendor that seems a bit odd to me. I just wanted to get your opinion so that I know I'm not going crazy. Just some facts about the database: SQL Server 2016 compatibility level Total size of the entire database is about 100 gigs […]
SQL Server 2016 - Development and T-SQL
Find rows older than 60 days with Epoch time format - Hi, I'm trying to purge this table for any rows older than 60 days but the LogTime column is in Epoch format.  I've read articles on how to convert it to human readable format and i just can't get it to work.  Here is the table data. LogLevel LogTime INFO 1574434804509 INFO 1574434804509 INFO 1574434804509 […]
Administration - SQL Server 2014
Slow deletes - Hi All, I have table with 1574963 rows and grown up to 1.21 Tera Bytes. Table has a clustered idx and additional nonclustered idx is created. App team is trying delete/archive some data in small chunks. CREATE TABLE [dbo].[LogData]( [c1] [bigint] NOT NULL, [c2] [int] NOT NULL, [c3] [int] NOT NULL, [c4] [ntext] NOT NULL, […]
Development - SQL Server 2014
Syntax error using openquery() - Not quite sure what SQL is complaining about here so need some fresh eyes please. I'm trying to put the result of an openquery() into a variable. My code is: declare @ram_id varchar(50), @tsql nvarchar(1000) set @tsql = 'select @id = service_ref from OPENQUERY([remoteserver],"select Service_Ref from [remoteDB].[dbo].[Service_Request] where service_request_number = ''2''")' exec sp_executesql @tsql, N'@id […]
Using stored procedures/dynamic sql to add columns - I am trying to use stored procedures to join columns to one table. I am joining more than 1 table to the original table but they have a common identifier. For example, right now I have Table 1 Id_number         month 82284                  jan 82284    […]
EXECUTE sp_executesql - Cordial Saludo. tengo el siguiente script DECLARE @SqlString NVARCHAR(500) DECLARE @ParmDefinition NVARCHAR(500) DECLARE @Valor_Tmp Numeric(12,2) SET @SqlString=LTRIM(RTRIM(@ValorFrm)) SET @ParmDefinition = N'@Valor_OUT Numeric(12,2) OUTPUT' EXECUTE sp_executesql @SqlString,@ParmDefinition,@Valor_OUT=@Valor_Tmp OUTPUT SET @Valor=@Valor_Tmp la variable @ValorFrm='SET @Valor_OUT=983,5-2(15.3)-1' Esta variable es una construccion similar a a+2(b)-1 construida por programa. El problema es que en el SSMS funciona y ejecuta bien […]
A cursor with the name already exists - Hi, I have this code in a job that needs to run every 5 minutes. It works most of the time without issue. But 4-5 times a day I get the "a cursor with the name already exists" error. I added the LOCAL to the cursor declaration, but still get the error. I checked for […]
SQL 2012 - General
Place data on another drive - Hi all! I have had to  change from my good old dependable server to a local laptop. That gives some big challenges...   One of my databases is app. 2GB, and that just cannot be on a laptop harddisk - At least not mine. In comes my Synology drives, 2 X 8 TB   But […]
How to understand the SQL Server Statistics information and Query Cost of Execut - In figure 1, there are SQL statements , these 2 sql statments join 2 tables, one is on current database server, the other is on another database server. the first SQL statement runs by SQL Server linker server to join; the second SQL statement uses openquery and linked server to get same data. and in […]
Find how many week day crossed in a given date - Team I have a scenario in SQL Query. If I Give a day, The output should say which day and how many days crossed in a given month For Ex If I give 04th Dec 2019 as input > It should say, It is Tuesday and this date is first tuesday If the Input is […]
SQL Server 15 - Administration
Bug in SQL 2019 - Error writing Log Shipping job history - Has anyone come across this bug, and if so have they found a fix for it? From what we can see the error is in a stored proc that seems to be in the Resource Database, and we don't have visibility on it. While Log Shipping still works, we have found without the Log History […]


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 This newsletter was sent to you because you signed up at
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.


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