|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Saturday, January 19, 2013 8:28 AM
Points: 1,038,
Visits: 255
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, May 13, 2009 11:39 AM
Points: 1,
Visits: 5
|
|
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')
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Sunday, February 26, 2012 4:48 PM
Points: 1,
Visits: 89
|
|
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
|
|
|
|