Support for Java Stored procedures in Azure SQL. Running Java code through STORED PROCEDURES ON SQL SERVER

AKSHAY RANGA 11 Reputation points
2023-01-19T07:58:49.83+00:00

Hello All,

Requesting few information on SQL server V2019+ and Azure SQL.
We are a team who is working on Migration of IBM DB2 to Azure SQL / SQL SERVER. In DB2 we have Procedure called as JAVA STORED PROCEDURE, Where the Javacode is deployed on DB2 and java code is executed using Stored procedure.
We are checking if we have a feature in Azure SQL where we can deploy the jar or the class file of Java and execute them as stored procedure. And these procedure should take in parameters if required.

Currently we found the documentation for External libraries where we can deploy the java code by creating External Libraries in SQL SERVER 2019 and SQL SERVER 2022. Whereas, we did not find any documentation for Azure SQL.
Are the external Libraries supported with Azure SQL?

REF: [https://learn.microsoft.com/en-us/sql/language-extensions/how-to/call-java-from-sql?view=sql-server-ver16

Also to deploy the class file/jar to SQL SERVER, we have to provide the location of the jar /class file. Once the set is done, is the Created lib still looks for the jar file in that path specified or an instance is deployed to SQL server ?
Any help/information would be of a great help for us.
Thank you

Azure SQL Database
SQL Server Other
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2023-01-19T08:14:00.3+00:00

    Are the external Libraries supported with Azure SQL?

    No, externals calls are only supported on SQL Server on-premise, but not on SQL Azure.

    0 comments No comments

  2. LiHongMSFT-4306 31,566 Reputation points
    2023-01-19T09:40:11.5633333+00:00

    Hi @AKSHAY RANGA

    Are the external Libraries supported with Azure SQL?

    No. In SQL Server 2017, R language and Windows platform are supported. R, Python, and Java on the Windows and Linux platforms are supported in SQL Server 2019 and later. On Azure SQL Managed Instance, R and Python are supported.

    Please refer to this article: sys.external_libraries (Transact-SQL)

    Once the set is done, is the Created lib still looks for the jar file in that path specified or an instance is deployed to SQL server ?

    As far as I understand, it is the former one.

    Best regards,

    Cosmog Hong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

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.