如何更改SQL SERVER 2000的排序规则Alter datebase Alter datebase 数据库 Chinese_PRC_BIN 
 
 ALTER TABLE tb 
 ALTER COLUMN colname nvarchar(100) COLLATE Chinese_PRC_CI_AS 
 --不区分大小写 
 ALTER TABLE tb 
 ALTER COLUMN colname nvarchar(100) COLLATE Chinese_PRC_CS_AS 
 --区分大小写 
 
 
 使用如下命令,可以获得更多的规则: 
 SELECT * 
 FROM ::fn_helpcollations() 
更改数据库排序规则后,表中字段的排序规则仍然没变,如果在企业管理器中在设计表的界面去一个字段一个字段的改太累人了, 
 EXEC sp_configure 'allow updates',1 RECONFIGURE WITH OVERRIDE 
 
 update dbo.syscolumns set collationid=65572 where collationid=53284 
 
 EXEC sp_configure 'allow updates',0 RECONFIGURE WITH OVERRIDE 
 go
修改数据库的排序规则的时候,要确保你的数据库没有任何连接. 
 
 最好在查询分析器中用下面的方法,注意修改数据库名: 
 
 /* 
 关闭用户打开的进程处理 
 */ 
 use master 
 go 
 
 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_killspid]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) 
 drop procedure [dbo].[p_killspid] 
 GO 
 
 create proc p_killspid 
 @dbname varchar(200) --要关闭进程的数据库名 
 as 
 declare @sql nvarchar(500) 
 declare @spid nvarchar(20) 
 
 declare #tb cursor for 
 select spid=cast(spid as varchar(20)) from master..sysprocesses where dbid=db_id(@dbname) 
 open #tb 
 fetch next from #tb into @spid 
 while @@fetch_status=0 
 begin 
 exec('kill '+@spid) 
 fetch next from #tb into @spid 
 end 
 close #tb 
 deallocate #tb 
 go 
 
 --关闭用户连接 
 exec p_killspid '数据库名' 
 go 
 
 --修改排序规则 
 Alter datebase Alter datebase 数据库名 Chinese_PRC_BIN