Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Build Enterprise RAG with OpenAI & SQL Server 2025
New
Rating: 5.0 out of 5(1 rating)
3 students

Build Enterprise RAG with OpenAI & SQL Server 2025

Build Vector Search, DiskANN, Authorization, Grounding & Auditing with T-SQL and OpenAI
Last updated 10/2026
English

What you'll learn

  • Design an enterprise-style RAG architecture using SQL Server 2025, AdventureWorks business data, and OpenAI.
  • Configure SQL Server 2025 for secure outbound REST API communication with external AI services.
  • Securely store OpenAI API credentials inside SQL Server using a database master key and database-scoped credentials.
  • Create native vector-enabled tables in SQL Server 2025 using the VECTOR data type
  • Transform relational AdventureWorks product data into an AI-ready vector store using T-SQL.
  • Call the OpenAI Embeddings API directly from SQL Server
  • Build a reusable T-SQL stored procedure that converts natural-language text into vector embeddings using OpenAI.
  • Batch-vectorize existing SQL Server records and persist their embeddings using native vector storage.
  • Create and configure a DiskANN vector index to support efficient semantic similarity searches in SQL Server 2025.
  • Perform semantic vector searches from natural-language user intent instead of relying solely on exact keyword matching.
  • Implement authorization-aware vector retrieval so unauthorized business information is excluded before becoming AI grounded context.
  • Combine vector search results with live relational business data, such as product information and pricing.
  • Build grounded prompts dynamically with T-SQL using information retrieved from SQL Server.
  • Create a complete authorization-aware RAG stored procedure that orchestrates embeddings, retrieval, grounding, auditing, and OpenAI generation.
  • Send grounded business context directly from SQL Server to OpenAI and return natural-language AI responses.
  • Create an AI audit trail in SQL Server to record user queries, execution identity, retrieval activity, and timestamps.
  • Run natural-language intent queries directly from SQL Server Management Studio and retrieve AI-generated answers grounded in AdventureWorks data.
  • Evaluate semantic-search results and distinguish similarity from factual equivalence, helping prevent unsupported AI conclusions.
  • Apply monitoring, auditing, authorization, and grounding principles when designing more robust enterprise AI solutions.
  • Identify real-world RAG production considerations including hallucinations, source-data quality, prompt design, API latency, cost, security, and governance.

Course content

11 sections • 37 lectures • 2h 57m total length
  • Introduction2:06
  • What is RAG4:45
  • How RAG Works2:19
  • Welcome to SQL Server 2025 AI & RAG3:50
  • What We Will Build: Enterprise-Style RAG Architecture9:16
  • Understanding RAG, Embeddings and Vector Search8:51
  • Project Technologies and Requirements8:26

Requirements

  • Basic SQL knowledge is helpful, but advanced SQL skills are not required.
  • Basic familiarity with SQL Server and SQL Server Management Studio (SSMS) will be useful, but all project steps are demonstrated.
  • No previous experience with AI, RAG, vector databases, embeddings, or semantic search is required. These concepts are explained from the beginning.
  • A Windows computer capable of running SQL Server 2025 and SSMS is recommended for following the course demonstrations.
  • An OpenAI account with API access
  • An internet connection is required for communicating with the OpenAI API and downloading any required software or project resources.
  • A willingness to learn and follow along with the practical exercises is the most important requirement.

Description

Build an enterprise-style Retrieval Augmented Generation solution using SQL Server 2025, native vector search, T-SQL, and OpenAI.

Generative AI is transforming how users interact with business data. But what if you could bring modern AI capabilities directly into SQL Server and allow users to ask natural-language questions that are answered using information retrieved from your own database?

In this hands-on, project-based course, you will build a complete RAG application from the ground up using SQL Server 2025 and the AdventureWorks database.

You'll begin by understanding Retrieval Augmented Generation, embeddings, semantic search, and vector databases. You'll then configure SQL Server to communicate securely with OpenAI and learn how to protect API credentials using database security features.

Next, you'll create a dedicated AI vector store using SQL Server 2025's native VECTOR data type. You'll transform AdventureWorks product information into vector embeddings using OpenAI and store those embeddings directly inside SQL Server.

You'll then create a DiskANN vector index and use semantic vector search to retrieve products based on meaning and user intent rather than relying solely on exact keyword matches.

But this course goes beyond a basic RAG demonstration.

You'll implement authorization-aware retrieval, ensuring that only permitted information can become part of the context supplied to the AI model. You'll combine vector results with live relational business data, build grounded prompts dynamically with T-SQL, and create an AI audit log for monitoring queries and retrieval activity.

Finally, you'll bring everything together in a complete RAG stored procedure that accepts a natural-language question, generates an embedding, performs semantic retrieval, applies authorization, builds grounded context, calls OpenAI, and returns a natural-language response.

You'll also explore important real-world considerations including hallucinations, data quality, prompt design, vector-search trade-offs, security, governance, API costs, embedding freshness, auditing, and SQL Server vector caveats.

By the end of the course, you'll have built a practical end-to-end AI project demonstrating how SQL Server 2025, T-SQL, native vectors, DiskANN, and OpenAI can work together to create modern, enterprise-style RAG applications.

Who this course is for:

  • QL Server developers and database professionals who want to add Generative AI, RAG, embeddings, and vector search to their existing SQL Server skills.
  • QL developers and T-SQL programmers who want to build AI-powered applications directly with SQL Server rather than relying entirely on Python or external AI frameworks.
  • Database administrators and SQL Server professionals interested in the new AI and native vector capabilities available in SQL Server 2025.
  • Data engineers who want practical experience combining relational business data, vector embeddings, semantic search, and Generative AI.
  • AI and Generative AI learners who want to understand how RAG can be implemented using enterprise relational databases and real business data.
  • Software developers and application developers who want to integrate OpenAI with SQL Server and build natural-language interfaces over structured business data.
  • Data analysts and BI professionals who want to expand their skills into AI, semantic search, vector databases, and RAG applications.
  • Solution architects and technical consultants who want to understand how SQL Server, vector search, authorization, governance, and OpenAI can work together in an enterprise-style RAG architecture.
  • Students and aspiring AI or data professionals looking for a practical portfolio project that demonstrates SQL, vector search, OpenAI integration, and RAG skills.
  • Professionals preparing for AI-focused database and data-engineering roles who want hands-on exposure to modern AI capabilities within the Microsoft SQL Server ecosystem.
  • Anyone interested in building RAG solutions without LangChain or a separate vector database, using SQL Server 2025 native vectors and T-SQL instead.
  • Curious beginners with basic SQL knowledge who want a guided, step-by-step introduction to embeddings, semantic vector search, grounding, authorization-aware retrieval, auditing, and Retrieval Augmented Generation.