Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

As per my project requirement i need to lock a user in SQL Server(Which is created using Windows Authentication). Is there any way to do this?

Thanks for the help

Santhosh

share|improve this question

2 Answers 2

I don't think this will be directly possible in SQL Server, but you could:

  • In SQL Server: Remove all rights from the user (including the ability to connect).
  • Disable the account in Windows.

As the account is a Windows account, it is up to Windows to lock it.

share|improve this answer
    
-1 because it is possible to do in SQL Server. –  K. Brian Kelley Apr 11 '10 at 1:04
    
@K.Brian: In what way is the first bullet point different to your own answer? –  Richard Apr 11 '10 at 8:59

How to do this depends on version. I am assuming the Windows user is added explicitly and not through a Windows group.

In SQL Server 2000, if you are using Enterprise Manager, bring up the properties for the Windows user login. On the General tab you can select Deny Access under Authentication and this will prevent the Windows user from connecting to the SQL Server.

In SQL Server 2005/2008, there are two ways to do this. Using SQL Server Management Studio, again bring up the properties ofr the Windows user login. Click on the Status page. You can either Deny permission to connect to the database engine or Disable the login or both.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.