SQL Stored Procedure BULK INSERT wont execute when called from Kubernetes Cluster

Chris Courtney 20 Reputation points
2024-10-30T08:21:27.5466667+00:00

Hi There,

I have a Python Program that calls a Stored Procedure on a SQL Managed Instance in Azure. This stored procedure, deletes data from a staging table and carries out a BULK INSERT of Data from CSV files that are stored in a Storage Account Container in Azure into the Staging Table.

The Stored Procedure is execute using a SQL authenticated user.

This Python Program is using Pyodbc to connect to the SQL MI and execute the Stored procedure.

This process is working fine when executed from my local domain joined machine or from a domain joined VM.

However when I execute the same code from a container in a Kubernetes cluster , the Stored procedure is execute (the delete from staging is executed) but the bulk insert does not. There is no exception thrown in the code either.

The SQL drivers and Pyodbc versions are the same across three environments. All three environments are using the same SQL account, same database, same stored procedure and same storage account when executing.

Could there be an issue with SQL Server not executing the BULK INSRT due to the client calling the Stored procedure from a non domain joined client, is there some security context involved here? I'm struggling to find any information on this topic.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,075 questions
SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
102 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.