Friday, October 8, 2010

sql server 2005 change collation for 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:

Start->Run->cmd
C:\>osql -E //if it is trusted user then osql -U -P -S
1>use
2>GO

1>ALTER DATABASE djbadmin SET SINGLE_USER WITH ROLLBACK IMMEDIATE
2>GO

1>ALTER DATABASE djbadmin COLLATE Latin1_General_CI_AS
2>GO

1>ALTER DATABASE djbadmin SET MULTI_USER
2>GO

No comments:

Post a Comment