You could write one, using various system views, a couple of cursors, and some light-weight dynamic SQL.
However, I have to question "deleting all user-defined users" in the database. That'll pretty much get rid of all user accounts except guest and sa.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon