What does this error means?

This was the error I got when I tried to change the collation settings.
will it wrk if I take the database into single user?
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 'mciw_sideB' cannot be set to SQL_Latin1_General_CP1250_CS_AS.

saratcmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
You are trying to change the collation of your database and it failed because your database is in multi user mode..
Run this script to bring it to single user mode before your ALTER DATABASE statement for collation change:

use master
go
alter database ur_db_name set single_user with rollback immediate;
go
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dwkorCommented:
and set it back to the multi user mode after you change the collation with:

alter database mciw_sideB set multi_user
0
saratcmAuthor Commented:
Hi all,
I tried it  using single user mode

Msg 5075, Level 16, State 1, Line 1
The object 'CK__ViewType__One__0C70CFB4' is dependent on database collation. The database collation cannot be changed if a schema-bound object depends on it. Remove the dependencies on the database collation and then retry the operation.
Msg 5072, Level 16, State 1, Line 1
ALTER DATABASE failed. The default collation of database 'database' cannot be set to SQL_Latin1_General_CP1250_CS_AS.

How should I find this object, will it harm if we delete that?
Is there a way to change the collation settings for the whole server?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
>> The object 'CK__ViewType__One__0C70CFB4' is dependent on database collation.

Got it..
You have created view with SCHEMABINDING option and that's why you are facing this issue..
Drop those views ( Take a backup before that) and change the collation of your database and then recreate those views again which should work..

Thanks dwkor for reverting back the database to multi user mode which I missed out..
0
saratcmAuthor Commented:
Thanks rrjegan,
Why I had to change the collation settings on the dataase is, I recently did a migration frmo 2000---2005 and I just detached the 2000 database and attached it in 2005 server.
So this database collation didn't get updated. It has the same collation as it has on the old 2000 server.

So i tried even restoring the 2000 database on the 2005 server adn still the collation settings didn't get updated.

So will it happen in any migration or what is the best way to make sure it wont happen or how will those collation get updated?
0
saratcmAuthor Commented:
Hi rrjegan,
I didn't find any view in that database with that name 'CK_ViewType   '. Is there a way to find it from where it belongs too?
0
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Run this query to find the view name:

select OBJECT_NAME(parent_object_id)
from sys.objects
where name like 'CK__ViewType__One__0C70CFB4'
0
saratcmAuthor Commented:
Good
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.