Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.sqlserver.programming
The database could not be exclusively locked to perform the operation.
Lee
3/23/2007 2:43:00 PM
Hi
I need to update the collation on a database but its returning 'The
database could not be exclusively locked to perform the operation.'
How can lock the database so that I can make the change?
thanks
Lee
3 Answers
Tibor Karaszi
3/23/2007 2:51:00 PM
0
Just make sure that on-one is connected to the database (including you).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/d...
http://sqlblog.com/blogs/tib...
"Lee" <lee@digital-interactive.com> wrote in message
news:1174661001.188235.197380@l77g2000hsb.googlegroups.com...
> Hi
>
> I need to update the collation on a database but its returning 'The
> database could not be exclusively locked to perform the operation.'
>
> How can lock the database so that I can make the change?
>
> thanks
> Lee
>
Lee
3/23/2007 4:11:00 PM
0
emm, can I force close any connections via SQL?
Tibor Karaszi
3/23/2007 4:15:00 PM
0
You have two options.
One is that some ALTER DATABASE commands can be complimented with a ROLLBACK option, like:
ALTER DATABASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
The other is the KILL command.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/d...
http://sqlblog.com/blogs/tib...
"Lee" <lee@digital-interactive.com> wrote in message
news:1174666241.610776.139250@e65g2000hsc.googlegroups.com...
> emm, can I force close any connections via SQL?
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
The database could not be exclusively locked to perform the operation.
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password