Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
Ad for State of Database Landscape survey
The Voice of the DBA
 

Poor Name Choice

I wrote recently about some work with Redgate Clone, and one of the things I did was start up a blank container instance of SQL Server from the image named empty-sql-current. This image contains SQL Server 2019. Clearly, "current" was a poor choice.

I see this often in various places, where someone will reference "current", "new", "latest", or some other term that denotes the most recent changes. If everyone reading the reference is doing so with knowledge of the past and at a time close to publication, this works fine. However, a year later, does this make sense? At the same time, I do like names that might be used in scripts. If I always want developers pulling the latest item, I might use latest. However, if versions are important, than "latest" or "current" might not be the best choice.

It's like seeing the words "the fastest SQL Server ever" (or pick your technology) in a release announcement. At that time, it might be the fastest SQL Server release, but when the next version is released (hopefully) that won't be true.

As I've matured, I aim to build things that last for the future, thinking beyond what the world looks like right now. This includes architecture decisions and more, but it also includes naming. Reference specific versions, times, etc. with the idea that I want to convey some information with the name. I even name my containers with the port I use because it makes it really easy to see which database container is running on 1433 and which is 41433.

The other consideration for naming, for me, is to include data in the name that I will use for searching or sorting. Maybe this means using good date practices, like 2025-05-01 and 2025-10-03 to ensure my files sort correctly. That might be very important for things like backup files. Maybe it's using something like "Customer_Copy_Delete_After_Year_Close" for a copy of data that might be relevant through our current financial cycle.

I often do like using names that come to mind first, as this can help me find things, but I also have learned to be more explicit when using names as a way to convey information. With modern computing and support for large names, it sometimes pays to be descriptive.

The only thing I try to avoid is spaces. For the most part, file explorers and web servers handle spaces, but sometimes things break, so I've learned to avoid spaces where possible.

Steve Jones - SSC Editor

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

Ad for State of Database Landscape survey
 
 Featured Contents
SQLServerCentral Article

T-SQL in SQL Server 2025: Substring Changes

Steve Jones - SSC Editor from SQLServerCentral

This article takes a look at the changes in SQL Server 2025 to the SUBSTRING function.

External Article

SQL Server CROSS APPLY and OUTER APPLY Helpful Examples

Additional Articles from MSSQLTips.com

Microsoft introduced the APPLY operator in SQL Server 2005. Similar to a JOIN, it allows correlation between two table expressions. The key difference between the JOIN and APPLY operators is when you have a table-valued expression on the right side and want to evaluate it for each row from the left table expression. Since they produce similar results, when do you choose an APPLY versus a JOIN?

Blog Post

From the SQL Server Central Blogs - Creating a Striped Backup Set with AI

Steve Jones - SSC Editor from The Voice of the DBA

I needed to test a striped backup, so I decided to ask the AI’s for help. This is part of a series of experiments with AI systems. The Problem...

Blog Post

From the SQL Server Central Blogs - Trace Flag 1448 – Lessons from a Technical Interview

gbargsley from GarryBargsley

In SQL Server environments where transactional replication runs alongside Always On Availability Groups (AGs), DBAs sometimes face a frustrating scenario: replication stalls when a secondary replica or subscriber is...

Blog Post

From the SQL Server Central Blogs - Microsoft Purview: The Key Benefits of Data Governance

James Serra from James Serra's Blog

I still see a lot of confusion about the functionality of Microsoft Purview ever since multiple products were combined into it, so I wanted to write this blog to...

Murach's SQL Server 2022 for developers

Site Owners from SQLServerCentral

Murach's SQL Server 2022 for Developers is a comprehensive guide to database design and management. This computer book teaches essential SQL statements through clear examples and practical exercises. The book's unique paired-pages format makes learning database software concepts easier, while providing in-depth coverage of database management fundamentals. Ideal for both beginners and seasoned developers seeking to enhance their data management skills.

 

 Question of the Day

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

 

Getting the Indexed Columns

