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
When a database's collation is set to Georgian_Modern_Sort_CI_AS collation, and it has a table that contains a varchar() column, then querying that table in SSMS fails with the following error.
Msg 0, Level 11, State 0, Line 0
The Collation specified by SQL Server is not supported.
This problem can be reproduced on SSMS 19 and SSMS 18 with SQL2019 and SQL2017. It is a 100% repro.
Exception message:
Msg 0, Level 11, State 0, Line 0
The Collation specified by SQL Server is not supported.
To reproduce
With SSMS 19.1
Right click on Database, and then click "New Database..."
In the "New Database" window, set Database name to Coltest1.
Select the Options page, and change Collation from Default to Georgian_Modern_Sort_CI_AS
Click OK to create the database.
Right click on the newly created database "Coltest1", and then "New Query".
Copy the following query text and paste into the query window.
create table t (v varchar(20))
go
insert t
values ('abcd')
go
select * from t
execute the query.
You should see the following error.
Msg 0, Level 11, State 0, Line 5
The Collation specified by SQL Server is not supported.
But this does not seem to be an issue specific to SSMS. You can repro with pretty much any .Net application.
usingSystem;usingSystem.Data.SqlClient;classC{staticvoidMain(){// Pick your server here...varconnStr=newSqlConnectionStringBuilder(){DataSource="VLM00230243",IntegratedSecurity=true,Pooling=false};// Make up a new DB name...vardb=Guid.NewGuid().ToString();varsqlconn=newSqlConnection(connStr.ConnectionString);sqlconn.Open();// Create DB with interesting collation... (it's key for the repro)varsqlcmd=newSqlCommand($"CREATE DATABASE [{db}] COLLATE Georgian_Modern_Sort_CI_AS",sqlconn);sqlcmd.ExecuteScalar();sqlconn.Close();connStr.InitialCatalog=db;sqlconn=newSqlConnection(connStr.ConnectionString);sqlconn.Open();// Create table (using VARCHAR is also critical for the repro; NVARCHAR works just fine)sqlcmd=newSqlCommand("CREATE TABLE T1(C1 varchar(16) NOT NULL)",sqlconn);sqlcmd.ExecuteScalar();sqlcmd=newSqlCommand("INSERT T1 values('abcd')",sqlconn);sqlcmd.ExecuteScalar();sqlconn.Close();sqlconn=newSqlConnection(connStr.ConnectionString);sqlconn.Open();sqlcmd=newSqlCommand("SELECT * FROM T1",sqlconn);// If you get an exception at the next line, you've got a reprovaro=sqlcmd.ExecuteScalar();Console.WriteLine(o);}}
Expected behavior
The query succeeds.
Further technical details
Microsoft.Data.SqlClient version: 3.1.3
.NET target: Framework 4.8.04161
SQL Server version: SQL Server 2019
Operating system: Windows Server 2022
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
When a database's collation is set to Georgian_Modern_Sort_CI_AS collation, and it has a table that contains a varchar() column, then querying that table in SSMS fails with the following error.
Msg 0, Level 11, State 0, Line 0
The Collation specified by SQL Server is not supported.
This problem can be reproduced on SSMS 19 and SSMS 18 with SQL2019 and SQL2017. It is a 100% repro.
To reproduce
With SSMS 19.1
Select the Options page, and change Collation from Default to Georgian_Modern_Sort_CI_AS
Click OK to create the database.
create table t (v varchar(20))
go
insert t
values ('abcd')
go
select * from t
You should see the following error.
Msg 0, Level 11, State 0, Line 5
The Collation specified by SQL Server is not supported.
But this does not seem to be an issue specific to SSMS. You can repro with pretty much any .Net application.
Expected behavior
The query succeeds.
Further technical details
Microsoft.Data.SqlClient version: 3.1.3
.NET target: Framework 4.8.04161
SQL Server version: SQL Server 2019
Operating system: Windows Server 2022
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: