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.

I need to programatically lock a SQL Server Login. The goal is to emulate the automatic function in SQL That will lock out a user that makes several connection attempts with a bad password.

I can easily unlock a login, but I need to lock it as well.

I have tried looping through 20 times with a vb.net sqlConnection that contained an invalid password and I get very inconsistent results.

share|improve this question
    
Does this help? stackoverflow.com/questions/2605814/… –  Aaron Copley Jul 2 '12 at 20:30

1 Answer 1

How about just scripting our a sqlcmd request?

Seems like you could easily create a script that calls some resource on the server very quickly and very often to do this.

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.