powershelldba.de

SQL Server 2025: What's New for Developers and DBAs

SQL Server 2025 is the most developer-facing release in years: a native vector type with built-in AI similarity search, a real JSON data type, regular expressions in T-SQL, and near real-time mirroring into Microsoft Fabric. Here's what actually changes for the people who write the queries and the people who keep the server up.

About this article: SQL Server 2025 is a new release and several of the features below shipped through a public preview cycle. Syntax and availability can still shift between preview and general availability, and some capabilities depend on edition, compatibility level, or a database-scoped setting. Treat the examples as a working orientation and confirm the exact surface against the current Microsoft documentation before you build on it.

The Headline: AI Moves Into the Engine

The defining theme of SQL Server 2025 is that AI workloads no longer have to live outside the database. Instead of exporting rows to a separate vector store, you can keep embeddings next to the data they describe and query them with plain T-SQL.

A Native Vector Type

Embeddings — the numeric fingerprints that models produce for text, images, or documents — get a first-class VECTOR type. You declare the dimension count once and store the embedding directly on the row:

-- Store an embedding right next to the data it describes
CREATE TABLE dbo.Products (
    ProductId   INT           PRIMARY KEY,
    Description NVARCHAR(4000),
    Embedding   VECTOR(1536)   -- dimensions must match your model
);

Similarity Search Without a Separate Vector Store

The built-in VECTOR_DISTANCE function ranks rows by how close their embedding is to a query embedding, using cosine, Euclidean, or dot-product distance. Combined with the approximate DiskANN-based vector index, this scales to large tables instead of forcing a full scan:

-- Find the 10 most similar products to a query embedding
SELECT TOP (10)
       ProductId,
       Description,
       VECTOR_DISTANCE('cosine', Embedding, @queryEmbedding) AS Distance
FROM   dbo.Products
ORDER  BY Distance;
Why this matters: semantic search, recommendations, and retrieval-augmented generation (RAG) become a join and an ORDER BY — inside the same transaction, permission model, and backup as the rest of your data. No second system to secure, sync, or audit.

Calling Out to Models From T-SQL

You can generate embeddings or call scoring endpoints without an application tier in the middle, using the external REST endpoint procedure (first seen in Azure SQL, now in the box product):

DECLARE @response NVARCHAR(MAX);

EXEC sp_invoke_external_rest_endpoint
     @url      = 'https://your-endpoint.example.com/embeddings',
     @method   = 'POST',
     @payload  = @requestJson,
     @response = @response OUTPUT;

For Developers: T-SQL Finally Catches Up

Regular Expressions Are Built In

The single most requested developer feature for years is here. No more CLR functions or nested PATINDEX/REPLACE gymnastics — SQL Server 2025 adds a family of ANSI-style regex functions:

-- Validate an email address
SELECT REGEXP_LIKE(Email, '^[^@]+@[^@]+\.[a-z]{2,}$') AS IsValid
FROM   dbo.Customers;

-- Strip everything but digits from a phone number
SELECT REGEXP_REPLACE(Phone, '[^0-9]', '') AS DigitsOnly
FROM   dbo.Contacts;

-- Pull an error code out of a log line
SELECT REGEXP_SUBSTR(LogLine, 'ORA-[0-9]{5}') AS ErrorCode
FROM   dbo.ImportLog;

The set includes REGEXP_LIKE, REGEXP_REPLACE, REGEXP_SUBSTR, REGEXP_INSTR, and REGEXP_COUNT — enough to replace most of the string-wrangling code that used to leak into the application layer.

A Real JSON Data Type

JSON is no longer "just NVARCHAR with helper functions." The dedicated JSON type validates on write and stores the document in an optimized binary form, so reads and property access are faster and malformed payloads are rejected up front:

CREATE TABLE dbo.Orders (
    OrderId INT  PRIMARY KEY,
    Payload JSON            -- validated, binary-optimized storage
);

-- New JSON aggregates build documents straight from a result set
SELECT JSON_OBJECTAGG(SettingKey VALUE SettingValue)
FROM   dbo.AppConfig;

SELECT JSON_ARRAYAGG(ProductName ORDER BY ProductName)
FROM   dbo.Products;

Change Event Streaming

Developers building event-driven systems get a supported way to push row-level changes out of the database to a streaming target such as Azure Event Hubs — an alternative to bolting on Change Data Capture readers or polling loops. It turns "notify the downstream system when this table changes" into a configured feature instead of a home-grown pipeline.

For DBAs: Performance and Operations

Intelligent Query Processing, Extended

The Intelligent Query Processing (IQP) family grows again, with the aim of fixing more bad plans automatically without you hand-tuning hints. The practical upshot is the same as every IQP wave: some workloads simply get faster on the new compatibility level — and a few need re-baselining because the optimizer now makes different choices.

⚠ Plan changes cut both ways: a new optimizer is the number-one source of "it was fast on 2019, it's slow now" reports after an upgrade. Capture a performance baseline before you migrate, and raise the compatibility level as a deliberate, separately tested step — not as part of the upgrade itself.

Optimized Locking

Optimized locking reduces lock memory and blocking under contention by holding fewer, shorter-lived locks. On busy OLTP systems this can meaningfully cut blocking chains — but it changes locking behavior, so concurrency-sensitive code deserves a look in staging rather than a blind trust that "less locking is always safe."

Microsoft Fabric Mirroring

SQL Server 2025 can mirror operational data into Microsoft Fabric / OneLake in near real time. Analysts query a continuously updated copy in the lakehouse while your production instance stays dedicated to transactions — no nightly ETL window, no heavy analytical queries competing with OLTP on the same box.

Security and Identity

Authentication continues its move toward Microsoft Entra ID, including managed identities for outbound connections (for example, the REST endpoint calls above) so credentials don't have to be stored in T-SQL or connection strings. As always, the operational rule holds: fewer standing secrets, more short-lived, auditable access.

Feature Summary

Area What's New Who Benefits Most
AI / Search Native VECTOR type, VECTOR_DISTANCE, DiskANN vector index, REST endpoint calls App developers, data/AI engineers
T-SQL Regular-expression functions, native JSON type, JSON aggregates Developers
Integration Change event streaming, Microsoft Fabric mirroring Data engineers, analytics teams
Performance Extended IQP, optimized locking DBAs
Security Deeper Microsoft Entra ID / managed identity integration DBAs, security teams

Should You Upgrade Now?

For a new project that wants vector search or clean JSON handling, SQL Server 2025 removes whole categories of external infrastructure — that's a strong reason to start there. For an existing production estate, the calculus is the usual one: the features are attractive, but a version upgrade is still a project, not a patch.

The safe path hasn't changed. Assess with the Data Migration Assistant, test on a copy of production, baseline performance before and after, and keep a tested rollback ready. We covered that end to end in Migration to SQL Server 2025: Risks, Issues, and Safe Approach. If you're doing an in-place upgrade, the InplaceUpDate tool backs up logins, linked servers, SSIS, SSRS, and SSAS first and refuses to uninstall without proof of a completed backup. And after the upgrade, run Get-sqmSQLInstanceCheck to validate the instance before you let applications back on.

The Bottom Line

SQL Server 2025 is genuinely a developer's release. Vector search, regular expressions, and a real JSON type close long-standing gaps that used to force logic out of the database. For DBAs, the operational story is steady evolution — better plans, lighter locking, tighter identity — with the same standing caution around optimizer changes on upgrade.

Explore the new surface on a test instance, decide which features earn a place in your stack, and migrate the way you always should: deliberately, with a baseline and a rollback. The engine got more capable; the discipline around changing it in production did not get any less important.

← Back to Blog