November 18, 2002 at 12:00 am
Comments posted to this topic are about the item Removing Orphan Users from All Databases on Server
Gregory A. Larsen, MVP
July 5, 2007 at 9:40 am
For SQL Server 2005,I also think you need to exclude the predefined database users,dbo and sys.The query needs to be modified as follows:
select u.name from master..syslogins l right join sysusers u on l.sid = u.sid where l.sid is null and issqlrole 1 and isapprole 1 and (u.name 'INFORMATION_SCHEMA' and u.name 'guest'
and u.name 'system_function_schema' and u.name 'dbo' and u.name 'sys')
October 29, 2009 at 12:33 am
Hi Greg,
I run the Store Proc but when i go to individual databases and run EXEC sp_change_users_login 'Report';
it still show me orphaned users..Please let me know if i am missing something
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy