Practical overview
When it fits
Use it when a SQL Server 2022 project needs vector-similarity functions or documented OpenAI and Azure OpenAI calls as part of a RAG workflow.
Who it is for
- Developers building RAG systems backed by Microsoft SQL Server.
- SQL Server teams exploring vector similarity and database-side embedding or chat-completion calls.
Documented uses
- Calculate vector similarity, including cosine similarity and Euclidean distance, within SQL Server.
- Request embeddings and chat completions through OpenAI or Azure OpenAI functions.
- Explore a query-intent semantic cache using the included SQL example.
Requirements & limits
The repository describes the project as open source and provides source-based deployment instructions.
- The documented minimum setup is SQL Server 2022 and Visual Studio 2022 with SSDT.
- The SQL Server CLR feature must be enabled.
- The project offers installation through a release SQL script, a DACPAC, or deployment from Visual Studio source.
- OpenAI or Azure OpenAI credentials are stored in an encrypted database table; Azure OpenAI setup also uses an endpoint and API version.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install SQLRAG from the release SQL script
Deploy SQLRAG to a SQL Server 2022 database using the documented SQL-script option.
Before you start
- SQL Server 2022
- SQL Server CLR enabled
- The SQLRAG_CREATE.sql file provided in the project release
Steps
Enable SQL Server CLR using the documented sp_configure settings and RECONFIGURE statements.
Run SQLRAG_CREATE.sql against the SQLRAG database.
Expected outcome
The project’s documented first-time installation path is to create SQLRAG by running the release script.
Guide limitations
- The instructions give DACPAC and source-deployment alternatives but do not detail their complete procedures here.
- OpenAI or Azure OpenAI functions require separate credential configuration.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- AllanYiin/SQLRAG · Official homepage title · retained in its source language

