简体   繁体   English

如何查看 SQL Server 2000 中的排序规则设置?

[英]How to view the collation setting in SQL Server 2000?

I'm working with an ancient SQL Server 8.00.194 , and I need to know the collation setting of the database and specific column.我正在使用一个古老的SQL Server 8.00.194 ,我需要知道数据库和特定列的排序规则设置。

I've naively tried to use documentation , but it seems that there were no such thing as sys.databases (same for sys.columns , sys.tables ):我天真地尝试使用文档,但似乎没有像sys.databases这样的东西(对于sys.columnssys.tables ):

SELECT * FROM sys.databases

Msg 208, Level 16, State 1, Line 5 Msg 208, Level 16, State 1, Line 5
Invalid object name 'sys.databases'.无效的对象名称“sys.databases”。

Also I have tried to view properties from UI with Management Studio, but it breaks all the time:此外,我尝试使用 Management Studio 从 UI 查看属性,但它一直在中断:

Cannot show requested dialog.无法显示请求的对话框。

Failed to retrieve data for this request.无法检索此请求的数据。 (SqlManagerUI) (SqlManagerUI)

UPD.更新。 I kinda know that this is possible, because somebody has changed the collation on one column on this server, and that's why I'm doing this.我有点知道这是可能的,因为有人更改了此服务器上一列的排序规则,这就是我这样做的原因。

Yes, the metadata views have changed (or rather, first appeared) in SQL Server 2005. Before that, you could query the following:是的,元数据视图在 SQL Server 2005 中发生了变化(或者更确切地说,首次出现)。在此之前,您可以查询以下内容:

select * from master..sysdatabases;
select * from sysobjects;
select * from syscolumns;

An easier way would be looking at the INFORMATION_SCHEMA views - these are ANSI standard and existed even in 2000, in almost the same form as they are now.更简单的方法是查看INFORMATION_SCHEMA视图 - 这些是 ANSI 标准,甚至在 2000 年就存在,与现在的形式几乎相同。 In particular, INFORMATION_SCHEMA.COLUMNS shows column collation, that's for certain.特别是, INFORMATION_SCHEMA.COLUMNS显示列排序规则,这是肯定的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM