Thursday, March 29, 2012

Can't take db offline

I have an ERP system, and I am try to take the db offline to restore, but it
will not. Any suggestions. I even rebooted"DBA" <DBA@.discussions.microsoft.com> wrote in message
news:B16E4BFD-5BC0-4FEE-B53E-53F22D10CFA9@.microsoft.com...
>I have an ERP system, and I am try to take the db offline to restore, but
>it
> will not. Any suggestions. I even rebooted
Run sp_who to see who is currently connected to the database.
You can then use the KILL command to kill off the spids who are connected.
Once that is done, you should be able to put the database in db use only.
Rick Sawtell
MCT, MCSD, MCDBA|||easier than killing them, (especially if you have many users connected),
you can:
ALTER DATABASE SET OFFLINE WITH ROLLBACK IMMEDIATE
ALTER DATABASE SET ONLINE
that should disconnect the buggers :-)
Rick Sawtell wrote:

> "DBA" <DBA@.discussions.microsoft.com> wrote in message
> news:B16E4BFD-5BC0-4FEE-B53E-53F22D10CFA9@.microsoft.com...
>
>
> Run sp_who to see who is currently connected to the database.
> You can then use the KILL command to kill off the spids who are connected.
> Once that is done, you should be able to put the database in db use only.
> Rick Sawtell
> MCT, MCSD, MCDBA
>|||Good one Uri...
That goes into the toolchest!
Rick
"Uri Dor" <tablul@.newsgroups.nospam> wrote in message
news:eBm4jxg0EHA.1860@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> easier than killing them, (especially if you have many users connected),
> you can:
> ALTER DATABASE SET OFFLINE WITH ROLLBACK IMMEDIATE
> ALTER DATABASE SET ONLINE
> that should disconnect the buggers :-)
> Rick Sawtell wrote:
>sql

No comments:

Post a Comment