This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.
Invalid object name 'SYS.INDEXES' on SQL Server case sensitive collate #1414
Labels
xorm: v0.7.6
SQL Server: 2017 docker on Ubuntu 18.04
The database is created with case sensitive collate like this:
CREATE DATABASE testdb COLLATE Chinese_PRC_CS_AS_WS;
The line below returns an error "Invalid object name 'SYS.INDEXES'"
xorm/dialect_mssql.go
Line 450 in ce79b1c
While it doesn't fail on another database created with a default collate SQL_Latin1_General_CP1_CI_AS
CREATE DATABASE testdb2
Then I copied the SQL statement to a database terminal and modified all the system table names to lower case, it succeed.
As I see from Microsoft web site, all SQL server system objects are named in lower case
https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-indexes-transact-sql?view=sql-server-2017
The text was updated successfully, but these errors were encountered: