Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could not drop login as the user is currently logged in.

Status
Not open for further replies.

Modica82

Technical User
Jan 31, 2003
410
GB
I am trying to drop a login and then reinstate it, as a script but i keep getting this error:

Could not drop login as the user is currently logged in.

my scripts is:

EXEC sp_droplogin 'CTS'
EXEC sp_addlogin 'CTS', 'password'
exec sp_addrolemember 'db_owner', 'CTS'

Any ideas??

Thanks,

Rob

---------------------------------------
 
Is the user actually still logged in? If so, have them log out and try again. If not, maybe see if they are locked up, unlock them and then try again. I don't think you can drop a user if they are logged in though.

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top