苏飞论坛

标题: SQL Server复制需要有实际的服务器名称才能连接到服务器 [打印本页]

作者: 站长苏飞    时间: 2013-7-11 12:31
标题: SQL Server复制需要有实际的服务器名称才能连接到服务器
QL Server 2005/2008 配置 Transactional  Replication 过程中,出现如下异常信息。
异常信息: Replication.Utilities
——————————

SQL Server 复制需要有实际的服务器名称才能连接到服务器。不支持通过服务器别名、IP
地址或任何其他备用名称进行连接。请指定实际的服务器名称“xxxxxxx”。

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.

解决办法:

1. 检查SQL Server 的服务器名称:

[code=csharp]SELECT @@SERVERNAME[/code]

2.如果发现上述 SQL 查询得到的服务器名称和实际的计算机名称不符合,则需要进一步执行下面的脚步:

[code=csharp]sp_dropserver
‘old_server_name’
GO
sp_addserver ‘current_computer_name’, ‘local’ [/code]

old_server_name是上面查出来的原名称
current_computer_name这个是你计算机名称

此时,再次运行 SELECT @@SERVERNAME,可能获得 NULL值。重启SQLSERVER
服务,再次运行查询语句,将获得SERVER的真实名称。



===============================================



出现错误
无法删除服务器 'LC04',因为该服务器用作复制过程中的发布服务器。 (Microsoft SQL Server,错误:
20582)


解决处理

[code=sql]select * from
msdb.dbo.MSdistpublishers
DELETE FROM msdb.dbo.MSdistpublishers
select *
from msdb.dbo.MSdistpublishers
exec sp_droplinkedsrvlogin 'LC04',null
exec
sp_dropserver 'LC04','droplogins'
exec sp_addserver 'MSSQLSERVER' , 'LOCAL' [/code]

重启SQLServer服务
[groupid=74]sufeinet总群[/groupid]




欢迎光临 苏飞论坛 (http://www.sufeinet.com/) Powered by Discuz! X3.4