Avoiding connections from clients SQLServer

Mortarello
Mortarello used Ask the Experts™
on
Guys,

If I need to do some manutention in my DB I want to avoid connections coming from clients.

Which command should I use in T-Sql  to work in peace and avoid those connections ?

Many Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi,

maybe this stored procedure is of help for you:

Prevent users from reconnecting in SQL Server

Cheers,

Christian
Software Engineer
Commented:

You can set your database to single user mode, do your maintenance then set it back to multi user mode

Author

Commented:
Thanks Guys !!

I will stick with ewangoya..

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial