How to drop logins by automated script ? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to drop logins by automated script ?

All, I have created a script which does an automatic creation/dropping of logins in the SQLServer. The problem arises while dropping logins when the logins are the users in some databases. We have to check in each user database and drop them from each one of them before dropping the login from SQLServer. Is there any other easy way of achieving this? Does anyone have any sample dos script to do this? Thanks for your help…

Take help from Raymond’s scripthttp://codebetter.com/blogs/raymond.lewallen/archive/2005/05/13/63157.aspx from here, it helps. Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Thanks Satya, Will give it a try…
]]>