sql server 2008 database mirroring gotchas

One day if you try to configure sql server for mirroring without domain accounts you may come across with a few problems.such as this error message:

Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote

"alter failed for database" The server network address can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

The server network address "%.*ls" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

Error messages differs but the problem is sql servers principal and mirror should trust each other. On the net there are various resources how to configure this via certificates etc. but if you are in a hurry to test something quick

try this on your mirror:
run on master database

if not exists( select * from sys.syslogins where loginname = 'NT AUTHORITY\ANONYMOUS LOGON')
Begin
Create Login [NT AUTHORITY\ANONYMOUS LOGON] from windows
End

grant connect on endpoint::[Mirroring] to [NT AUTHORITY\ANONYMOUS LOGON]

where [mirrorring] should be your endpoint name... and you should run this on your master database of your mirror server..

I am assuming that if you see the above error messages you have already configured mirroring using wizards etc.

this will grant the permission needed not the most secure way though therefore keep that in mind.

Comments

Popular posts from this blog

how can you enable a windows firewall rule for a dynamic dns name or dns address

Bose speaker hack (companion 5) to turn on/off automatically

how to IR remote control via wemos d1 (esp8266) & mqtt & sonoff tasmota