<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Executing Stored Procedures/update in Federated SQL Server in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/executing-stored-procedures-update-in-federated-sql-server/m-p/83583#M36963</link>
    <description>&lt;P&gt;I have federated&amp;nbsp; Azure SQL DB in my DBX workspace, but I am not able to run update commands or execute a stored procedure, is this still not supported?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Aug 2024 10:54:14 GMT</pubDate>
    <dc:creator>Anshul_DBX</dc:creator>
    <dc:date>2024-08-20T10:54:14Z</dc:date>
    <item>
      <title>Executing Stored Procedures/update in Federated SQL Server</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-stored-procedures-update-in-federated-sql-server/m-p/83583#M36963</link>
      <description>&lt;P&gt;I have federated&amp;nbsp; Azure SQL DB in my DBX workspace, but I am not able to run update commands or execute a stored procedure, is this still not supported?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 10:54:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-stored-procedures-update-in-federated-sql-server/m-p/83583#M36963</guid>
      <dc:creator>Anshul_DBX</dc:creator>
      <dc:date>2024-08-20T10:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Stored Procedures/update in Federated SQL Server</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-stored-procedures-update-in-federated-sql-server/m-p/139296#M51139</link>
      <description>&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Federated connections from Azure Databricks to Azure SQL DB via Lakehouse Federation currently only support read-only queries—meaning running update commands or executing stored procedures directly through the federated Unity Catalog interface is not supported as of late 2025. This limitation means that operations such as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;UPDATE&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statements or invoking stored procedures must be performed through other means, not through the federated SQL interface in Databricks.​&lt;/P&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Federated Capabilities and Limitations&lt;/H2&gt;
&lt;UL class="marker:text-quiet list-disc"&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Lakehouse Federation allows connecting and querying data across SQL Server, Azure SQL Database, and other sources using read-only SQL commands for analytics purposes.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Write operations, such as insert, update, or delete, and direct execution of stored procedures are typically restricted or unsupported in federated mode.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;The only writeable exception applies to legacy Hive metastore catalog federation, where foreign tables can be writeable—not relevant to Azure SQL DB federation.​&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Alternative Methods for Updates and Procedures&lt;/H2&gt;
&lt;UL class="marker:text-quiet list-disc"&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;To execute update statements or stored procedures, use direct SQL connections (ODBC, JDBC) from Databricks notebooks or jobs, rather than federated queries.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;This involves installing appropriate drivers (such as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;pyodbc&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for Python) and connecting directly to the Azure SQL DB; stored procedures can then be executed using standard SQL commands within your notebook or code.​&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Example (Python/pyodbc):&lt;/P&gt;
&lt;DIV class="w-full md:max-w-[90vw]"&gt;
&lt;DIV class="codeWrapper text-light selection:text-super selection:bg-super/10 my-md relative flex flex-col rounded-lg font-mono text-sm font-normal bg-subtler"&gt;
&lt;DIV class="translate-y-xs -translate-x-xs bottom-xl mb-xl flex h-0 items-start justify-end md:sticky md:top-[calc(var(--header-height)+var(--size-xs))]"&gt;
&lt;DIV class="overflow-hidden rounded-full border-subtlest ring-subtlest divide-subtlest bg-base"&gt;
&lt;DIV class="border-subtlest ring-subtlest divide-subtlest bg-subtler"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="-mt-xl"&gt;
&lt;DIV&gt;
&lt;DIV class="text-quiet bg-subtle py-xs px-sm inline-block rounded-br rounded-tl-lg text-xs font-thin" data-testid="code-language-indicator"&gt;python&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;CODE&gt;&lt;SPAN class="token token"&gt;import&lt;/SPAN&gt; pyodbc
conn &lt;SPAN class="token token operator"&gt;=&lt;/SPAN&gt; pyodbc&lt;SPAN class="token token punctuation"&gt;.&lt;/SPAN&gt;connect&lt;SPAN class="token token punctuation"&gt;(&lt;/SPAN&gt;conn_str&lt;SPAN class="token token punctuation"&gt;)&lt;/SPAN&gt;
cursor &lt;SPAN class="token token operator"&gt;=&lt;/SPAN&gt; conn&lt;SPAN class="token token punctuation"&gt;.&lt;/SPAN&gt;cursor&lt;SPAN class="token token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token token punctuation"&gt;)&lt;/SPAN&gt;
cursor&lt;SPAN class="token token punctuation"&gt;.&lt;/SPAN&gt;execute&lt;SPAN class="token token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token token"&gt;"EXEC YourStoredProcedureName @param1 = ?, @param2 = ?"&lt;/SPAN&gt;&lt;SPAN class="token token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token token punctuation"&gt;(&lt;/SPAN&gt;value1&lt;SPAN class="token token punctuation"&gt;,&lt;/SPAN&gt; value2&lt;SPAN class="token token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token token punctuation"&gt;)&lt;/SPAN&gt;
conn&lt;SPAN class="token token punctuation"&gt;.&lt;/SPAN&gt;commit&lt;SPAN class="token token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token token punctuation"&gt;)&lt;/SPAN&gt;
&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Recent Developments&lt;/H2&gt;
&lt;UL class="marker:text-quiet list-disc"&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Despite some improvements in Databricks SQL and Lakehouse Federation features throughout 2025, updates about full DML (Data Manipulation Language) support for federated SQL DBs have not been announced; federated actions remain read-only except for Hive-metastore scenarios.​&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;&lt;STRONG&gt;Summary:&lt;/STRONG&gt;&lt;BR /&gt;Federated queries to Azure SQL DB from Databricks are read-only and do not support update commands or stored procedure execution. For these actions, establish a direct database connection using ODBC/JDBC from your Databricks notebook or workflow.​&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 11:26:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-stored-procedures-update-in-federated-sql-server/m-p/139296#M51139</guid>
      <dc:creator>mark_ott</dc:creator>
      <dc:date>2025-11-17T11:26:25Z</dc:date>
    </item>
  </channel>
</rss>

