When MSSQL DB Mirroring fails over, our script won't login, fails on:
Cannot open database requested by the login. The login failed. Login failed for user ...
The way I can fix this is by running:
USE YourDB
GO
EXEC sp_change_users_login 'Auto_Fix', 'MyUsername', NULL, 'MyPassword'
GO
How can I sort this so logins just work automatically?