You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> If you find something outdated or incorrect in this article, such as on a step or in a code example, please tell us. You can click the **This page** button in the **Feedback** section at the bottom of this page. Or better, if you know the fix, you can click the **Edit-pencil** icon at the top of this page, and then click the pencil icon on the GitHub page. Thank you!
2
+
_We are listening:_ If you find something outdated or incorrect in this article, such as a step or a code example, please tell us. You can click the **This page** button in the **Feedback** section at the bottom of this page. Or better, if you know the fix, you can click the **Edit-pencil** icon at the top of this page, and then click the pencil icon on the GitHub page. We read every item of feedback about SQL, typically the next day. Thank you.
Copy file name to clipboardExpand all lines: docs/relational-databases/collations/collation-and-unicode-support.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,7 @@ This feature may provide significant storage savings, depending on the character
270
270
## <aname="Related_Content"></a> Related Content
271
271
[SQL Server Best Practices Collation Change](https://go.microsoft.com/fwlink/?LinkId=113891)
272
272
[Use Unicode Character Format to Import or Export Data (SQL Server)](../../relational-databases/import-export/use-unicode-character-format-to-import-or-export-data-sql-server.md)
273
+
[Write International Transact-SQL Statements](../../relational-databases/collations/write-international-transact-sql-statements.md)
273
274
["SQL Server Best Practices Migration to Unicode"](https://go.microsoft.com/fwlink/?LinkId=113890) - No longer maintained
274
275
[Unicode Consortium Web site](https://go.microsoft.com/fwlink/?LinkId=48619)
Databases and database applications that use [!INCLUDE[tsql](../../includes/tsql-md.md)] statements will become more portable from one language to another, or will support multiple languages, if the following guidelines are followed:
26
-
27
-
- Replace all uses of the **char**, **varchar**, and **text** data types with **nchar**, **nvarchar**, and **nvarchar(max)**. By doing this, you do not have to consider code page conversion issues. For more information, see [Collation and Unicode Support](../../relational-databases/collations/collation-and-unicode-support.md).
28
-
29
-
- When you perform month and day-of-week comparisons and operations, use the numeric date parts instead of the name strings. Different language settings return different names for the months and weekdays. For example, DATENAME(MONTH,GETDATE()) returns May when the language is set to U.S. English, returns Mai when the language is set to German, and returns mai when the language is set to French. Instead, use a function such as DATEPART that uses the number of the month instead of the name. Use the DATEPART names when you build result sets to be displayed to a user, because the date names are frequently more meaningful than a numeric representation. However, do not code any logic that depends on the displayed names being from a specific language.
26
+
27
+
- Starting with [!INCLUDE[sql-server-2019](../../includes/sssqlv15-md.md)], use either:
28
+
- The **char**, **varchar**, and **varchar(max)** data types with a [UTF-8 enabled collation](../../relational-databases/collations/collation-and-unicode-support.md#utf-8-support).
29
+
- The **nchar**, **nvarchar**, and **nvarchar(max)** data types with any collation.
30
+
31
+
This avoids code page conversion issues. For more information, see [Collation and Unicode Support](../../relational-databases/collations/collation-and-unicode-support.md).
32
+
33
+
- Up to [!INCLUDE[ssSQL17](../../includes/sssql17-md.md)], replace all uses of the **char**, **varchar**, and **varchar(max)** data types with **nchar**, **nvarchar**, and **nvarchar(max)**. This avoids code page conversion issues. For more information, see [Collation and Unicode Support](../../relational-databases/collations/collation-and-unicode-support.md).
34
+
> [!IMPORTANT]
35
+
> The **text** data type is deprecated and should not be used in new development work. Plan to convert **text** data to **varchar(max)**.
36
+
37
+
- When doing month and day-of-week comparisons and operations, use the numeric date parts instead of the name strings. Different language settings return different names for the months and weekdays. For example, `DATENAME(MONTH,GETDATE())` returns `May` when the language is set to U.S. English, returns `Mai` when the language is set to German, and returns `mai` when the language is set to French. Instead, use a function such as [DATEPART](../../t-sql/functions/datepart-transact-sql.md) that uses the number of the month instead of the name. Use the DATEPART names when you build result sets to be displayed to a user, because the date names are frequently more meaningful than a numeric representation. However, don't code any logic that depends on the displayed names being from a specific language.
30
38
31
39
- When you specify dates in comparisons or for input to INSERT or UPDATE statements, use constants that are interpreted the same way for all language settings:
- Applications that use other APIs, or [!INCLUDE[tsql](../../includes/tsql-md.md)] scripts, stored procedures, and triggers, should use the unseparated numeric strings. For example, *yyyymmdd* as 19980924.
42
50
43
-
- Applications that use other APIs, or [!INCLUDE[tsql](../../includes/tsql-md.md)] scripts, stored procedures, and triggers should use the CONVERT statement with an explicit style parameter for all conversions between the **time**, **date**, **smalldate**, **datetime**, **datetime2**, and **datetimeoffset** data types and character string data types. For example, the following statement is interpreted in the same way for all language or date format connection settings:
51
+
- Applications that use other APIs, or [!INCLUDE[tsql](../../includes/tsql-md.md)] scripts, stored procedures, and triggers should use the [CONVERT](../../t-sql/functions/cast-and-convert-transact-sql.md) statement with an explicit style parameter for all conversions between the **time**, **date**, **smalldate**, **datetime**, **datetime2**, and **datetimeoffset** data types and character string data types. For example, the following statement is interpreted in the same way for all language or date format connection settings:
44
52
45
-
```
53
+
```sql
46
54
SELECT*
47
55
FROMAdventureWorks2012.Sales.SalesOrderHeader
48
56
WHERE OrderDate =CONVERT(DATETIME, '20060719', 101)
49
57
```
50
58
51
-
For more information, see [CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md).
Copy file name to clipboardExpand all lines: docs/relational-databases/replication/security/identity-and-access-control-replication.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,8 @@ manager: craigg
44
44
45
45
## Manage Logins and Passwords in Replication
46
46
Specify the logins and passwords for replication agents when you configure replication. After configuring replication, you can change logins and passwords. For more information, see [View and Modify Replication Security Settings](../../../relational-databases/replication/security/view-and-modify-replication-security-settings.md). If you change the password for an account used by a replication agent, execute [sp_changereplicationserverpasswords (Transact-SQL)](../../../relational-databases/system-stored-procedures/sp-changereplicationserverpasswords-transact-sql.md).
47
+
48
+
Support for the use of group Managed Service Accounts (gMSA) is introduced in SQL Server 2014. For more information, see the blog [Replication and group Managed Service Accounts](https://repltalk.com/2019/03/26/replication-and-group-managed-service-accounts/).
47
49
48
50
## See Also
49
51
[Threat and Vulnerability Mitigation (Replication)](../../../relational-databases/replication/security/threat-and-vulnerability-mitigation-replication.md)
0 commit comments