Sql Server 复制需要实际的服务器名称来建立与服务器的连接

2022-01-16 00:00:00 sql-server sql-server-2008-r2

当我想创建新的出版物或订阅时,我收到以下消息.

I get the following message when I want to create a new publication or Subscription.

Sql Server 复制需要实际的服务器名称才能连接到服务器.不支持通过服务器别名、IP 地址或任何其他备用名称的连接.请指定实际的服务器名称"

"Sql Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address or any other alternate name are not supported. specify the actual server name"

有人知道我该怎么办吗?

Does anyone know what should I do?

推荐答案

我在以下链接中找到了解决方案 http://www.cryer.co.uk/brian/sqlserver/replication_requires_actual_server_name.htm

I found the solution in the following link http://www.cryer.co.uk/brian/sqlserver/replication_requires_actual_server_name.htm

感谢 Brian Cryer 的有用网站

thankful to Brian Cryer for his useful site

引用链接以避免链接失效:

原因:

在原始安装 SQL Server 后已重命名的服务器上观察到此错误,并且 SQL Server 配置函数 @@SERVERNAME 仍返回服务器的原始名称.这可以通过以下方式确认:

This error has been observed on a server that had been renamed after the original installation of SQL Server, and where the SQL Server configuration function @@SERVERNAME still returned the original name of the server. This can be confirmed by:

select @@SERVERNAME
go

这应该返回服务器的名称.如果不正确,请按照以下步骤进行更正.

This should return the name of the server. If it does not then follow the procedure below to correct it.

补救措施:

要解决此问题,需要更新服务器名称.使用以下内容:

To resolve the problem the server name needs to be updated. Use the following:

sp_addserver 'real-server-name', LOCAL

如果这给出了一个错误,抱怨名称已经存在,那么使用以下顺序:

if this gives an error complaining that the name already exists then use the following sequence:

sp_dropserver 'real-server-name'
go

sp_addserver 'real-server-name', LOCAL
go

如果报告的错误是已有本地服务器".然后使用以下顺序:

If instead the error reported is 'There is already a local server.' then use the following sequence:

sp_dropserver old-server-name
go

sp_addserver real-server-name, LOCAL
go

其中old-server-name"是原始错误正文中包含的名称.

Where the "old-server-name" is the name contained in the body of the original error.

停止并重新启动 SQL Server.

Stop and restart SQL Server.

相关文章