Last active
January 22, 2019 07:13
-
-
Save devcfgc/dc6f10e6e6d9ac79b162eb92b550af23 to your computer and use it in GitHub Desktop.
Change database collation and unlink any connection to the database to execute the operation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE master; | |
GO | |
ALTER DATABASE DATABASE_NAME | |
SET SINGLE_USER WITH ROLLBACK IMMEDIATE; | |
GO | |
ALTER DATABASE DATABASE_NAME | |
COLLATE Latin1_General_CI_AS ; | |
GO | |
--Verify the collation setting. | |
SELECT name, collation_name | |
FROM sys.databases | |
WHERE name = N'DATABASE_NAME'; | |
GO | |
ALTER DATABASE DATABASE_NAME SET MULTI_USER; | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment