Skip to content

Commit e7b2518

Browse files
authored
Merge pull request #263818 from WilliamDAssafMSFT/20240122-dw-collation
20240122 dw collation
2 parents 45eef01 + e3957d7 commit e7b2518

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed
Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,61 @@
11
---
22
title: Data warehouse collation types
33
description: Collation types supported for dedicated SQL pool (formerly SQL DW) in Azure Synapse Analytics.
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.reviewer: sngun, kecona
7+
ms.date: 01/22/2024
48
ms.service: synapse-analytics
59
ms.subservice: sql
610
ms.topic: conceptual
7-
ms.date: 02/15/2023
8-
author: WilliamDAssafMSFT
9-
ms.author: wiassaf
10-
ms.reviewer: sngun, kecona
11-
ms.custom: azure-synapse
11+
ms.custom:
12+
- azure-synapse
1213
---
1314

14-
# Database collation support for dedicated SQL pool (formerly SQL DW) in Azure Synapse Analytics
15+
# Database collation support for dedicated SQL pool (formerly SQL DW) in Azure Synapse Analytics
1516

1617
You can change the default database collation from the Azure portal when you create a new dedicated SQL pool (formerly SQL DW). This capability makes it even easier to create a new database using one of the 3800 supported database collations.
1718

1819
This article applies to dedicated SQL pools (formerly SQL DW), for more information on dedicated SQL pools in Azure Synapse workspaces, see [Collation types supported for Synapse SQL](../sql/reference-collation-types.md).
1920

20-
Collations provide the locale, code page, sort order and character sensitivity rules for character-based data types. Once chosen, all columns and expressions requiring collation information inherit the chosen collation from the database setting. The default inheritance can be overridden by explicitly stating a different collation for a character-based data type.
21+
Collations provide the locale, code page, sort order, and character sensitivity rules for character-based data types. Once chosen, all columns and expressions requiring collation information inherit the chosen collation from the database setting. The default inheritance can be overridden by explicitly stating a different collation for a character-based data type.
2122

2223
> [!NOTE]
2324
> In Azure Synapse Analytics, query text (including variables, constants, etc.) is always handled using the database-level collation, and not the server-level collation as in other SQL Server offerings.
2425
25-
## Changing collation
26+
## <a id="checking-the-current-collation"></a> Check the current collation
27+
28+
To check the current collation for the database, you can run the following T-SQL snippet:
29+
30+
```sql
31+
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation') AS Collation;
32+
```
33+
34+
When passed `'Collation'` as the property parameter, the `DatabasePropertyEx` function returns the current collation for the database specified. For more information, see [DATABASEPROPERTYEX](/sql/t-sql/functions/databasepropertyex-transact-sql?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true).
2635

27-
To change the default collation, update to the **Collation** field in the provisioning experience.
36+
## <a id="changing-collation"></a> Choose collation
2837

29-
For example, if you wanted to change the default collation to case sensitive, change the collation from `SQL_Latin1_General_CP1_CI_AS` to `SQL_Latin1_General_CP1_CS_AS`.
38+
To change the default collation, update the **Collation** field in the provisioning experience during the SQL pool creation. For example, if you want to change the default collation to be case-sensitive, modify the collation from `SQL_Latin1_General_CP1_CI_AS` to `SQL_Latin1_General_CP1_CS_AS` within the portal provisioning experience. Alternatively, you can modify the collation within your ARM template.
39+
40+
> [!NOTE]
41+
> Collation cannot be changed on an existing database. If you need to have a different collation at the SQL pool level, create a new SQL pool with the required collation.
3042
3143
## Collation support
3244

3345
The following table shows which collation types are supported by which service.
3446

35-
| Collation Type | Serverless SQL Pool | Dedicated SQL Pool - Database & Column Level | Dedicated SQL Pool - External Table (Native Support) | Dedicated SQL Pool - External Table (Hadoop/Polybase) |
47+
| Collation or collation type | Serverless SQL pool | Dedicated SQL pool - database & column Level | Dedicated SQL pool - external table (native support) | Dedicated SQL pool - external table (Hadoop/PolyBase) |
3648
|:-----------------------------------------:|:-------------------:|:-----------------------:|:------------------:|:------------------:|
3749
| Non-UTF-8 Collations | Yes | Yes | Yes | Yes |
3850
| UTF-8 | Yes | Yes | No | No |
39-
| Japanese_Bushu_Kakusu_140_* | Yes | Yes | No | No |
40-
| Japanese_XJIS_140_* | Yes | Yes | No | No |
41-
| SQL_EBCDIC1141_CP1_CS_AS | No | No | No | No |
42-
| SQL_EBCDIC277_2_CP1_CS_AS | No | No | No | No |
43-
44-
## Checking the current collation
45-
46-
To check the current collation for the database, you can run the following T-SQL snippet:
47-
48-
```sql
49-
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation') AS Collation;
50-
```
51-
52-
When passed 'Collation' as the property parameter, the DatabasePropertyEx function returns the current collation for the database specified. For more information, see [DATABASEPROPERTYEX](/sql/t-sql/functions/databasepropertyex-transact-sql?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true).
53-
51+
| `Japanese_Bushu_Kakusu_140_*` | Yes | Yes | No | No |
52+
| `Japanese_XJIS_140_*` | Yes | Yes | No | No |
53+
| `SQL_EBCDIC1141_CP1_CS_AS` | No | No | No | No |
54+
| `SQL_EBCDIC277_2_CP1_CS_AS` | No | No | No | No |
5455

55-
## Next steps
56+
## Related content
5657

5758
Additional information on best practices for dedicated SQL pool and serverless SQL pool can be found in the following articles:
5859

5960
- [Best practices for dedicated SQL pool](../sql/best-practices-dedicated-sql-pool.md)
60-
- [Best practices for serverless SQL pool](../sql/best-practices-serverless-sql-pool.md)
61+
- [Best practices for serverless SQL pool](../sql/best-practices-serverless-sql-pool.md)

0 commit comments

Comments
 (0)