TSQL – Orphaned User Script

By | 2016-03-19

Finding Orphaned Users

USE [db]
GO
EXEC sp_change_users_login 'Report'
GO

Fixing Orphaned Users

USE [db]
GO
EXEC sp_change_users_login 'auto_fix', 'USERNAME'
GO

Leave a Reply

Your email address will not be published. Required fields are marked *