1
votes

I've tried to alter data collation for a Azure SQL DB V12 database with this command:

ALTER DATABASE aguia COLLATE SQL_Latin1_General_CP1_CI_AI

And receive the follow message:

The database could not be exclusively locked to perform the operation.

If I try to run this command, in order to lock exclusively:

ALTER DATABASE aguia SET SINGLE_USER

I receive this message:

The operation cannot be performed on database "aguia" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.

How can I get around?

Regards, JP.

1

1 Answers

2
votes

Make sure you are in master database and run below query.further you also can see which sessions are accessing your database by below dmv.

ALTER DATABASE aguia COLLATE SQL_Latin1_General_CP1_CI_AI

select * from sys.sysprocesses where dbid=db_id('your db name')