Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 3.33 KB

java-overview.md

File metadata and controls

51 lines (36 loc) · 3.33 KB
title titleSuffix description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom monikerRange
What is the Java Language Extension?
SQL Server Language Extensions
The Java Language Extension is a feature of SQL Server used for executing external Java code. Relational data can be used in the external Java code using the extensibility framework.
rwestMSFT
randolphwest
04/29/2024
sql
language-extensions
overview
intro-overview
>=sql-server-ver15 || >=sql-server-linux-ver15

What is the Java Language Extension?

[!INCLUDE sqlserver2019-and-later]

The Java Language Extension is a feature of SQL Server used for executing external Java code. The relational data can be used in the external Java code using the extensibility framework. The Java Language Extension is part of SQL Server Language Extensions.

The default Java runtime is Zulu Open JRE. You can also use another Java JRE or SDK.

What you can do with the Java Language Extension

The Java Language Extension uses the extensibility framework for executing external Java code. Code execution is isolated from the core engine processes, but fully integrated with SQL Server query execution. You can execute Java code at the data's source, eliminating the need to pull data across the network.

The external Java language is defined with CREATE EXTERNAL LANGUAGE. The system stored procedure sp_execute_external_script is used as the interface for executing the Java code.

Get started with the Java Language Extension

  1. Install SQL Server Java Language Extension on Windows or on Linux.

  2. Configure development tools.

  3. Write your first Java code. Use the following tutorial as a starting point. Tutorial: Search for a string using regular expressions (regex) in Java

Limitations

The number of values in input and output buffers can't exceed MAX_INT (2^31-1), since that is the maximum number of elements that can be allocated in an array in Java.

Related content