Environment: Non-domain environment
Because it is automatic failover, need to join witness, transaction security mode is, strong security full mode
When you do the final step, you may encounter
Execution (ALTER DATABASE [mirrortest] SET WITNESS = ' tcp://xxxx:5022 '-) Error resolution message 1456, Level 16, State 3, line 4th cannot convert ALTER DATABASE command Sent to the remote server instance ' tcp://xxx:5022 '. The database mirroring configuration has not changed. Make sure that the server is connected, and then try again.
Always try to make mistakes, check a lot of information and some say that server SQL service startup user name and password inconsistent What, these tried not, finally in a master's advice, know the solution, absolutely easy to use! Don't talk a lot, just watch it.
Solution, need to three machines: witness, Mirror, host on the C:\Windows\System32\drivers\etc\hosts file to add the following content, three machines are to be added
192.168.1.100 hostname 192.168.1.101 Standby name 192.168.1.102 Witness name of course you need to write the computer name, and then execute the ALTER DATABASE [mirrortest] SET WITNESS on the host machine = ' tcp://xxxx:5022 ' will no longer be an error.
Workaround for SQL Server mirroring configuration that cannot send the ALTER DATABASE command to a remote server instance