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

SQL Server 2025 Excitement

Are you looking forward to SQL Server 2025? Or perhaps you think this is just another release, or perhaps you are not looking for new features or capabilities in your environment. Maybe you don't care about new things, but are looking for enhancements to features introduced in 2017/2019/2022. There is certainly no shortage of things that can be improved from previous versions (cough graph *cough).

I ran across an article on the five things that one person is looking forward to in SQL Server 2025. It's a good list, and the things included make me consider an upgrade. Certainly, any improvements in the performance area, especially with all the investments made in Intelligent Query Processing over the last few versions, are worth evaluating. They might help your workload, or they might not, but if they do, then upgrade.

However, test, test, test. I can't stress that enough. Test with your workload, not some random queries. Spend some time setting up WorkloadTools or find some other way to replay a set of queries from multiple clients to see if performance improves. It's far too easy to look at a query in isolation and make a snap decision. With a load, sometimes performance looks different.

The HA improvements are also enticing, especially the idea of offloading backups more easily. Of course, this means you need to ensure you can and know how to, restore a complex set of backups in an emergency situation. Distributed systems are complex, and backups from multiple nodes (remember, you might get unexpected failovers) are a distributed system. Make sure you consolidate those, and plan for potential disruptions if your backup system/share/location is gone. Local backups are always nice, but Murphy's law might cause you problems in multiple ways with multiple nodes and backups moving across them.

Again, test, test, test, and consider weird situations taking place. They will occur, and you should ensure your staff has a simple way to deal with them.

We've had a few SQL Server versions that leaped forward. SQL Server 2005 changed the paradigm, and I think SQL Server 2016 was another time of dramatic growth. Will SQL Server 2025 be one of those versions, or is it one that has a few incremental improvements?

Let me know your thoughts today.

Steve Jones - SSC Editor

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

 
  Featured Contents
SQLServerCentral Article

Inside the Walls of Azure SQL MI

Tonie Huizer from SQLServerCentral

Here's a teaser about Azure SQL Managed Instance, which isn't quite PaaS or IaaS, but isn't as locked down as you might think. This is the introduction to a three part series to follow.

External Article

Parent – Child Task Automation in Snowflake via Task Graph

Additional Articles from SimpleTalk

This article explores how to use Snowflake’s task features to implement parent-child data workflows. We will walk through a real-world scenario in which a healthcare organization manages patient records using a sequence of tasks for data ingestion, transformation, enrichment, and reporting.

From the SQL Server Central Blogs - Comparing Microsoft Fabric Alternatives in AWS, GCP, and OCI in 2025

Daniel Janik from Confessions of a Microsoft Addict

Microsoft's unified analytics platform, Fabric, simplifies integration across various tools in Azure by offering seamless authentication and a comprehensive set of features. Although alternatives exist in AWS, GCP, and...

Blog Post

From the SQL Server Central Blogs - Apply for a 2025 PASS Summit Scholarship

K. Brian Kelley from Databases – Infrastructure – Security

Redgate is offering 13 PASS Summit scholarships which not only includes the 3-day ticket to the main part of the PASS Summit, but also $1400 towards travel and accommodations....

SQL Cookbook: Query Solutions and Techniques for All SQL Users

Steve Jones - SSC Editor from SQLServerCentral

You may know SQL basics, but are you taking advantage of its expressive power? This second edition applies a highly practical approach to Structured Query Language (SQL) so you can create and manipulate large stores of data. Based on real-world examples, this updated cookbook provides a framework to help you construct solutions and executable examples in several flavors of SQL, including Oracle, DB2, SQL Server, MySQL, and PostgreSQL.

 

  Question of the Day

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

 

What is Between?

I have a table of products in SQL Server 2022. There are sequential items in the table with ProductIDs of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. If I run this code, how many rows are returned?
SELECT * FROM dbo.Products WHERE ProductID BETWEEN 4 AND 7; 

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)

How Many Can Be the Greatest

I am trying to analyze a number of columns in a large table to determine the highest value for each row. In SQL Server 2022, we have the GREATEST function, which will return the greatest value from those columns passed in.

How many columns can I include in an expression like this:

select GREATEST( col1, col2, col3, ...)

Answer: 254

Explanation: Up to 254 arguments can be included. Ref: GREATEST - https://learn.microsoft.com/en-us/sql/t-sql/functions/logical-functions-greatest-transact-sql?view=sql-server-ver16

Discuss this question and answer on the forums

 

Featured Script

Stored Procedure Generation Script

Deepam Ghosh from SQLServerCentral

This script produces scripts for all the stored procedures in a database.

# Load SMO Assembly
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null

# Define SQL Server connection details
$serverName = "" # Replace with your SQL Server name
$databaseName = "" # Replace with your database name
$rootOutputFolder = "F:SQLScripts" #Replace with your desired output folder
$outputFolder = "$rootOutputFolder$serverName$databaseName" #Creating Subfolder with Database Name

# Create the output directory if it doesn't exist
if (-not (Test-Path -Path $outputFolder)) {
New-Item -ItemType Directory -Path $outputFolder | Out-Null
}

