I am unable to connect to a witness server though Microsoft SQL Server 2014 for database mirroring. I am using Azure. Everything I have researched seems to point to this article https://support.microsoft.com/en-us/kb/940254
. But I cannot seem to get the DNS settings correct, or figure out how to set the host file, if that is even the fix.
I was mostly following this guide: https://msdn.microsoft.com/en-us/library/ms186384.aspx
, for steps on setting up database mirroring.
Here is a brief summary of my scenario.
Principal Server
Cloud Service: MP
VM: MP (Windows Server 2012 R2 Datacenter)
Mirror and Witness Server
Cloud Service: MF
VM mirror: MF (Windows Server 2012 R2 Datacenter)
VM witness: MW (Windows Server 2012 R2 Datacenter)
I am getting this error when trying to run the SQL COMMAND:
ALTER DATABASE database SET WITNESS = 'TCP://MF.cloudapp.net:5023';
Msg 1456, Level 16, State 3, Line 1
The ALTER DATABASE command could not be sent to the remote server instance 'TCP://MF.cloudapp.net:5023'. The database mirroring configuration was not changed. Verify that the server is connected, and try again.
I have opened specific ports on the firewall to allow connections and have set up Endpoints on the Azure portal. Any assistance you can provided will be very much appreciated.
In the meantime, I am going to try giving the witness server its own cloud service so the end points will all be the same (mentioned on this page: http://go4answers.webhost4life.com/Example/trouble-setting-witness-182317.aspx
). I also am going to try setting all 3 VMs on one cloud service then adding them to an availability set (mentioned on this page: https://cuteprogramming.wordpress.com/2014/10/16/database-mirroring-in-azure/
).