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

Segments for Protection

This editorial was originally published on 18 Jun 2019. It is being re-run as Steve starts his sabbatical today and this gives Grant and Kellyn a few more days to get organized.

I haven't worked in many high security environments. While I have worked in a nuclear power plant, we had tremendous physical security and air gapped control systems, but cyber-security was still fairly loose from the perspective of internal systems. If anyone got to a local machine, they could have done some serious hacking and likely found lots of open information on our LAN. This was pre-Internet days, and I wonder if security has improved in those plants with the advent of the Internet and http protocols. I certainly hope so.

I thought back to that environment as I was reading a network security piece from DCAC on some of the problems they have seen with ransomware attacks. There are all sorts of things you can do to protect and educate users, but ultimately those humans are going to be a weak link. As a result, locking down network, and potentially account, access to servers is important.

In the piece, Joey talks about needing to use a special laptop, two keycards, and jump hosts to connect to a server for one customer. I have another customer that has a similar arrangement, using a jump box that's in a data center to connect to servers. Nothing runs from his desktop, with no way to connect to the actual DMV other than using RDP to visualize SSMS on a remote machine. In their systems, Microsoft has implemented some very secure SAW and PAW systems to allow access to Azure systems in a secure way for their employees, while protecting customers and auditing all actions.

These are all cumbersome, annoying, and painful solutions. They slow down the ability to get things done, but they also limit the mistakes people make. Who among us has logged onto the wrong machine and run a script? Worse, who might have granted access on the wrong instance before realizing it and adding the privilege on the right server. After doing that, did you remove the mistake from the first instance? Maybe, but experience has shown me many people plan to remove things later and then forget to actually perform the action.

This seems especially relevant today. I got a message as I was writing this from a user on one of the SQLServerCentral social network platforms. This user wanted to know if they could restore their database with only a log file as their data file was encrypted with ransomware. That's a bad day at work, and likely one that occurred because every machine on the network can connect with every other one. Convenient, but insecure and certainly a problem today.

This is one place the cloud forces you to be better. Everything is locked down from the start because Microsoft (Azure) and Amazon (AWS) do not trust the customers on their internal networks. They have to segregate everything, and force us to explicitly configure things ourselves. They make it easy, but we still need to do the work.

It's a scary time to work on systems, with constant scanning, probing, and attacks taking place on systems. It's also a time where we have more tools, templates, scripts, and capabilities for defense. We should use those to better protect our systems from ourselves.

Steve Jones - SSC Editor

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

 
  Featured Contents
SQLServerCentral Article

How to Work with RStudio and SQL Server

Daniel Calbimonte from SQLServerCentral

Learn how to get started running R scripts in R/Studio for data analysis.

External Article

Data Encoding Schemes

Additional Articles from SimpleTalk

Your choice of how you encode data can be significant. With computers and databases, you have a wide range of options. As a programmer, you will likely be called upon at some time in your career to design and coding scheme for particular application. It would really help if you at least avoided designing a bad one.

From the SQL Server Central Blogs - Logging in Azure Data Factory data flows

Rayis Imayev from Data Adventures

(2025-June-15) Long gone are the days when a data engineer could simply focus on building a new data integration solution. You’d establish connections to one or more source datasets, review...

Blog Post

From the SQL Server Central Blogs - T-SQL Tuesday #187: It’s Extended Events. It’s Always Extended Events

Grant Fritchey from The Scary DBA

Joe Fleming wants to know how I solve weird problems. I’m not sure I’m actually qualified to answer this question since I, myself, am a weird problem, but I’ll...

Pro T-SQL 2022: Toward Speed, Scalability, and Standardization for SQL Server Developers

Site Owners from SQLServerCentral

Learn how to write and design simple and efficient T-SQL code. This is a hands-on book that teaches you how to write better T-SQL with examples and straightforward explanations.

 

  Question of the Day

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

 

Finding Heaps

If I am querying DMVs for a heap, what do I look for?

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)

Multiple Defaults

In my SQL Server 2022 database, I run this code:

ALTER TABLE dbo.OrderHeader ADD ModifiedStamp DATETIME CONSTRAINT df_Created_Getdate DEFAULT GETDATE() GO 

