If you're trying to block users from connecting to (an instance of) SQL Server (as opposed to a single database), the quickest trick I've found to block logins is to change their passwords. Here's a brief overview on the steps involved:
For NT authentication, for a given login (whether user or group), run sp_denyLogin. To reverse this, issue sp_grantLogin.
For SQL Authentication, change the password. To reverse this, reset the password back to what it should be. (If you don't know the password... well, that could get tricky.)
This won't affect current connections, but it will prevent new connections from being made while the existing connections are closed down.
Thanks for ur effort Shabbir...

