Changing SQL Server Collation After Installation

Changing SQL Server Collation After Installation

We can now redefine the desired collation for database Products with the following code:

-- make sure no one else is using database
ALTER DATABASE Products SET SINGLE_USER WITH ROLLBACK IMMEDIATE

-- change collation to Modern_Spanish_CI_AI_WS
ALTER DATABASE Products COLLATE Modern_Spanish_CI_AI_WS;

-- allow users back into the database
ALTER DATABASE Products SET MULTI_USER
posted @ 2021-05-31 18:03  ChuckLu  阅读(38)  评论(0编辑  收藏  举报