Thursday, April 14, 2011

Fix Orphand Users in SQL Server

-- Select the user database name
Use  dbname
go


-- Find the Orphand Users
EXEC sp_change_users_login 'REPORT'

go

-- Fix the Orphand Users
EXEC sp_change_users_login 'UPDATE_ONE',
'User_Name','User_Name'

No comments: