开发者

change collation of DB SQL Server 2008

开发者 https://www.devze.com 2023-02-10 21:19 出处:网络
I have created some new databases in SQL Server 2008 Express (10.0.1600.22) and I have also restored one from SQL Server 2005 Express (9.00.1399.06).

I have created some new databases in SQL Server 2008 Express (10.0.1600.22) and I have also restored one from SQL Server 2005 Express (9.00.1399.06).

The collations for these are different and I cannot execute queries across them as a result. So I am trying to change the restored database collation

from: SQL_Latin1_Gen开发者_如何转开发ral_CP1_CI_AS
to:   Latin1_General_CI_AS

However the new collation does not appear in the list of options. Not sure if this is possible.

BTW - workarounds that are not options:

  • I cannot script the data from sql server 2005 express (it seems - I may be missing something)

  • I cannot script the DB on 2K8 server as I get an out of memory exception when doing that :-(


If the collation is visible for other databases on your instance but not this specific one restored from a 2005 instance I wonder if the list displayed is dependent upon the databases compatibility model.

Maybe try changing the compatibility mode of the restored database to 100 to see if it appears in the list of options.

Note changing the database collation will not affect existing columns. Here's a script that may help with that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号