{"id":49404,"date":"2023-06-14T08:00:00","date_gmt":"2023-06-14T15:00:00","guid":{"rendered":""},"modified":"2025-06-02T07:48:35","modified_gmt":"2025-06-02T14:48:35","slug":"secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/","title":{"rendered":"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services"},"content":{"rendered":"\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/machine-learning\/sql-server-machine-learning-services?view=sql-server-ver16\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft SQL Server Machine Learning Services<\/a> is a feature that allows you to run Python, R, Java, and other Machine Learning languages in-database, using open-source packages and frameworks for predictive analytics and machine learning. <a href=\"https:\/\/azure.microsoft.com\/en-ca\/products\/cognitive-services\/openai-service\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Azure OpenAI Service<\/a>&nbsp;is an AI cognitive service that uses advanced systems for natural language, code, and image generation and understanding. In this blog post, you will see how you can use SQL Server Machine Learning Services with Microsoft Azure OpenAI Service in a practical example. Using SQL Server Machine Learning Services with Azure OpenAI Service is a powerful combination that can help businesses save money and securely leverage the products they already have.<\/p>\n\n\n<div class=\"wp-block-msxcm-cta-block\" data-moray data-bi-an=\"CTA Block\">\n\t<div class=\"card d-block mx-ng mx-md-0\">\n\t\t<div class=\"row no-gutters material-color-brand-light bg-fabric-white\">\n\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2023\/06\/CLO18_bankCoworkers_002-1024x683.jpg\" class=\"card-img img-object-cover\" alt=\"CLO18_bankCoworkers_002\" srcset=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2023\/06\/CLO18_bankCoworkers_002-1024x683.jpg 1024w, https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2023\/06\/CLO18_bankCoworkers_002-300x200.jpg 300w, https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2023\/06\/CLO18_bankCoworkers_002-768x512.jpg 768w, https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2023\/06\/CLO18_bankCoworkers_002-1536x1024.jpg 1536w, https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2023\/06\/CLO18_bankCoworkers_002-2048x1365.jpg 2048w, https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2023\/06\/CLO18_bankCoworkers_002-800x533.jpg 800w, https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2023\/06\/CLO18_bankCoworkers_002-400x267.jpg 400w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t<\/div>\n\t\t\t\n\t\t\t<div class=\"d-flex col-md\">\n\t\t\t\t<div class=\"card-body align-self-center p-4 p-md-5\">\n\t\t\t\t\t\n\t\t\t\t\t<h2>Microsoft SQL Server Machine Learning Service<\/h2>\n\n\t\t\t\t\t<div class=\"mb-3\">\n\t\t\t\t\t\t<p>What is SQL Server Machine Learning Services with Python and R?<\/p>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"link-group\">\n\t\t\t\t\t\t\t<a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/machine-learning\/sql-server-machine-learning-services?view=sql-server-ver16\" class=\"btn btn-link text-decoration-none p-0\" target=\"_blank\">\n\t\t\t\t\t\t\t\t<span>Learn more<\/span>\n\t\t\t\t\t\t\t\t<span class=\"glyph-append glyph-append-chevron-right glyph-append-xsmall\"><\/span>\n\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\n\t\t\t\t\t<\/div>\n\t<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"using-the-adventureworks-sample-database-in-a-practical-example\">Using the AdventureWorks sample database in a practical example<\/h2>\n\n\n\n<p>The AdventureWorks (fictitious) company uses a database that <a href=\"https:\/\/learn.microsoft.com\/en-us\/previous-versions\/sql\/sql-server-2008\/ms124825(v=sql.100)?redirectedfrom=MSDN\" target=\"_blank\" rel=\"noreferrer noopener\">stores data about sales and marketing, products, customers and manufacturing.<\/a> It also contains a view that joins information about the products, such as the product name, category, price, and a brief description.<\/p>\n\n\n\n<p>Currently, AdventureWorks sends the product name and brief description to a marketing firm to develop a campaign to boost sales. The cost for this marketing specialist is significant, and after looking into the capabilities of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Generative_pre-trained_transformer\" target=\"_blank\" rel=\"noreferrer noopener\">Generative Pre-trained Transformers<\/a> (GPT), the company is curious to know if this AI could be used to create starter-text for brochures, automating the first step of the process. GPT-4 is a powerful language model that can generate coherent and creative text from complex input, or <em>prompts<\/em>.<\/p>\n\n\n\n<p>Instead of hiring a professional writer, they can use <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/machine-learning\/sql-server-machine-learning-services?view=sql-server-ver16\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server Machine Learning Services<\/a> with <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cognitive-services\/openai\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Azure OpenAI Service<\/a> to automatically generate high-quality starter ad copy based on the product description and other relevant data. This can save time and money on the marketing budget. This approach also has the added benefit of security, since the database stays local, Stored Procedures have high security granularity, and Azure OpenAI Service does not use the information sent for further training.<\/p>\n\n\n\n<p>This process works on SQL Server Machine Learning Services platforms on Windows, Linux, Containers, and Kubernetes clusters, including virtual machines and SQL Server Managed Instance, from version 2019.<\/p>\n\n\n\n<p>During their research, AdventureWorks discovered that it is important to be cautious when generating text using a GPT model. It is possible that the generated text may not always be appropriate or accurate, so it is important to have a system in place for reviewing and approving any changes before they are published.<\/p>\n\n\n\n<p>The proof-of-concept (PoC) for AdventureWorks involves the following requirements:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\">\n<li>Create a Stored Procedure to accept the model of a given product.<\/li>\n\n\n\n<li>Generate marketing brochure text for that product, highlighting its features and benefits, using Azure OpenAI Service&#8217;s GPT-4 model.<\/li>\n\n\n\n<li>Ensure that the generated text is safe and factual, and that it can be edited before publishing.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"example-code\">Example code<\/h2>\n\n\n\n<p>The POC project for AdventureWorks involves the following steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\">\n<li>Install <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/machine-learning\/install\/sql-machine-learning-services-windows-install-sql-2022?view=sql-server-ver16&amp;viewFallbackFrom=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server Machine Learning Services<\/a> on a Microsoft Windows, Linux, or Container environment.<\/li>\n\n\n\n<li>Create and deploy a model on <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cognitive-services\/openai\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">Azure OpenAI Service<\/a>, and <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cognitive-services\/openai\/chatgpt-quickstart?tabs=command-line&amp;pivots=programming-language-studio\" target=\"_blank\" rel=\"noreferrer noopener\">obtain the model\u2019s name, keys and endpoints<\/a>.<\/li>\n\n\n\n<li>Install the <em>openai<\/em> Python package using <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/machine-learning\/data-exploration\/python-dataframe-pandas?source=recommendations&amp;view=sql-server-ver16#prerequisites\" target=\"_blank\" rel=\"noreferrer noopener\">Azure Data Studio<\/a> or the <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/machine-learning\/package-management\/install-additional-python-packages-on-sql-server?view=sql-server-ver16\" target=\"_blank\" rel=\"noreferrer noopener\"><em>sqlmlutils<\/em> package<\/a>. This enables the code to use OpenAI API in Python scripts.<\/li>\n\n\n\n<li>Write a Python script that uses the <em>sp_execute_external_script<\/em> stored procedure to query the product\u2019s view, send the product name and description as a combined <em>prompt<\/em> to the Azure OpenAI API. The script should also specify the parameters for the model, such as the <em>engine name<\/em> (such as `davinci`), the <em>temperature<\/em> (a measure of randomness), the <em>max tokens<\/em> (the maximum length of the generated text), and the <em>stop sequence<\/em> (a token that indicates the end of the text). The script should also handle any errors or warnings from the API and return the generated text as a result set.<\/li>\n\n\n\n<li>Execute the Python script from <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/ssms\/sql-server-management-studio-ssms?view=sql-server-ver16\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server Management Studio<\/a> or <a href=\"https:\/\/azure.microsoft.com\/en-us\/products\/data-studio\/\" target=\"_blank\" rel=\"noreferrer noopener\">Azure Data Studio<\/a> and review the generated text for each product. Edit the text as needed or re-run the script with different parameters to get different results.<\/li>\n\n\n\n<li>Once the result is satisfactory, wrap the code in a stored procedure to take the product\u2019s model number from the user, and ensure the security chain is verified for the Stored Procedure.<\/li>\n\n\n\n<li>In the end-user application, display the result for the ad text to the user for editing, and send the edited result to the database for storage.<\/li>\n<\/ol>\n\n\n\n<p>With that outline, sample code in an <a href=\"https:\/\/github.com\/BuckWoody\/presentations\/blob\/master\/ai_ml_dl\/OpenAI-SQLML.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Azure Data Studio Jupyter Notebook<\/a> has been developed for AdventureWorks, allowing descriptive blocks, code, and persistent results display. After testing and editing, the code can be copied to a Transact-SQL script and deployed to testing and then on to production. The end result produces the following starter text to display to the end user for editing and confirmation before being set to the database:<\/p>\n\n\n\n<p><em>[sic]<\/em><\/p>\n\n\n\n<p><em>Dear Mountain Bike Enthusiast, Are you looking for a bike that can deliver the performance you need without breaking the bank? Look no further than the Mountain-400-W Silver, 38.&nbsp; This bike is designed to give you the high-level performance you need to tackle any terrain, without the high price tag. With its responsive and maneuverable design, you&#8217;ll be able to navigate even the toughest trails with ease.&nbsp; But it&#8217;s not just about performance &#8211; the Mountain-400-W Silver, 38 also offers peace-of-mind when you decide to go off-road. With its sturdy construction and reliable components, you can trust this bike to handle anything you throw at it.&nbsp; So why wait? Order your Mountain-400-W Silver, 38 today and experience the ultimate in off-road performance at a price you can afford. Don&#8217;t settle for anything less than the best &#8211; choose the Mountain-400-W Silver, 38 and take your mountain biking to the next level.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"other-applications-of-this-approach\">Other applications of this approach<\/h2>\n\n\n\n<p>As you can see, using Microsoft SQL Server Machine Learning Services with Microsoft Azure OpenAI Service has practical applications. In this example we used it to create a marketing brochure text for various products. This is a powerful and creative way to leverage AI for business needs. The resulting text could be sent to an image-generating service (<a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cognitive-services\/openai\/concepts\/models#dall-e-models\" target=\"_blank\" rel=\"noreferrer noopener\">such as DALL-E<\/a>) to generate images for the brochure. Other data sets in the AdventureWorks database could be used in other applications, such as investigating sales regions and much more.<\/p>\n\n\n\n<p>However, it is important to be cautious and responsible when using AI models, as they may not always produce accurate or appropriate results. You should always review and edit the generated text before publishing it and follow <a href=\"https:\/\/learn.microsoft.com\/en-us\/legal\/cognitive-services\/openai\/overview?context=%2Fazure%2Fcognitive-services%2Fopenai%2Fcontext%2Fcontext\" target=\"_blank\" rel=\"noreferrer noopener\">the safety and ethical guidelines of Microsoft Azure OpenAI Service<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"learn-more\">Learn more<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What is <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/machine-learning\/sql-server-machine-learning-services?view=sql-server-ver16\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server Machine Learning Services with Python and R<\/a>?<\/li>\n\n\n\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/machine-learning\/what-s-new-in-sql-server-machine-learning-services?view=sql-server-ver16\" target=\"_blank\" rel=\"noreferrer noopener\">What&#8217;s new<\/a> in SQL Server Machine Learning Services? <\/li>\n\n\n\n<li>The <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cognitive-services\/openai\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Azure OpenAI Service<\/a>.<\/li>\n\n\n\n<li><a href=\"https:\/\/writings.stephenwolfram.com\/2023\/02\/what-is-chatgpt-doing-and-why-does-it-work\/\" target=\"_blank\" rel=\"noreferrer noopener\">Understanding<\/a> GPTs.<\/li>\n<\/ul>\n\n\n\n<p><a id=\"_msocom_1\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using SQL Server Machine Learning Services with Azure OpenAI helps businesses save money and securely leverage the products they already have.<\/p>\n","protected":false},"author":6194,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","footnotes":""},"post_tag":[],"product":[2394,5227,3645,2524],"content-type":[2424],"topic":[],"coauthors":[2587],"class_list":["post-49404","post","type-post","status-publish","format-standard","hentry","product-machine-learning-server","product-sql","product-sql-server-2022","product-sql-server-management","content-type-best-practices","review-flag-4-1593580446-456","review-flag-alway-1593580309-407","review-flag-lever-1593580264-545","review-flag-machi-1680214154-170","review-flag-new-1593580247-437"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services - Microsoft SQL Server Blog<\/title>\n<meta name=\"description\" content=\"SQL Server Machine Learning Services with Azure OpenAI is a powerful combination that helps businesses save money and leverage the products they have.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services - Microsoft SQL Server Blog\" \/>\n<meta property=\"og:description\" content=\"SQL Server Machine Learning Services with Azure OpenAI is a powerful combination that helps businesses save money and leverage the products they have.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft SQL Server Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/sqlserver\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-14T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-02T14:48:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/08\/cropped-microsoft_logo_element.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Buck Woody\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SQLServer\" \/>\n<meta name=\"twitter:site\" content=\"@SQLServer\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Buck Woody\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 min read\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/\"},\"author\":[{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/author\/buck-woody\/\",\"@type\":\"Person\",\"@name\":\"Buck Woody\"}],\"headline\":\"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services\",\"datePublished\":\"2023-06-14T15:00:00+00:00\",\"dateModified\":\"2025-06-02T14:48:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/\"},\"wordCount\":1130,\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/\",\"name\":\"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services - Microsoft SQL Server Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website\"},\"datePublished\":\"2023-06-14T15:00:00+00:00\",\"dateModified\":\"2025-06-02T14:48:35+00:00\",\"description\":\"SQL Server Machine Learning Services with Azure OpenAI is a powerful combination that helps businesses save money and leverage the products they have.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\",\"name\":\"Microsoft SQL Server Blog\",\"description\":\"Official News from Microsoft\u2019s Information Platform\",\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\",\"name\":\"Microsoft SQL Server Blog\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"width\":259,\"height\":194,\"caption\":\"Microsoft SQL Server Blog\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/www.facebook.com\/sqlserver\",\"https:\/\/x.com\/SQLServer\",\"https:\/\/www.youtube.com\/user\/MSCloudOS\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services - Microsoft SQL Server Blog","description":"SQL Server Machine Learning Services with Azure OpenAI is a powerful combination that helps businesses save money and leverage the products they have.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/","og_locale":"en_US","og_type":"article","og_title":"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services - Microsoft SQL Server Blog","og_description":"SQL Server Machine Learning Services with Azure OpenAI is a powerful combination that helps businesses save money and leverage the products they have.","og_url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/","og_site_name":"Microsoft SQL Server Blog","article_publisher":"http:\/\/www.facebook.com\/sqlserver","article_published_time":"2023-06-14T15:00:00+00:00","article_modified_time":"2025-06-02T14:48:35+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/08\/cropped-microsoft_logo_element.png","type":"image\/png"}],"author":"Buck Woody","twitter_card":"summary_large_image","twitter_creator":"@SQLServer","twitter_site":"@SQLServer","twitter_misc":{"Written by":"Buck Woody","Est. reading time":"4 min read"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/#article","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/"},"author":[{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/author\/buck-woody\/","@type":"Person","@name":"Buck Woody"}],"headline":"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services","datePublished":"2023-06-14T15:00:00+00:00","dateModified":"2025-06-02T14:48:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/"},"wordCount":1130,"publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/","name":"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services - Microsoft SQL Server Blog","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website"},"datePublished":"2023-06-14T15:00:00+00:00","dateModified":"2025-06-02T14:48:35+00:00","description":"SQL Server Machine Learning Services with Azure OpenAI is a powerful combination that helps businesses save money and leverage the products they have.","breadcrumb":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2023\/06\/14\/secure-your-ai-using-sql-server-machine-learning-with-microsoft-azure-openai-services\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/"},{"@type":"ListItem","position":2,"name":"Secure your AI using SQL Server Machine Learning with Microsoft Azure OpenAI Services"}]},{"@type":"WebSite","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/","name":"Microsoft SQL Server Blog","description":"Official News from Microsoft\u2019s Information Platform","publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization","name":"Microsoft SQL Server Blog","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","contentUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","width":259,"height":194,"caption":"Microsoft SQL Server Blog"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/www.facebook.com\/sqlserver","https:\/\/x.com\/SQLServer","https:\/\/www.youtube.com\/user\/MSCloudOS"]}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts\/49404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/users\/6194"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/comments?post=49404"}],"version-history":[{"count":1,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts\/49404\/revisions"}],"predecessor-version":[{"id":51234,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts\/49404\/revisions\/51234"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/media?parent=49404"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/post_tag?post=49404"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/product?post=49404"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/content-type?post=49404"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/topic?post=49404"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/coauthors?post=49404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}