| F_clef 2006-11-30, 7:14 pm |
| Try this command:
alter database <db name> set restricted_user with rollback immediate
** You can change the rollback option to fit your desired result
"SalamElias" wrote:
>
> when using "sp_dboption" to set database to 'dbo use only' , when Db is
> used, we get the follwing error
>
> ********************
********************
********************
****
> Msg 5070, Level 16, State 2, Line 1
> Database state cannot be changed while other users are using the database
> 'IISLOG'
> Msg 5069, Level 16, State 1, Line 1
> ALTER DATABASE statement failed.
> ********************
********************
********************
******
>
> I think this is logic, but Is there a system stored proc that allows to
> disconnect all users after a period of time instead of looping through
> all spids and killing them one by one
>
> Thanks
|