Skip to content

Commit f2fe696

Browse files
Merge pull request #31554 from MashaMSFT/202408_sqlmijson
added sql mi json support
2 parents c7b19ad + eb006bf commit f2fe696

9 files changed

Lines changed: 28 additions & 24 deletions

azure-sql/managed-instance/doc-changes-updates-release-notes-whats-new.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn about the new features and documentation improvements for Azu
55
author: MashaMSFT
66
ms.author: mathoma
77
ms.reviewer: wiassaf, mathoma
8-
ms.date: 08/13/2024
8+
ms.date: 08/20/2024
99
ms.service: azure-sql-managed-instance
1010
ms.subservice: service-overview
1111
ms.topic: whats-new
@@ -40,6 +40,8 @@ The following table lists the features of Azure SQL Managed Instance that are cu
4040
|[Fail over a link with T-SQL](managed-instance-link-failover-how-to.md?tabs=tsql#fail-over-a-database) | You can now fail over a [managed instance link](managed-instance-link-feature-overview.md) by using Transact-SQL (T-SQL) commands. |
4141
|[Free SQL Managed Instance](free-offer.md) | Try Azure SQL Managed Instance for free, for the first 12 months after you create your instance. |
4242
|[Instance pools](instance-pools-overview.md) | Share resources between multiple instances in a pool within a single virtual machine. A convenient and cost-efficient way to migrate smaller SQL Server instances to the cloud, and the only way to deploy a 2-vCore managed instance. |
43+
|[JSON native data type](/sql/t-sql/data-types/json-data-type) | The new **JSON** native data type is currently in preview. For more information, see [JSON Type and aggregates preview](https://aka.ms/json-type-aggregates-public-preview). Your SQL managed instance must be configured with the [Always-up-to-date update policy](update-policy.md#always-up-to-date-update-policy).|
44+
|[JSON aggregate functions](/sql/relational-databases/json/json-data-sql-server#json-data-from-aggregates) | Two new **JSON** aggregate functions `JSON_OBJECTAGG` and `JSON_ARRAYAGG` enable construction of JSON objects or arrays based on an aggregate from SQL data. Your SQL managed instance must be configured with the [Always-up-to-date update policy](update-policy.md#always-up-to-date-update-policy). For more information, see [JSON Type and aggregates preview](https://aka.ms/json-type-aggregates-public-preview). |
4345
|[Link from SQL MI to SQL Server](managed-instance-link-feature-overview.md) | Configure a link *from* Azure SQL Managed Instance to SQL Server 2022. |
4446
|[Microsoft Entra nonunique name support](../database/authentication-microsoft-entra-create-users-with-nonunique-names.md) | The [CREATE USER](/sql/t-sql/statements/create-user-transact-sql) Transact-SQL (T-SQL) syntax has been extended to include `WITH OBJECT_ID` to support creating Microsoft Entra logins and users in Azure SQL Managed Instance that have nonunique names. |
4547
|[Native Windows principals](native-windows-principals.md) | Use the new **Windows** authentication metadata mode to allow Windows authentication or Microsoft Entra authentication (using a Windows principal metadata) with Azure SQL Managed Instance. |
@@ -105,6 +107,8 @@ Learn about significant changes to the Azure SQL Managed Instance documentation.
105107

106108
| Changes | Details |
107109
| --- | --- |
110+
| **JSON native data type preview** | The new [**JSON** native data type](/sql/t-sql/data-types/json-data-type) and is currently in preview. For more information, see [JSON Type and aggregates preview](https://aka.ms/json-type-aggregates-public-preview). Your SQL managed instance must be configured with the [Always-up-to-date update policy](update-policy.md#always-up-to-date-update-policy).|
111+
| **JSON aggregate functions preview** | Two new **JSON** aggregate functions [JSON_OBJECTAGG and JSON_ARRAYAGG](/sql/relational-databases/json/json-data-sql-server#json-data-from-aggregates) enable construction of JSON objects or arrays based on an aggregate from SQL data. For more information, see [JSON Type and aggregates preview](https://aka.ms/json-type-aggregates-public-preview). Your SQL managed instance must be configured with the [the Always-up-to-date update policy](update-policy.md#always-up-to-date-update-policy).|
108112
| **Fail over link with T-SQL preview** | You can now fail over a [managed instance link](managed-instance-link-feature-overview.md) by using Transact-SQL (T-SQL) commands. This capability is currently in preview starting with [SQL Server 2022 CU13 (KB5036432)](/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate13). To learn more, review [fail over a database](managed-instance-link-failover-how-to.md?tabs=tsql#fail-over-a-database). |
109113

110114
### July 2024

azure-sql/managed-instance/update-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Use the update policy setting in Azure SQL Managed Instance to cont
55
author: MladjoA
66
ms.author: mlandzic
77
ms.reviewer: mathoma
8-
ms.date: 05/22/2024
8+
ms.date: 08/20/2024
99
ms.service: azure-sql-managed-instance
1010
ms.subservice: deployment-configuration
1111
ms.topic: how-to
@@ -57,9 +57,9 @@ When using the **Always-up-to-date** update policy, consider the following:
5757
The following table lists all the features that are only available to instances with the designated update policy:
5858

5959

60-
|**SQL Server 2022** update policy |**Always-up-to-date** update policy |
60+
|SQL Server 2022 update policy |Always-up-to-date update policy |
6161
|---------|---------|
62-
|[Restore database to SQL Server 2022](restore-database-to-sql-server.md) <br /> [Link with bidirectional failover and disaster recovery](managed-instance-link-disaster-recovery.md) | While currently, there aren't any features that are only available to instances with the **Always-up-to-date** update policy, check back soon. |
62+
|- [Restore database to SQL Server 2022](restore-database-to-sql-server.md) <br /> - [Link with bidirectional failover and disaster recovery](managed-instance-link-disaster-recovery.md) | [JSON data type](/sql/t-sql/data-types/json-data-type) |
6363

6464

6565
The following features are impacted by the configured update policy:

docs/relational-databases/json/index-json-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Index JSON data"
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: jroth, jovanpop
7-
ms.date: 05/21/2024
7+
ms.date: 08/20/2024
88
ms.service: sql
99
ms.custom:
1010
- build-2024
@@ -20,7 +20,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
2020
You can optimize your queries over JSON documents using standard indexes. SQL Server does not have custom JSON indexes.
2121

2222
- Currently, in SQL Server **json** is not a built-in data type.
23-
- Currently, the [JSON data type](../../t-sql/data-types/json-data-type.md) is available in Azure SQL Database.
23+
- The [JSON data type](../../t-sql/data-types/json-data-type.md) is currently in preview for Azure SQL Database and Azure SQL Managed Instance (configured with the [**Always-up-to-date** update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy)).
2424

2525
Indexes work the same way on JSON data in **varchar**/**nvarchar** or the [native **json** data type](../../t-sql/data-types/json-data-type.md).
2626

docs/relational-databases/json/json-data-sql-server.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Combine NoSQL and relational concepts in the same database with JSO
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: randolphwest, jovanpop
7-
ms.date: 05/21/2024
7+
ms.date: 08/20/2024
88
ms.service: sql
99
ms.topic: quickstart
1010
ms.custom:
@@ -64,7 +64,7 @@ The new **json** data type that stores JSON documents in a native binary format
6464
- No change in compatibility with existing code
6565

6666
> [!NOTE]
67-
> - Currently, the [JSON data type](../../t-sql/data-types/json-data-type.md) is available in Azure SQL Database.
67+
> The [JSON data type](../../t-sql/data-types/json-data-type.md) is currently in preview for Azure SQL Database and Azure SQL Managed Instance (configured with the [**Always-up-to-date** update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy)).
6868
6969
Using the JSON same functions described in this article remain the most efficient way to query the **json** data type. For more information on the native **json** data type, see [JSON data type](../../t-sql/data-types/json-data-type.md).
7070

@@ -256,7 +256,7 @@ JSON aggregate functions enable construction of JSON objects or arrays based on
256256
- [JSON_ARRAYAGG](../../t-sql/functions/json-arrayagg-transact-sql.md) constructs a JSON **array** from an aggregation of SQL data or columns.
257257

258258
> [!NOTE]
259-
> Currently, both **json** aggregate functions `JSON_OBJECTAGG` and `JSON_ARRAYAGG` are available in preview for Azure SQL Database.
259+
> Both **json** aggregate functions `JSON_OBJECTAGG` and `JSON_ARRAYAGG` are currently in preview for Azure SQL Database and Azure SQL Managed Instance (configured with the [**Always-up-to-date** update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy)).
260260
261261
## Use cases for JSON data in SQL Server
262262

docs/relational-databases/json/store-json-documents-in-sql-tables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Learn why and how to store and index JSON documents, and how to op
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: umajay
7-
ms.date: 08/01/2024
7+
ms.date: 08/20/2024
88
ms.service: sql
99
ms.custom:
1010
- build-2024
@@ -22,7 +22,7 @@ The first storage design decision is how to store JSON documents in the tables.
2222
- **LOB storage** - JSON documents can be stored as-is in columns with the data type **json** or **nvarchar**. This is the best way for quick data load and ingestion because the loading speed matches the loading speed of string columns. This approach might introduce an additional performance penalty on query/analysis time if indexing on JSON values is not performed, because the raw JSON documents must be parsed while the queries are running.
2323
- **Relational storage** - JSON documents can be parsed while they are inserted in the table using `OPENJSON`, `JSON_VALUE` or `JSON_QUERY` functions. Fragments from the input JSON documents can be stored in the columns containing JSON sub-elements with data types **json** or **nvarchar**. This approach increases the load time because JSON parsing is done during load; however, queries match the performance of classic queries on the relational data.
2424

25-
- Currently, the [JSON data type](../../t-sql/data-types/json-data-type.md) is available in Azure SQL Database.
25+
- The [JSON data type](../../t-sql/data-types/json-data-type.md) is currently in preview for Azure SQL Database and Azure SQL Managed Instance (configured with the [**Always-up-to-date** update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy)).
2626
- Currently in SQL Server, JSON is not a built-in data type.
2727

2828
## Classic tables

docs/t-sql/data-types/json-data-type.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ description: The native JSON data type provides advantages for storing JSON data
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: randolphwest, jovanpop
7-
ms.date: 05/21/2024
7+
ms.date: 08/20/2024
88
ms.service: sql
99
ms.topic: quickstart
1010
ms.custom:
1111
- intro-quickstart
1212
- build-2024
1313
helpviewer_keywords:
1414
- "JSON data type"
15-
monikerRange: "=azuresqldb-current"
15+
monikerRange: "=azuresqldb-current || =azuresqldb-mi-current"
1616
---
1717
# JSON data type (preview)
1818

19-
[!INCLUDE [asdb](../../includes/applies-to-version/asdb.md)]
19+
[!INCLUDE [asdb](../../includes/applies-to-version/asdb-asdbmi.md)]
2020

2121
The new native **json** data type that stores JSON documents in a native binary format.
2222

@@ -60,7 +60,7 @@ JSON support was first introduced in [!INCLUDE [sssql16-md](../../includes/sssql
6060
**json** is available under all database compatibility levels.
6161

6262
> [!NOTE]
63-
> Currently, the **json** type is available in preview on Azure SQL Database.
63+
> The [JSON data type](../../t-sql/data-types/json-data-type.md) is currently in preview for Azure SQL Database and Azure SQL Managed Instance (configured with the [**Always-up-to-date** update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy)).
6464
6565
## Function support
6666

docs/t-sql/functions/json-arrayagg-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: JSON_ARRAYAGG constructs a JSON array from an aggregation of SQL da
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: umajay
7-
ms.date: 05/21/2024
7+
ms.date: 08/20/2024
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: reference
@@ -17,18 +17,18 @@ dev_langs:
1717
- "TSQL"
1818
ms.custom:
1919
- build-2024
20-
monikerRange: "=azuresqldb-current"
20+
monikerRange: "=azuresqldb-current || =azuresqldb-mi-current"
2121
---
2222
# JSON_ARRAYAGG (Transact-SQL)
2323

24-
[!INCLUDE [asdb](../../includes/applies-to-version/asdb.md)]
24+
[!INCLUDE [asdb](../../includes/applies-to-version/asdb-asdbmi.md)]
2525

2626
Constructs a JSON array from an aggregation of SQL data or columns.
2727

2828
To create a JSON object from an aggregate instead, use [JSON_OBJECTAGG](json-objectagg-transact-sql.md).
2929

3030
> [!NOTE]
31-
> Currently, both **json** aggregate functions `JSON_OBJECTAGG` and `JSON_ARRAYAGG` are available in preview for Azure SQL Database.
31+
> Both **json** aggregate functions `JSON_OBJECTAGG` and `JSON_ARRAYAGG` are currently in preview for Azure SQL Database and Azure SQL Managed Instance (configured with the [**Always-up-to-date** update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy)). .
3232
3333
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
3434

docs/t-sql/functions/json-functions-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Use JSON functions to validate or change JSON text, or to extract s
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: jovanpop, randolphwest
7-
ms.date: 05/15/2024
7+
ms.date: 08/20/2024
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: reference

docs/t-sql/functions/json-objectagg-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: JSON_OBJECTAGG constructs a JSON object from an aggregation of SQL
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: umajay
7-
ms.date: 05/21/2024
7+
ms.date: 08/20/2024
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: reference
@@ -17,11 +17,11 @@ dev_langs:
1717
- "TSQL"
1818
ms.custom:
1919
- build-2024
20-
monikerRange: "=azuresqldb-current"
20+
monikerRange: "=azuresqldb-current || =azuresqldb-mi-current"
2121
---
2222
# JSON_OBJECTAGG (Transact-SQL)
2323

24-
[!INCLUDE [asdb](../../includes/applies-to-version/asdb.md)]
24+
[!INCLUDE [asdb](../../includes/applies-to-version/asdb-asdbmi.md)]
2525

2626
Constructs a JSON object from an aggregation of SQL data or columns.
2727

@@ -30,7 +30,7 @@ monikerRange: "=azuresqldb-current"
3030
To create a JSON array from an aggregate instead, use [JSON_ARRAYAGG](json-arrayagg-transact-sql.md).
3131

3232
> [!NOTE]
33-
> Currently, both **json** aggregate functions `JSON_OBJECTAGG` and `JSON_ARRAYAGG` are available in preview for Azure SQL Database.
33+
> Both **json** aggregate functions `JSON_OBJECTAGG` and `JSON_ARRAYAGG` are currently in preview for Azure SQL Database and Azure SQL Managed Instance (configured with the [**Always-up-to-date** update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy)).
3434
3535
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
3636

0 commit comments

Comments
 (0)