SQL Server 2025: Native AI Integration, Vector Search, and What It Means for On-Premises Deployments
SQL Server 2025 is Microsoft's most significant on-premises database release in years. It brings native AI integration, a new vector data type, DiskANN indexing, and Fabric mirroring directly into the on-premises product. For organisations that have been watching Azure SQL Database gain capabilities while their on-premises environments stayed put, this release closes a meaningful gap.
This isn't a minor version bump. SQL Server 2025 represents a genuine shift in how Microsoft positions its on-premises database for modern workloads, and DBAs and IT managers planning infrastructure upgrades should understand what's actually in this release before it hits production.
Why Does SQL Server 2025 Matter for On-Premises Environments?
For years, the honest answer to "why move to Azure SQL Database?" included a growing list of features that simply weren't available on-premises. Real-time analytics integration, vector search, native REST API calls from T-SQL - these were cloud-only capabilities. SQL Server 2025 changes that calculus significantly.
The release was announced at Microsoft Ignite and targets organisations running transactional workloads on-premises who want to incorporate AI-driven functionality without rebuilding their entire architecture around cloud services. That's a large portion of the Australian enterprise market, particularly in sectors with data sovereignty requirements or existing capital investment in on-premises infrastructure.
It also matters because the AI integration features aren't bolted on as afterthoughts. They're implemented at the engine level, which means they interact with SQL Server's existing security model, transaction handling, and query optimiser rather than sitting outside it.
Calling AI Services Directly from T-SQL
The headline feature of SQL Server 2025 is the ability to call external AI services directly from T-SQL using sp_invoke_external_rest_endpoint. This system stored procedure lets you make HTTP requests to REST APIs, including Azure OpenAI and other AI endpoints, without leaving the database layer.
In practical terms, you can pass a text column to a language model and return a structured result, all within a standard T-SQL query or stored procedure. Here's a simplified example of the pattern:
DECLARE @response NVARCHAR(MAX);
EXEC sp_invoke_external_rest_endpoint
@url = 'https://your-openai-endpoint.openai.azure.com/openai/deployments/gpt-4/chat/completions?api-version=2024-02-01',
@method = 'POST',
@headers = '{"Content-Type":"application/json","api-key":"your-api-key"}',
@payload = '{"messages":[{"role":"user","content":"Summarise this text: Hello world"}],"max_tokens":100}',
@response = @response OUTPUT;
SELECT @response;
The implications for existing data pipelines are significant. Instead of building separate application layers to handle AI calls, you can embed that logic directly in the database where the data already lives. Sentiment analysis on customer feedback, classification of support tickets, summarisation of long-form text fields - all of this becomes possible without an intermediate application tier.
That said, this capability needs to be architected carefully, not bolted onto existing procedures without thought. You're making network calls from inside the database engine, which introduces latency, external failure modes, and potential blocking if not implemented correctly. Any production implementation needs proper error handling, timeout configuration, and a clear fallback strategy for when the external endpoint is unavailable. The performance characteristics are also very different from native T-SQL operations, so query plans and execution expectations need to be reset accordingly.
What Is the New Vector Data Type and How Does DiskANN Work?
SQL Server 2025 introduces a native vector data type along with vector indexes built on DiskANN (Disk-based Approximate Nearest Neighbour), a technology developed by Microsoft Research. This is a substantial addition for teams working with machine learning, semantic search, or any application that relies on high-dimensional embeddings.
Previously, storing and querying vector data in SQL Server required workarounds. Most teams stored embeddings as binary blobs or JSON and handled similarity calculations in application code, which was slow, difficult to maintain, and didn't scale well. Native vector support changes that architecture entirely.
With SQL Server 2025, you can define a column using the vector data type and run approximate nearest neighbour searches efficiently using the DiskANN index structure. DiskANN is specifically designed to handle large-scale vector datasets without requiring the entire index to be held in memory, which makes it practical for on-premises deployments where RAM is finite and dataset sizes can be substantial. Microsoft Research has published benchmarks showing DiskANN outperforming in-memory alternatives on datasets exceeding 1 billion vectors, though real-world performance will depend heavily on your hardware configuration and embedding dimensionality.
For organisations exploring retrieval-augmented generation (RAG) architectures or building semantic search over internal document repositories, this feature makes SQL Server a legitimate option for the vector store component. Previously, that typically meant introducing a separate specialist database such as pgvector, Pinecone, or Qdrant alongside SQL Server. Now you can keep the vector store within the same database engine you're already managing, using the same backup, security, and monitoring tooling you already have in place.
A basic example of defining and querying vector data looks like this:
-- Create a table with a vector column
CREATE TABLE DocumentEmbeddings (
DocumentID INT PRIMARY KEY,
DocumentText NVARCHAR(MAX),
Embedding VECTOR(1536) -- 1536 dimensions for text-embedding-ada-002
);
-- Query for nearest neighbours using cosine similarity
SELECT TOP 5
DocumentID,
DocumentText,
VECTOR_DISTANCE('cosine', Embedding, @QueryEmbedding) AS Distance
FROM DocumentEmbeddings
ORDER BY Distance ASC;
The VECTOR_DISTANCE function handles the similarity calculation natively, and the DiskANN index makes that search efficient at scale rather than requiring a full table scan.
What Is Fabric Mirroring in SQL Server 2025?
Fabric mirroring brings real-time data replication capabilities to on-premises SQL Server 2025, allowing data to be continuously mirrored into Microsoft Fabric for analytics workloads. Azure SQL Database users have had access to this for some time. SQL Server 2025 extends it to on-premises environments.
The practical benefit is that you can run transactional workloads on-premises while leveraging Fabric's analytics capabilities in the cloud, without building complex ETL pipelines or scheduling batch data movement jobs. Mirroring happens continuously, so your analytics environment reflects current data rather than last night's export.
For organisations that want the operational simplicity of keeping transactional data on-premises (for compliance, latency, or cost reasons) while still enabling modern analytics and reporting through Fabric, this is a meaningful capability. It removes one of the main architectural compromises that previously forced a choice between on-premises control and cloud analytics flexibility.
What Else Is New in SQL Server 2025?
Beyond the headline AI and vector features, SQL Server 2025 includes a range of improvements that matter for day-to-day database operations:
- Query Store improvements - Enhanced automatic plan correction and better visibility into query performance regressions.
- Accelerated Database Recovery (ADR) enhancements - Faster recovery times and reduced version store overhead in high-transaction environments.
- Ledger table improvements - Expanded support for verifiable, tamper-evident data, relevant for audit and compliance use cases.
- Enhanced security features - Additional support for Always Encrypted and improvements to row-level security performance.
- Improved JSON and graph support - Continued investment in semi-structured data handling and graph query capabilities.
These aren't as headline-grabbing as native AI integration, but for DBAs managing production environments, they represent real operational improvements worth evaluating during upgrade planning.
Key Takeaways
- SQL Server 2025 brings native AI integration via
sp_invoke_external_rest_endpoint, allowing T-SQL to call Azure OpenAI and other REST endpoints directly from the database layer. - The new
vectordata type and DiskANN indexing make SQL Server a viable on-premises vector store for RAG architectures and semantic search, without requiring a separate specialist database. - Fabric mirroring enables continuous, real-time replication from on-premises SQL Server 2025 to Microsoft Fabric, removing the need for batch ETL pipelines to support cloud analytics.
- AI features at the engine level interact with SQL Server's existing security model and transaction handling, but network-dependent calls require careful error handling and timeout management in production.
- Organisations with data sovereignty requirements or existing on-premises infrastructure investment now have a credible path to AI-capable database workloads without migrating to the cloud.
SQL Server 2025 is still in preview at time of writing, and production deployment timelines will depend on your organisation's change management processes and compatibility testing requirements. If you're planning an upgrade or want an independent assessment of how SQL Server 2025 features align with your current environment, DBA Services provides SQL Server health checks and upgrade planning support across Australian organisations. Getting an objective view of your current state before committing to an upgrade path is always worth the time.
Need help with your SQL Servers?
Find out what's really going on inside your SQL Server environment.
Our health checks uncover critical misconfigurations in 97% of reviews.