If login is unable to delete, what are the reasons to get the errors? how to solve the issue?
When we are deleting the login, by normally it will delete. In some cases it will throws an error.First read the error why it is unable to delete, based on those errors we will solve the issue
When we are deleting the login, by normally it will delete. In some cases it will throws an error.First read the error why it is unable to delete, based on those errors we will solve the issue
- unable to delete the user because schema is owned by the user.
In this situation, it clearly says that the user is the owner of a schema so that the login is unable to delete. To find out which schema is owned by that user, go to the database which is shown in the error dialogue box expand the database -> expand security -> select schemas -> press F7 then in right side pane it will show the name and owner of the schema then right click on properties -> then change schema owner as dbo -> click OK. It will delete now.
- in another case it throws an error that could not drop login 'some user' as the user is currently logged in.
In this situation to find the open session by that user run the stored procedure sp_who2 the output will show with spid, now check that spid what it is running by using this command dbcc inputbuffer(spid) then kill that spid if it is running less priority query, mostly that spid is in sleeping state so we can kill that then delete the login.
No comments:
Post a Comment