Sql server 2005 change collation for database
January 6, 2011 Leave a comment
Collation is a set of rules how to compare and sort data in a database.Changing database collation may cause some problems especially:
Error-5030 The database could not be exclusively locked to perform the operation.
To resolve this problem you should do the following from command line:
–Uses a trusted connection instead of requesting a password.
C:\>osql -E 1>use djbadmin 2>GO
–Specifies that only one user can connect to the database at a time. By rolling back other connected users immediately.
1>ALTER DATABASE djbadmin SET SINGLE_USER WITH ROLLBACK IMMEDIATE 2>GO
–Changes collation for database to Latin1_General_CI_AS
1>ALTER DATABASE djbadmin COLLATE Latin1_General_CI_AS 2>GO
–Returns database to its usual state(Available for multiple users).
1>ALTER DATABASE djbadmin SET MULTI_USER 2>GO