Introduction
SQL Server 2025 marks one of the biggest shifts in the SQL Server ecosystem since the 2016 release. We finally get native JSON storage, full RegEx support, BASE64 functions, PRODUCT aggregates, JSON indexes, and the long-awaited external REST endpoint invocation. The goal of this series is to walk through every major new engine feature with practical examples, context, and DBA-focused takeaways.
This first post sets the stage. We’ll look at what SQL Server 2025 brings to the table, how it differs from previous builds, and how to deploy it cleanly for development or production.
What’s New in SQL Server 2025
Below are the headline features that matter most to DBAs, data engineers, and developers.
1. Native JSON Data Type
SQL Server finally gets real JSON storage instead of NVARCHAR hacks.
Supports:
• JSON validation
• JSON indexes
• JSON functions (CONTAINS, ARRAYAGG, OBJECTAGG)
2. Full Regular Expression Support
Five new functions:
• REGEXP_LIKE
• REGEXP_SUBSTR
• REGEXP_REPLACE
• REGEXP_INSTR
• REGEXP_MATCHES
• REGEXP_SPLIT_TO_TABLE
• REGEXP_COUNT
These match what Oracle and PostgreSQL have had for years.
3. BASE64 Encoding/Decoding
Built-in functions for secure transport, token handling, and obfuscation patterns.
4. PRODUCT Aggregation Function
A mathematically appropriate complement to SUM and AVG.
5. JSON Index
A real, engine-level index type for JSON columns.
6. External REST Endpoint Invocation
This is the sleeper feature.
SQL Server can now call REST and GraphQL endpoints directly through:
EXEC sys.sp_invoke_external_rest_endpoint :
setup.exe /QS /ACTION=Install /FEATURES=SQL,Tools
/INSTANCENAME=MSSQLSERVER
/SQLSVCACCOUNT="NT Service\MSSQLSERVER"
/SQLSYSADMINACCOUNTS="DOMAIN\DBAGroup"
C. Container or Azure Deployment
SQL 2025 is available as:
mcr.microsoft.com/mssql/server:2025-latest
Post-Install Configuration Checklist
This is the list I recommend to every team.
1. Enable Query Store
SQL 2025 Query Store now captures RegEx query patterns and JSON index behavior.
ALTER DATABASE AdventureWorks2025
SET QUERY_STORE = ON;
2. Configure Automatic Tuning
Now includes JSON index recommendations.
ALTER DATABASE AdventureWorks2025
SET COMPATIBILITY_LEVEL = 165;
3. Validate Compatibility Level
Set to 165 for SQL 2025.
ALTER DATABASE AdventureWorks2025
SET COMPATIBILITY_LEVEL = 165;
4. Check for Deprecated Features
SQL 2025 retires:
• SQL Mail
• sp_makewebtask
• Some XML indexes (replaced by JSON index)
Examples: Quick Feature Validation
Validate JSON data type
CREATE TABLE dbo.TestJSON (
Id INT IDENTITY PRIMARY KEY,
Payload JSON
);
INSERT INTO dbo.TestJSON (Payload)
VALUES ('{ "player": "Luke", "rank": "Elite" }');
Check RegEx availability
SELECT REGEXP_LIKE('Valhallan', 'hall');
EXEC sys.sp_invoke_external_rest_endpoint
@method = 'GET',
@url = 'https://api.chucknorris.io/jokes/random';
BASE64 test
SELECT BASE64_ENCODE(CONVERT(VARBINARY(200), 'Valhallan2025'));
Workshop: Set Up Your SQL 2025 Lab
Use this as a hands-on exercise.
Step 1. Create a New Database
CREATE DATABASE SQL2025_Lab;
ALTER DATABASE SQL2025_Lab SET COMPATIBILITY_LEVEL = 165;
Step 2. Validate New Functions
Run:
SELECT REGEXP_INSTR('abc123', '[0-9]+'),
REGEXP_COUNT('x1y2z3', '[0-9]');
Step 3. Build a JSON Table With JSON Index
CREATE TABLE Orders2025 (
OrderId INT IDENTITY PRIMARY KEY,
Details JSON
);
CREATE JSON INDEX IX_Orders2025_Details ON Orders2025(Details);
Step 4. Invoke a REST Endpoint
Use a public API:
EXEC sys.sp_invoke_external_rest_endpoint
@method = 'GET',
@url = 'https://api.github.com';
Step 5. Capture Everything in Query Store
SELECT * FROM sys.query_store_query_text;
Final Thoughts
SQL Server 2025 is the most modernized engine Microsoft has ever shipped.
The introduction of JSON, RegEx, BASE64 utilities, and external REST invocation means SQL Server finally dips into a hybrid operational model that blends relational storage with microservices, serverless compute, and modern data integration. This series will go deeper into each feature with real-world use cases backed by full scripts and reference implementations.
Day 2 will focus on the native JSON data type and its brand-new function family.
References
• Microsoft SQL Server 2025 Announcement
https://learn.microsoft.com/sql/sql-server/what-s-new-in-sql-server-2025
• JSON in SQL Server
https://learn.microsoft.com/sql/t-sql/json
• Query Store
https://learn.microsoft.com/sql/relational-databases/performance/query-store
• sp_invoke_external_rest_endpoint
https://learn.microsoft.com/sql/relational-databases/system-stored-procedures/sp-invoke-external-rest-endpoint
Discover more from SQLyard
Subscribe to get the latest posts sent to your email.


