@@servername的问题

sigmod sigmod 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
安装了SQL Cluster

现在@@servername有些问题
Select @@servername
NULL

Select ServerProperty('ServerName')
SCL073CLU07FOI0

SCL073CLU07FOI0是virtual server的名字,如何才能把 @@servername恢复成 virutal server的名字呢?

用helpserver看了server的状态,结果如下:
sp_helpserver
repl_distributor SCL073CLU07FOI0 rpc,rpc out,system,use remote collation 2 NULL 0 0
SCL073CLU07FOI0 SCL073CLU07FOI0 rpc,rpc out,data access,use remote collation 1 NULL 0 0

select * from sys.servers
1 SCL073CLU07FOI0 SQL Server SQLNCLI SCL073CLU07FOI0 NULL NULL NULL 0 0 1 1 1 1 0 1 NULL 0 0 0 0 0 0 1 2008-11-11 05:39:01.390
2 repl_distributor SQL Server SQLNCLI SCL073CLU07FOI0 NULL NULL NULL 0 0 0 1 1 0 0 1 NULL 0 1 0 0 0 0 0 2008-11-11 05:39:01.400

sp_addserver 'SCL073CLU07FOI0', 'local'
Msg 15028, Level 16, State 1, Procedure sp_addserver, Line 0
The server 'SCL073CLU07FOI0' already exists.


做了下面这些尝试,都没成功
尝试1:
sp_dropserver 'SCL073CLU07FOI0', 'droplogins'
Cannot drop server 'SCL073CLU07FOI0' because it is used as a Publisher in replication.

exec sp_dropdistpublisher @publisher = 'all'
go

Could not find the Distributor or the distribution database for the local server. The Distributor may not be installed, or the local server may not be configured as a Publisher at the Distributor.

尝试2:
Sp_dropdistributor 1,1
The Distributor is not installed.

sp_removedbreplication
succussefully executed

sp_dropserver 'SCL073CLU07FOI0', 'droplogins'
Cannot drop server 'SCL073CLU07FOI0' because it is used as a Publisher in replication.

尝试3:
sp_serveroption 'SCL073CLU07FOI0', 'pub', 'false'
go

Command(s) completed successfully.

sp_dropserver 'SCL073CLU07FOI0', 'droplogins'
go

Cannot drop server 'SCL073CLU07FOI0' because it is used as a Publisher in replication.


到底应该怎么做呢?
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
sigmod
疑难问题 22,298 成员 121,727 内容