Thor Logo dbatools

Collation

Get-DbaAvailableCollation

Bryan Hamby (@galador)

Get-DbaAvailableCollation View Source Bryan Hamby (@galador) Windows, Linux, macOS Synopsis Retrieves all available collations from SQL Server instances with detailed locale and code page information Description Returns the complete list of collations supported by each SQL Server instance, along with their associated code page names, locale descriptions, and detailed properties. This information is essential when creating new databases, changing database collations, or planning migrations where collation compatibility matters. The function enhances the raw collation data with human-readable code page and locale descriptions to help DBAs make informed collation choices.

Read more

Test-DbaDbCollation

Chrissy LeMaire (@cl), netnerds.net

Test-DbaDbCollation View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Identifies databases with collations that differ from the SQL Server instance default collation Description Compares each database’s collation against the SQL Server instance’s default collation to identify mismatches. Database collation mismatches can cause string comparison issues, join failures, and stored procedure errors when working across databases. This function helps you audit collation consistency across your databases, which is especially important before migrations, mergers, or when troubleshooting application issues related to character sorting and comparison behavior.

Read more