Monday, February 20, 2012

Logging Off Users

I am trying to setup a DB Maintanance Plan and am getting an Error 5070:
Database state cannot be changed while other users are using the database.
Does anyone know what microsoft sql command would be to log off all the
users. (Like Oralce command of shutdown immediate.)
Thanks.Joel,
If its SQL Server 2000, you can use:
ALTER DATABASE <databasename >
SET single_user WITH ROLLBACK IMMEDIATE
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Joel" <nowhere@.nowhere.com> wrote in message
news:%23BLYt86SDHA.2144@.TK2MSFTNGP11.phx.gbl...
> I am trying to setup a DB Maintanance Plan and am getting an Error 5070:
> Database state cannot be changed while other users are using the database.
> Does anyone know what microsoft sql command would be to log off all the
> users. (Like Oralce command of shutdown immediate.)
> Thanks.
>|||Thanks
"Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:OCNoaE7SDHA.2004@.TK2MSFTNGP11.phx.gbl...
> Joel,
> If its SQL Server 2000, you can use:
> ALTER DATABASE <databasename >
> SET single_user WITH ROLLBACK IMMEDIATE
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> "Joel" <nowhere@.nowhere.com> wrote in message
> news:%23BLYt86SDHA.2144@.TK2MSFTNGP11.phx.gbl...
> > I am trying to setup a DB Maintanance Plan and am getting an Error 5070:
> > Database state cannot be changed while other users are using the
database.
> >
> > Does anyone know what microsoft sql command would be to log off all the
> > users. (Like Oralce command of shutdown immediate.)
> >
> > Thanks.
> >
> >
>

No comments:

Post a Comment