rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
I got the answer to my problem........

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...
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by rajeswaridvssnr
the quickest trick I've found to block logins is to change their passwords.
I must say its a very impressive one.
Quote:
Originally Posted by rajeswaridvssnr
Thanks for ur effort Shabbir...
My pleasure.