-
kicking people out of a Database 4 no activity
Is there a way to kick users out of your databases if there's no activity for a certain duration of time. For example, I have a database thats being shared by 5 people. One went to lunch and locked their office just when I needed to do maintanence. I had to wait for them to get back & logout be fore I could do anything?
-
--kick all users
ALTER DATABASE nameofdatabase
SET SINGLE_USER WITH <option>
<option>:
ROLLBACK AFTER integer (seconds)
ROLLBACK IMMEDIATE
NO_WAIT
GO
--restore to mulituser
ALTER DATABASE nameofdatabase
SET MULTI_USER WITH NO_WAIT
GO
--HTH--
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|