Why the SQL Agent Jobs are failing after database restore

After the data refresh (database restore), run this, otherwise the job would be failing;

USE MyDatabase;  
GO  
EXEC sp_change_users_login 'Update_One', 'MySchma', 'MyUser';  
GO  
EXEC sp_change_users_login 'Update_One', 'MySchema', 'MyUser';  
GO  
FavoriteLoadingAdd to favorites
Spread the love

Author: Shahzad Khan

Software developer / Architect