I decide I need to add auditing to another table and run this:

ALTER TABLE dbo.Tracker ADD Created DATETIME CONSTRAINT df_Created_Getdate DEFAULT GETDATE() GO 

What happens with these statements?

Answer: The first statement runs successfully. The second errors.

Explanation: The first statement completes fine, but the second fails as all default constraints in a database need to be uniquely named. Ref: Adding default values to columns - https://learn.microsoft.com/en-us/sql/relational-databases/tables/specify-default-values-for-columns?view=sql-server-ver16#use-transact-sql-to-specify-a-default

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
Getting year part out of a string that represents a date - Hi, I have a requirement to fetch the year from an imported .csv  file that can hold any kind of date , in any format as delivered to use by municipalities that manage to get their own ideas of the template they need to use. Basically the date can have many formats , like  YYYY-MM-DD […]
Dropping a PK constraint. - I will have to test this next week, but will not have a chance before Friday. My question is, if I backup table data, drop a PK to add it back as an identity PK, will the foreign keys referencing the PK still be in tact? The new PK (now with identity) will keep the […]
SQL Server 2019 - Administration
disable remote access - If I configure remote access to 0 on my servers, am I right in saying that the only things that would be affected are any linked servers && log shipping jobs. Thank you.
Creating Maintenance plan to run annually - What is the best way to set the schedule of a maintenance plan or a SQL Agent job to run annually. We need to move data to an archive database for a table end of each year for the oldest year. I have the scripts all ready but the scheduling is the issue. For this […]
SQL Server 2019 - Development
Is there a way to implement ROWS between logic? - Hi everyone SUM function has the option to select ROWS BETWEEN parameter to allow for a rolling sum calculation.  This is very useful.  I would like to do the same for PERCENT_RANK but this function does not have this option available.  Suppose there are 100 daily records and I want to calculate the PERCENT_RANK on […]
skipping the second line in a spreadsheet being read by ssis - hi, my new user provided a new multi tab (sales, customer etc. not what i really wanted either) excel spreadsheet for ingestion by our sales warehouse etl.   Its second line is his erp's column names.   The first line is somewhat close to what i asked for in column names.   for the moment im looking the […]
Editorials
Multiple Monitoring Tools - Comments posted to this topic are about the item Multiple Monitoring Tools
SQL Server 2025 Excitement - Comments posted to this topic are about the item SQL Server 2025 Excitement
Patching the Patch - Comments posted to this topic are about the item Patching the Patch
Events
Crosstabs and Pre-Aggregations - Reporting on Steroids by Jeff Moden - The LA Data Platform User Group had a necessary speaker cancellation for the group meeting on 18 June 2025.  They fired a flare asking for a replacement speaker and I responded.  And so I'm giving the presentation that's in the title of this post. I had to limit the size of the abstract and so […]
Article Discussions by Author
How to Choose the Right Tool for MS SQL to PostgreSQL Migration - Comments posted to this topic are about the item How to Choose the Right Tool for MS SQL to PostgreSQL Migration
Inside the Walls of Azure SQL MI - Comments posted to this topic are about the item Inside the Walls of Azure SQL MI
SQL Server 2022 - Development
XML_COMPRESSION for existing tables - We are in the process of upgrading to SQL Server 2022 and would like to make use of the XML compression feature it offers, as we have a handful of tables that store considerable amounts of XML data. I suspect the answer is "no", but is there a way to enable XML compression on an […]
SQL - Conditional merge join - I want to add a condition in the joining columns part of the merge statement like this : Merge dbo.tblDest as target using (select ...) as source on target.EmpID =  source.EmpID and target.AwardID = source.AwardID  --this second condition I want to add only if the source.AwardID is not null. How to do that pls advise. […]
Tracking changing prices and recalculating inventory value - I'm trying to figure out a how to do average costing over time in T-SQL... I'll use up ingredient inventory over time, and every six weeks buy more.  So the "leftover" ingredients would be valued at [Weight Remaining] * [Per Kg Price]. Then when I buy new inventory, the new total value would be [Weight […]
 

 

RSS FeedTwitter

This email has been sent to newsletter@newslettercollector.com. 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

 

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