Skip to content


Change collation of a database

This is mostly a “note to self”. If you receive “The database could not be exclusively locked to perform the operation.” error message, you have to put the DB in the single user mode, then change the collation. Here’s how to do it:

USE MASTER
GO

ALTER DATABASE moovme SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE moovme COLLATE Slovenian_CI_AS
ALTER DATABASE moovme SET MULTI_USER
GO

Hope that helps anyone.

Posted in general.



WP SlimStat