|
1 | 1 | ---
|
2 | 2 | title: Data warehouse collation types
|
3 | 3 | 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 |
4 | 8 | ms.service: synapse-analytics
|
5 | 9 | ms.subservice: sql
|
6 | 10 | 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 |
12 | 13 | ---
|
13 | 14 |
|
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 |
15 | 16 |
|
16 | 17 | 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.
|
17 | 18 |
|
18 | 19 | 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).
|
19 | 20 |
|
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. |
21 | 22 |
|
22 | 23 | > [!NOTE]
|
23 | 24 | > 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.
|
24 | 25 |
|
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). |
26 | 35 |
|
27 |
| -To change the default collation, update to the **Collation** field in the provisioning experience. |
| 36 | +## <a id="changing-collation"></a> Choose collation |
28 | 37 |
|
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. |
30 | 42 |
|
31 | 43 | ## Collation support
|
32 | 44 |
|
33 | 45 | The following table shows which collation types are supported by which service.
|
34 | 46 |
|
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) | |
36 | 48 | |:-----------------------------------------:|:-------------------:|:-----------------------:|:------------------:|:------------------:|
|
37 | 49 | | Non-UTF-8 Collations | Yes | Yes | Yes | Yes |
|
38 | 50 | | 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 | |
54 | 55 |
|
55 |
| -## Next steps |
| 56 | +## Related content |
56 | 57 |
|
57 | 58 | Additional information on best practices for dedicated SQL pool and serverless SQL pool can be found in the following articles:
|
58 | 59 |
|
59 | 60 | - [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