博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[TroubleShooting] The server network address can not be reached or does not exist
阅读量:6387 次
发布时间:2019-06-23

本文共 3988 字,大约阅读时间需要 13 分钟。

Backtround:

I'm trying to set up mirroring between two sql 2008 R2 databases on different servers in my internal network, as a test run before doing the same thing with two live servers in different locations.

When I actually try and switch the mirroring on the target DB (with 
ALTER DATABASE xxxdb SET PARTNER = TCP://myserverAddress:50221') I'm getting an error telling me that the server network address can not be reached or does not exist. A little research suggests this is a fairly unhelpful message that pops up due to a number of possible causes, some of which are not directly related to the server existing or otherwise.

In fact, this is error is not clear for us.Checking the log, I'm seeing the following errors. "Database mirroring connection error 5 'Connection handshake failed. The certificate used by the peer is invalid due to the following reason: Certificate not found. State 89.' for 'TCP://myserverAddress:50221'." in event viewer(eventvwr).

Solution:

You can manual copying the certificates around(Principal, Mirror and Witness). and drop login, user. and then create login, user with certificate responsed. Last, Grant connect endpoint.

CREATE LOGIN HOST_pro_login WITH PASSWORD ='Password01!';CREATE USER HOST_pro_user FOR LOGIN HOST_pro_login;-- drop CERTIFICATE HOST_pro_certCREATE CERTIFICATE HOST_pro_cert AUTHORIZATION HOST_pro_user FROM FILE ='D:\Hot backup\HOST_pro_cert.cer';GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [HOST_pro_login];

 

Other Suggestions:

The solution to the above problem is very simple and as follows.

Fix/WorkAround/Solution: Try all the suggestions one by one.

Suggestion 1: Make sure that on Mirror Server the database is restored with NO RECOVERY option (This is the most common problem).

Suggestion 2: Make sure that from Principal the latest LOG backup is restored to mirror server. (Attempt this one more time even though the full backup has been restored recently).

-- Back up 1:GOBACKUP DATABASE [dbName] TO  DISK = N'D:\Hot backup\testbackup01.bak' WITH NOFORMAT, NOINIT,  NAME = N'TestBackup01-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10GOBACKUP LOG [dbName] TO  DISK = N'D:\Hot backup\TestBackup01.trn' WITH NOFORMAT, NOINIT,  NAME = N'TestBackup01-Transaction Log  Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10GO
-- Restore 1:
RESTORE DATABASE dbName   FROM DISK = 'D:\Hot backup\dbName.bak' WITH  FILE = 1,     MOVE 'dbName' TO 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\dbName.mdf',    MOVE 'dbName_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\dbName_log.ldf',NORECOVERY,  NOUNLOAD,  REPLACE,  STATS = 10GO
-- Restore 2:RESTORE DATABASE dbName FROM DISK = 'D:\Hot backup\backup_TestBackup01.bak' WITH FILE = 1, NORECOVERY, NOUNLOAD;RESTORE LOG dbName FROM DISK = 'D:\Hot backup\backup_TestBackup01.trn' WITH NORECOVERY

Suggestion 3: Check if you can telnet to your ports using command TELNET ServerName Ports like “telnet SQLServerName 50221″.(Please add feature lelnet client|Server in server 2k8, if it not exsit.)

Suggestion 4: Make sure your firewall is turned off.

Suggestion 5: Verify that the endpoints are started on the partners by using thestate or state_desc column the of the sys.database_mirroring_endpointscatalog view. You can start end point by executing an ALTER ENDPOINT statement.

Suggestion 6: Try the following command as one of the last options.

GRANT CONNECT ON ENDPOINT::Mirroring TO ALL

Suggestion 7: Delete the end points and recreate them.

Suggestion 8: Check SQL log.

If any of above solutions does not fix your problem, do leave comment here. Based on the comment, I will update this article with additional suggestions.

Please note that some of the above suggestions can be security threat to your system. Please use them responsibly and review your system with security expert in your company.

版权声明:本文博客原创文章,博客,未经同意,不得转载。

本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/4749030.html,如需转载请自行联系原作者

你可能感兴趣的文章
Mysql 权限
查看>>
Spring事务管理(详解+实例)
查看>>
ubuntu apt-get install 出现无法定位软件包...
查看>>
centos7 下 基于docker搭建java/tomcat (方式一)
查看>>
全世界最好的编辑器VIM之Windows配置(gvim)[未测试]
查看>>
2018年你需要知道的13个JavaScript工具库
查看>>
当你点击按钮的时候如何设置其他按钮不可点击
查看>>
spring 高级装配
查看>>
【合集】parasoft Jtest 从安装到使用教程合集,收藏推荐!
查看>>
Python Pygame库的学习之路(1)
查看>>
信息安全与Linux系统
查看>>
Ubuntu安装mysql
查看>>
SpringCloud 微服务 (十四) 服务网关 Zuul 过滤器(Pre&Post)
查看>>
代理设计模式
查看>>
初识Shiro
查看>>
在Developerkit开发板上运行blink例程
查看>>
企业级性能、安全可靠 阿里云发布企业级大数据平台开发者版
查看>>
Spring Boot使用过程小记(一)--加载自定义的Spring XML
查看>>
Git分支关联远程GitHub分支出错
查看>>
设计模式--桥接模式
查看>>