Results 1 to 3 of 3

Thread: Force a user to logoff ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Posts
    24

    Force a user to logoff ?

    Hi all,

    I got a login 'Jeff' with is password being "Hello" in the Security Logins from SQL Server. Let's say Jeff is currently logged in via an application in a random DB... I want to delete Jeffs login for XYZ reasons but the sp_droplogin procedure WILL fail because Jeff is already logged in in the DB... Is there a way to do something like this :


    Logoff 'Jeff' -> Logs Jeff out of the DB
    sp_dropLogin 'Jeff'


    I want to be able to force a login name to be DISCONNECTED FROM THE DB so I can safely drop the login and he cannot connect back.... anyone heard of a way to do this ?

  2. #2
    Hyperactive Member
    Join Date
    Jan 2003
    Location
    Cape Cod, US
    Posts
    292
    you could kill his connection

    do an sp_who to get his spid and then kill <spid>

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Posts
    24
    Ha ! that could do it, thx alot I'm trying it as soon as I can !!!!

    Thx again !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width