try {
# Connect to the SQL Server
Write-Host "Connecting to SQL Server..." -ForegroundColor Cyan
$server = New-Object Microsoft.SqlServer.Management.Smo.Server $serverName
$database = $server.Databases[$databaseName]

# Check if the database exists
if ($null -eq $database) {
Write-Error "Database '$databaseName' not found on server '$serverName'."
exit
}

# Scripter object and options
$scripter = New-Object Microsoft.SqlServer.Management.Smo.Scripter $server
$scripter.Options.ScriptSchema = $true # Script schema only
$scripter.Options.ScriptData = $false # No data scripting
$scripter.Options.ToFileOnly = $true # Output to file
$scripter.Options.IncludeHeaders = $true # Include headers
$scripter.Options.AppendToFile = $false # Overwrite file
$scripter.Options.Encoding = [System.Text.Encoding]::UTF8
$scripter.Options.ScriptDrops = $false # Don't script DROP statements
$scripter.Options.IncludeDatabaseContext = $true # Include "USE [DatabaseName]"

# Iterate through all stored procedures
Write-Host "Scripting out stored procedures..." -ForegroundColor Green
foreach ($storedProcedure in $database.StoredProcedures) {
if ($storedProcedure.IsSystemObject -eq $false) {
$scriptName = "$($storedProcedure.Schema)_$($storedProcedure.Name).sql"
$scriptPath = Join-Path -Path $outputFolder -ChildPath $scriptName

# Configure output file
$scripter.Options.FileName = $scriptPath

# Generate the script
$scripter.Script($storedProcedure)

Write-Host "Scripted: $scriptName" -ForegroundColor Yellow
}
}

Write-Host "All stored procedures have been scripted to: $outputFolder" -ForegroundColor Green
}
catch {
Write-Error "Error: $($_.Exception.Message)"
}

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
Modifying the fetch size for Linked Server - Hi, Problem: Pulling several million row table from Oracle DB into SQL server via a Linked Server takes too long: 28M rows and 2GB of data from Oracle to SQL server took 17 hours. (However we are able to scp via OS much faster: we get 3.5MB/s to 8.5MB/s; we transfer 3Gb file in about […]
Alias of a SQL Server - Was hoping to get some help on setting up our SQL Server with an alias.  Currently, we run reports off it and then output the files on a folder structure on the server.  For instance, we run SQL Job "Create Employee Retention Report", and it exports a file to "D:\Reports\Employees\EmployeeRetentionReport.txt", which is a drive on […]
SQL Server 2019 - Administration
Transitioning AlwaysOn Availability Group to Synchronous Commit Mode - Hello, I have a SQL Server with an AlwaysOn configuration consisting of three replicas operating in asynchronous commit mode. I have received a request to switch to synchronous commit mode, but I am concerned about potential data loss risks. Currently, the database is in "Synchronizing" status. My question is: What will be the status of […]
SQL Server 2019 - Development
Window Functions in a View - Is there a trick to get a where clause filter to push into a view that has window functions that don't include that filter in the window function partition?
SQL Azure - Administration
Azure Database Watcher Monitoring - Hi, I’ve provisioned an Azure Database Watcher to monitor our 4 Azure SQL Managed Instance, using the free tier of Azure Data Explorer. However, I’m currently overwhelmed by the visual data and trying to understand which performance metrics are most critical—particularly regarding Compute. Could someone point me to a comprehensive guide or documentation that explains […]
Editorials
Patching the Patch - Comments posted to this topic are about the item Patching the Patch
Can You Ask for a Raise? - Comments posted to this topic are about the item Can You Ask for a Raise?
What is a Failed Deployment? - Comments posted to this topic are about the item What is a Failed Deployment?
PostgreSQL
How to add metadata for every record in Azure postgres tables - Hi, I have a situation in one of the applications I am working on where prior to going live in production, we are going to migrate data from legacy systems over the period of few weeks. And at the same time, there will be activity from users in this production application. i.e, new records generated […]
Article Discussions by Author
Stored Procedure Generation Script - Comments posted to this topic are about the item Stored Procedure Generation Script
SQL Server 2022 - Administration
One big server with multiple instances, or multiple smaller servers... - We're currently on SQL 2019 and will likely be looking to migrate to a newer version in a year or so (definitely before Extended Support runs out,) and I'm looking to try to save some pennies for the org.  Currently, we host SQL instances for several different orgs and their applications (so multiple, often unrelated, […]
CDC & Azure Managed Instances - Performance degredation - Anyone got any good advice for performance tuning CDC on a Managed Instance? We are seeing around a 30-35% performance degradation (mainly runtime), with CDC enabled in test. Done the usual, put the change tracking tables on its own file and file group, set the capture job to poll every second (to try and keep […]
SQL Server 2022 - Development
OpenQuery with Application Intent specified runs on primary node. - I have an Open query that runs on an Always On server via a linked server and does selects * only. Select * into #Temptable from openquery (linked server) The linked server in its connection properties specifies application intent as ReadOnly, so this query should run on the secondary node but we find that it […]
average duration increasing inline with exec counts - As the title says , I've got a handful of stored procs where the avg duration rises and falls pretty much mirroring the exec count. I've looked to see if there's any blocking chains they're involved in and cant seen anything that would account for the behaviour. Whilst Id obviously expect total duration to do […]
How do I add all the values in the column considering it to be in hh:mm:ss:ms - How do I add all the values in the column considering it to be in hh:mm:ss:ms Please help.  
 

 

RSS FeedTwitter

This email has been sent to [email protected]. To be removed from this list, please click here. If you have any problems leaving the list, please contact the [email protected]. 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.
[email protected]

 

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