I run this code on SQL Server 2022 to get a list of all the indexes and their key columns. What is returned?
SELECT   
    INDEX_COL (N'AdventureWorks2017.Sales.SalesOrderDetail')

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)

Slipstream parameters

What parameters are needed to enable a slipstream installation for setup.exe (SQL Server setup)?

Answer: The UpdateEnabled, UpdateSource, and Action=Install parameters are needed

Explanation: You need all three. The Update parameters tell the slipstream process to work and the Action=Install starts the install. Without the last one setup just opens in the GUI. Ref: Slipstream installation - https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-using-slipstream?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 - Administration
SQLPS and syspolicy_purge_history job - The SQLPS.exe file has gone AWOL on 2 of my 4 SQL servers, ie, not in the path select Agent_exe from msdb.dbo.syssubsystems where subsystem = 'PowerShell'​ nor anywhere to be found on these machines. As a result, syspolicy_purge_history fails. And in fact, the job's status is "suspended", and I can't even stop it. I am […]
SQL Server 2019 - Development
how to write this query? - Hi everyone I am a bit stuck on how to write this query. Below is test data: drop table if exists #price_cutoff drop table if exists #nr_data drop table if exists #nt_data create table #price_cutoff ( [SYMBOL] [nvarchar](10) NOT NULL, [TRADE_DATE] [date] NOT NULL, [NR_PRICE] [float] NULL, [NT_PRICE] [float] NULL ) create table #nr_data ( […]
Line number in error message doesn't match up with line number in code - Hi everyone I have a 1000 plus line query and I am getting an error: Msg 8115, Level 16, State 6, Procedure dbo.TestQuery, Line 1036 [Batch Start Line 2] Arithmetic overflow error converting float to data type numeric. It says line 1036 but when I go to that line I get something that can't possible […]
Analysis Services
Automatically generate tabular model partitions - Hi. I hope someone can give some useful suggestions. My workplace have a suite of SSAS tabular models. They used to be created in compatibility level 1103. We then used a free piece of software with them called Partition Manager (which was a free download from Codeplex, to show it's age!) to dynamically generate partitions […]
Anything that is NOT about SQL!
Are things getting beyond reason? - My wife apparently ask her phone a question and below is what she sent me in the answer to her query.  I look at this and can only shake my head in wonder.  If this is AI in action, I think it's time to kill it off.  Imagine the bandwidth required to move this much […]
Editorials
Be Wary of Data - Comments posted to this topic are about the item Be Wary of Data
I Love Editorials - Comments posted to this topic are about the item I Love Editorials
The Journey to PostgreSQL (or anything) - Comments posted to this topic are about the item The Journey to PostgreSQL (or anything)
Article Discussions by Author
Locking Hierarchies - Comments posted to this topic are about the item Locking Hierarchies
Why Indexes are Important Beyond Faster Execution of Queries - Comments posted to this topic are about the item Why Indexes are Important Beyond Faster Execution of Queries
Powershell script to generate SQL server Inventory in CSV format - Comments posted to this topic are about the item Powershell script to generate SQL server Inventory in CSV format
Database Ledger in SQL Server 2022 - Comments posted to this topic are about the item Database Ledger in SQL Server 2022
Azure SQL Database MAXDOP - Comments posted to this topic are about the item Azure SQL Database MAXDOP
Building a RESTful API with FastAPI and PostgreSQL - Comments posted to this topic are about the item Building a RESTful API with FastAPI and PostgreSQL
SQL Server 2022 - Development
repeat results without loops, MSSQL2005 Express - hello everybody, new here and this is my first question I have a table contains: Name, Id, joinDate My question is that: I need a query to list all years between current date and joinDate, as the following as instance: Id------------------------Name----------------------empDate 1--------------------------John-----------------------6-8-2020 result: 1--------------------------John-----------------------6-8-2021 1--------------------------John-----------------------6-8-2022 1--------------------------John-----------------------6-8-2023 1--------------------------John-----------------------6-8-2024 1--------------------------John-----------------------6-8-2025 Thanks in advance.
 

 

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

 

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