There is an identical question with an answer already:
http://www.experts-exchang
Main Topics
Browse All TopicsHello, Experts.
I'm migrating a database from one server to the other using the 'restore db from backup' method. I first created an empty database, then restored the backup file over.
Now I've run into a conflict of collation between the new host server default collation and my database.
I've tried all of the following:
Alter the collation on the database / catalog, by using:
ALTER DATABASE mydata COLLATE ... etc.
Error: Msg 5030, Level 16, State 2, Line 1
The database could not be exclusively locked to perform the operation.
Msg 5072, Level 16, State 1, Line 1
ALTER DATABASE failed. The default collation of database 'mydata' cannot be set to SQL_Latin1_General_CP1_CI_
Secondly, I tried to alter the master database collation by rebuilding the database like so:
start /wait C:\SQLTOOLS\setup.exe INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=pass SQLCOLLATION=Latin1_Genera
This processed failed with the following error:
The installer has encountered an unexpected error. the error code is 2711. The specified feature name ('SQL_Engine') not found in Feature table.
I tried to delete tempdb, re-start SQL Service, etc. No change yet.
The database is up and working.. it's just that some procs are failing due to collation issues.
Lastly, I should add that I'm running version:
"Microsoft SQL Server 2005 - 9.00.1399.06 (X64) Oct 14 2005 00:35:21 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2) "
Thank you all in advance for all your help!
- Eyal
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
There is an identical question with an answer already:
http://www.experts-exchang
Business Accounts
Answer for Membership
by: chapmandewPosted on 2008-08-12 at 19:38:29ID: 22218686
You need to get the database to single-user mode. YOu may need to go through and kill all of the current sessions so that you can get it to single user mode. Once you do, you essentially have an exclusive lock on the database. At that point, you shoudln't haven't a problem changing the collation.